Permalink
Browse files

Changed some parameters to better fit with previous detailed single

neuron studies.

Still shows spindle oscillations

Signed-off-by: Schellenberger <schellenberger@inb.uni-luebeck.de>
  • Loading branch information...
1 parent 1ea3c06 commit 8a73b3fb1f6213636088229226105b024d307852 @miscco committed Oct 20, 2014
Showing with 47 additions and 29 deletions.
  1. +20 −12 Plots.m
  2. +4 −3 Thalamic_Column.cpp
  3. +12 −12 Thalamic_Column.h
  4. +7 −1 Thalamus.cpp
  5. +4 −1 saves.h
View
32 Plots.m
@@ -1,13 +1,13 @@
% mex command is given by:
-% mex CXXFLAGS="\$CXXFLAGS -std=gnu++0x -fpermissive -O3" Thalamus.cpp Thalamic_Column.cpp
+% mex CXXFLAGS="\$CXXFLAGS -std=c++11" Thalamus.cpp Thalamic_Column.cpp
function Plots(T)
if nargin == 0
- Con = [ 4; % sigma
- 6; % N_tr
- 5; % N_rt
- 100]; % N_rr
+ Con = [ 6; % sigma
+ 4; % N_tr
+ 4; % N_rt
+ 20]; % N_rr
% stimulation parameters
@@ -18,19 +18,19 @@ function Plots(T)
% 3 == phase dependend down state
var_stim = [ 0; % mode of stimulation
- 200; % strength of the stimulus in Hz (spikes per second)
- 100; % duration of the stimulus in ms
- 6; % time between stimuli in s
+ 50; % strength of the stimulus in Hz (spikes per second)
+ 120; % duration of the stimulus in ms
+ 7; % time between stimuli in s
1]; % time until stimuli after min in ms
T = 30; % duration of the simulation
end
-[Vt, Vr] = Thalamus(T, Con, var_stim);
+[Vt, Vr, I_t, I_h] = Thalamus(T, Con, var_stim);
L = max(size(Vt));
timeaxis = linspace(0,T,L);
-fs = L/T;
-[Pxx,f] = pwelch(Vt-mean(Vt), [], [], [], fs,'onesided');
+Fs = L/T;
+[Pxx,f] = pwelch(Vt-mean(Vt), hamming(4*Fs), 2*Fs, [], Fs,'ConfidenceLevel', 0.9, 'power');
n = find(f<=60, 1, 'last' );
figure(1)
@@ -40,4 +40,12 @@ function Plots(T)
title('Thalamic reticular membrane voltage'), xlabel('time in s'), ylabel('Vr in mV')
subplot(313), plot(f(1:n),Pxx(1:n))
title('Powerspectrum of Steyn-Ross model with pwelch'), xlabel('frequency in Hz'), ylabel('Power')
-save('Thalamus.mat','Vt','Vr')
+%save('Thalamus.mat','Vt','Vr')
+%
+% figure(2)
+% subplot(311), plot(timeaxis,Vt)
+% title('Thalamic relay membrane voltage'), xlabel('time in s'), ylabel('Vt in mV')
+% subplot(312), plot(timeaxis,I_t)
+% title('Thalamic reticular membrane voltage'), xlabel('time in s'), ylabel('Vr in mV')
+% subplot(313), plot(timeaxis,I_h)
+% title('Thalamic reticular membrane voltage'), xlabel('time in s'), ylabel('Vr in mV')
View
@@ -114,7 +114,7 @@ double Thalamic_Column::m_inf_T_t (int N) const{
/* Activation in RE population after Destexhe 1996 */
double Thalamic_Column::m_inf_T_r (int N) const{
_SWITCH((Vr))
- double m = 1/(1+exp(-(var_Vr+52)/7.2));
+ double m = 1/(1+exp(-(var_Vr+52)/7.4));
return m;
}
@@ -132,7 +132,7 @@ double Thalamic_Column::h_inf_T_r (int N) const{
return h;
}
-/* deactivation time in RE population after Destexhe 1996 */
+/* Deactivation time in RE population after Destexhe 1996 */
double Thalamic_Column::tau_h_T_t (int N) const{
_SWITCH((Vt))
double tau = (30.8 + (211.4 + exp((var_Vt+115.2)/5))/(1 + exp((var_Vt+86)/3.2)))/pow(3, 1.2);
@@ -163,7 +163,8 @@ double Thalamic_Column::m_inf_h (int N) const{
/* Activation time for slow components in TC population after Destexhe 1993 */
double Thalamic_Column::tau_m_h (int N) const{
_SWITCH((Vt))
- double tau = 1. / (exp(-14.59 - 0.086 * var_Vt) + exp(-1.87 + 0.07 * var_Vt));
+ //double tau = 1. / (exp(-14.59 - 0.086 * var_Vt) + exp(-1.87 + 0.07 * var_Vt));
+ double tau = (20 + 1000/(exp((var_Vt + 71.5)/14.2) + exp(-(var_Vt + 89)/11.6)));
return tau;
}
/****************************************************************************************************/
View
@@ -104,7 +104,7 @@ class Thalamic_Column {
void iterate_ODE (void);
/* Data storage access */
- friend void get_data (int, Thalamic_Column&, _REPEAT(double*, 2));
+ friend void get_data (int, Thalamic_Column&, _REPEAT(double*, 4));
private:
/* Population variables */
@@ -145,8 +145,8 @@ class Thalamic_Column {
const double theta_r = -58.6;
/* Sigmoid gain in mV */
- const double sigma_t = 4;
- const double sigma_r = 4;
+ const double sigma_t = 6;
+ const double sigma_r = 6;
/* Scaling parameter for sigmoidal mapping (dimensionless) */
const double C1 = (3.14159265/sqrt(3));
@@ -166,10 +166,10 @@ class Thalamic_Column {
/* T current */
const double g_T_t = 3;
- const double g_T_r = 2;
+ const double g_T_r = 2.3;
/* h current */
- const double g_h = 0.08;
+ const double g_h = 0.05;
/* Reversal potentials in mV */
/* Synaptic */
@@ -187,16 +187,16 @@ class Thalamic_Column {
const double E_Ca = 120;
/* I_h current */
- const double E_h = -43;
+ const double E_h = -40;
/* Calcium parameters */
- const double alpha_Ca = -50E-6; /* influx per spike in nmol */
+ const double alpha_Ca = -52E-6; /* influx per spike in nmol */
const double tau_Ca = 10; /* calcium time constant in ms */
- const double Ca_0 = 2E-4; /* resting concentration */
+ const double Ca_0 = 2.4E-4; /* resting concentration */
/* I_h activation parameters */
const double k1 = 2.5E7;
- const double k2 = 5E-4;
+ const double k2 = 4E-4;
const double k3 = 1E-1;
const double k4 = 1E-3;
const double n_P = 4;
@@ -208,9 +208,9 @@ class Thalamic_Column {
double input = 0.0;
/* Connectivities (dimensionless) */
- const double N_tr = 6;
- const double N_rt = 5;
- const double N_rr = 100;
+ const double N_tr = 4;
+ const double N_rt = 4;
+ const double N_rr = 20;
friend class Stim;
};
View
@@ -86,25 +86,31 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
/* Create data containers */
mxArray* Vt = SetMexArray(1, T*res/red);
mxArray* Vr = SetMexArray(1, T*res/red);
+ mxArray* I_T = SetMexArray(1, T*res/red);
+ mxArray* I_h = SetMexArray(1, T*res/red);
/* Pointer to the actual data block */
double* Pr_Vt = mxGetPr(Vt);
double* Pr_Vr = mxGetPr(Vr);
+ double* Pr_I_T = mxGetPr(I_T);
+ double* Pr_I_h = mxGetPr(I_h);
/* Simulation */
int count = 0;
for (int t=0; t<Time; ++t) {
Thalamus.iterate_ODE();
Stimulation.check_stim(t);
if(t>=onset*res && t%red==0){
- get_data(count, Thalamus, Pr_Vt, Pr_Vr);
+ get_data(count, Thalamus, Pr_Vt, Pr_Vr, Pr_I_T, Pr_I_h);
++count;
}
}
/* Output of the simulation */
plhs[0] = Vt;
plhs[1] = Vr;
+ plhs[2] = I_T;
+ plhs[3] = I_h;
return;
}
/****************************************************************************************************/
View
@@ -29,9 +29,12 @@
/****************************************************************************************************/
/* Save data */
/****************************************************************************************************/
-inline void get_data(int counter, Thalamic_Column& Col, double* Vt, double* Vr) {
+inline void get_data(int counter, Thalamic_Column& Col, double* Vt, double* Vr, double* I_T,
+ double* I_h) {
Vt [counter] = Col.Vt [0];
Vr [counter] = Col.Vr [0];
+ I_T [counter] = -Col.I_T_t (0);
+ I_h [counter] = -Col.I_h (0);
}
/****************************************************************************************************/
/* end */

0 comments on commit 8a73b3f

Please sign in to comment.