Permalink
Browse files

More Parameter tuning.

Nice spindles during N2.
Ok N3.

Signed-off-by: Schellenberger <schellenberger@inb.uni-luebeck.de>
  • Loading branch information...
1 parent 7577d89 commit 8ae1ecc127970326c2533b5fc608a00b6ef56bba @miscco committed Nov 25, 2014
Showing with 27 additions and 31 deletions.
  1. +1 −1 Cortical_Column.h
  2. +13 −19 Plots.m
  3. +6 −3 TC.cpp
  4. +1 −1 Thalamic_Column.cpp
  5. +4 −6 Thalamic_Column.h
  6. +2 −1 saves.h
View
@@ -92,7 +92,7 @@ class Cortical_Column {
void add_RK (void);
/* Data storage access */
- friend void get_data (int, Cortical_Column&, Thalamic_Column&, _REPEAT(double*, 3));
+ friend void get_data (int, Cortical_Column&, Thalamic_Column&, _REPEAT(double*, 4));
/* Stimulation protocol access */
friend class Stim;
View
32 Plots.m
@@ -12,38 +12,32 @@ function Plots(type)
1.35; % g_KNa
120E-3]; % dphi
- Param_Thalamus = [0.037; % g_h
- 0.024; % g_LK_t
- 0.024]; % g_LK_r
+ Param_Thalamus = [0.053; % g_h
+ 0.024]; % g_LK
else
- Param_Cortex = [6.; % sigma_e
- 2.1; % g_KNa
+ Param_Cortex = [6.; % sigma_e
+ 2.1; % g_KNa
120E-3]; % dphi
- Param_Thalamus = [0.042; % g_h
- 0.022; % g_LK_t
- 0.022; % g_LK_r
- 2.5; % k1
- 4; % k2
- 1; % k3
- 1]; % k4
+ Param_Thalamus = [0.055; % g_h
+ 0.02]; % g_LK
end
-Connectivity = [ 4; % N_et
- 4; % N_er
+Connectivity = [ 2.5; % N_et
+ 2.5; % N_er
5; % N_te
- 8]; % N_ti
+ 10]; % N_ti
% stimulation parameters
% first number is the mode of stimulation
% 0 == none
% 1 == semi-periodic
% 2 == phase dependend
-var_stim = [ 2; % mode of stimulation
+var_stim = [ 0; % mode of stimulation
80; % strength of the stimulus in Hz (spikes per second)
- 150; % duration of the stimulus in ms
+ 120; % duration of the stimulus in ms
5; % time between stimulation events in s (ISI)
0; % range of ISI in s [ISI-range,ISI+range]
3; % Number of stimuli per event
@@ -52,7 +46,7 @@ function Plots(type)
T = 30; % duration of the simulation
-[Ve, Vt, ah, Marker_Stim] = TC(T, Param_Cortex, Param_Thalamus, Connectivity, var_stim);
+[Ve, Vt, Ca, ah, Marker_Stim] = TC(T, Param_Cortex, Param_Thalamus, Connectivity, var_stim);
L = length(Vt);
timeaxis = linspace(0,T,L);
@@ -93,7 +87,7 @@ function Plots(type)
hx = graph2d.constantline(Marker_Stim/1E2+(i-1)*var_stim(7)/1E3,'ydata', get(gca,'ylim'),'xdata', get(gca,'xlim'), 'color', 'black', 'LineStyle', ':');
changedependvar(hx,'x');
end
-% [Pxx,f] = pwelch(Ve-mean(Ve),hamming(5*L/T), 2*L/T, [], L/T);
+% [Pxx,f] = pwelch(Ve-mean(Ve),hamming(10*L/T), 2*L/T, [], L/T);
% n = find(f<=30, 1, 'last' );
%
% figure(2)
View
9 TC.cpp
@@ -78,11 +78,13 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
/* Create data containers */
mxArray* Ve = SetMexArray(1, T*res/red);
mxArray* Vt = SetMexArray(1, T*res/red);
+ mxArray* Ca = SetMexArray(1, T*res/red);
mxArray* ah = SetMexArray(1, T*res/red);
/* Pointer to the actual data block */
double* Pr_Ve = mxGetPr(Ve);
double* Pr_Vt = mxGetPr(Vt);
+ double* Pr_Ca = mxGetPr(Ca);
double* Pr_ah = mxGetPr(ah);
/* Simulation */
@@ -91,16 +93,17 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
ODE (Cortex, Thalamus);
Stimulation.check_stim(t);
if(t>=onset*res && t%red==0){
- get_data(count, Cortex, Thalamus, Pr_Ve, Pr_Vt, Pr_ah);
+ get_data(count, Cortex, Thalamus, Pr_Ve, Pr_Vt, Pr_Ca, Pr_ah);
++count;
}
}
/* Output of the simulation */
plhs[0] = Ve;
plhs[1] = Vt;
- plhs[2] = ah;
- plhs[3] = Stimulation.get_marker();
+ plhs[2] = Ca;
+ plhs[3] = ah;
+ plhs[4] = Stimulation.get_marker();
return;
}
/****************************************************************************************************/
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;
}
View
@@ -57,9 +57,7 @@ class Thalamic_Column {
/* Constructor for simulation */
Thalamic_Column(double* Param, double* Con)
- : g_LK_t (Param[1]), g_LK_r (Param[2]), g_h (Param[0]),
- k1 (Param[3]*1E7), k2 (Param[4]*1E-4),
- k3 (Param[5]*1E-1), k4 (Param[6]*1E-3),
+ : g_LK_t (Param[1]), g_LK_r (Param[1]), g_h (Param[0]),
N_et (Con[0]), N_er (Con[1])
{set_RNG();}
@@ -116,7 +114,7 @@ class Thalamic_Column {
void add_RK (void);
/* Data storage access */
- friend void get_data (int, Cortical_Column&, Thalamic_Column&, _REPEAT(double*, 3));
+ friend void get_data (int, Cortical_Column&, Thalamic_Column&, _REPEAT(double*, 4));
private:
/* Population variables */
@@ -227,8 +225,8 @@ class Thalamic_Column {
/* Connectivities (dimensionless) */
const double N_tr = 3;
- const double N_rt = 5;
- const double N_rr = 16;
+ const double N_rt = 6;
+ const double N_rr = 19;
const double N_et = 5;
const double N_er = 5;
View
@@ -30,9 +30,10 @@
/****************************************************************************************************/
/* Save data */
/****************************************************************************************************/
-inline void get_data(int counter, Cortical_Column& Cortex, Thalamic_Column& Thalamus, double* Ve, double* Vt, double* ah) {
+inline void get_data(int counter, Cortical_Column& Cortex, Thalamic_Column& Thalamus, double* Ve, double* Vt, double* Ca, double* ah) {
Ve [counter] = Cortex.Ve [0];
Vt [counter] = Thalamus.Vt [0];
+ Ca [counter] = Thalamus.Ca [0];
ah [counter] = Thalamus.act_h ();
}
/****************************************************************************************************/

0 comments on commit 8ae1ecc

Please sign in to comment.