Permalink
Browse files
Small bugfixes and cleanup.
- Loading branch information...
Showing
with
15 additions
and
11 deletions.
-
+1
−1
Plots.m
-
+1
−1
Stimulation.h
-
+4
−4
Thalamic_Column.cpp
-
+3
−0
Thalamic_Column.h
-
+4
−3
Thalamus.cpp
-
+2
−2
parameters.h
|
|
@@ -1,5 +1,5 @@ |
|
|
% mex command is given by:
|
|
|
-% mex CXXFLAGS="\$CXXFLAGS -std=gnu++0x -fpermissive" Thalamus.cpp Thalamic_Colum.cpp
|
|
|
+% mex CXXFLAGS="\$CXXFLAGS -std=gnu++0x -fpermissive" Thalamus.cpp Thalamic_Column.cpp
|
|
|
|
|
|
function Plots(T, onset)
|
|
|
|
|
|
|
|
|
@@ -69,7 +69,7 @@ class Stim { |
|
|
// stimulation strength
|
|
|
double strength = 0.0;
|
|
|
|
|
|
- // inter stimulus intervall
|
|
|
+ // inter stimulus interval
|
|
|
int ISI = 0;
|
|
|
|
|
|
// onset until stimulation starts
|
|
|
|
|
|
@@ -51,27 +51,27 @@ double Thalamic_Column::get_Qr (int N) const{ |
|
|
// excitatory input to TC population
|
|
|
double Thalamic_Column::I_et (int N) const{
|
|
|
_SWITCH((Vt)(Phi_tt))
|
|
|
- double psi = g_AMPA * var_Phi_tt * (var_Vt - V_rev_e);
|
|
|
+ double psi = g_AMPA * var_Phi_tt * (var_Vt - E_AMPA);
|
|
|
return psi;
|
|
|
}
|
|
|
|
|
|
// inhibitory input to TC population
|
|
|
double Thalamic_Column::I_it (int N) const{
|
|
|
_SWITCH((Vt)(Phi_rt))
|
|
|
- double psi = g_GABA * var_Phi_rt * (var_Vt - V_rev_i);
|
|
|
+ double psi = g_GABA * var_Phi_rt * (var_Vt - E_GABA);
|
|
|
return psi;
|
|
|
}
|
|
|
// excitatory input to RE population
|
|
|
double Thalamic_Column::I_er (int N) const{
|
|
|
_SWITCH((Vr)(Phi_tr))
|
|
|
- double psi = g_AMPA * var_Phi_tr * (var_Vr - V_rev_e);
|
|
|
+ double psi = g_AMPA * var_Phi_tr * (var_Vr - E_AMPA);
|
|
|
return psi;
|
|
|
}
|
|
|
|
|
|
// inhibitory input to RE population
|
|
|
double Thalamic_Column::I_ir (int N) const{
|
|
|
_SWITCH((Vr)(Phi_rr))
|
|
|
- double psi = g_GABA * var_Phi_rr * (var_Vr - V_rev_i);
|
|
|
+ double psi = g_GABA * var_Phi_rr * (var_Vr - E_GABA);
|
|
|
return psi;
|
|
|
}
|
|
|
/****************************************************************************************************/
|
|
|
|
|
|
@@ -50,6 +50,9 @@ class Thalamic_Column { |
|
|
// Initialize the RNGs
|
|
|
void set_RNG (void);
|
|
|
|
|
|
+ // change the strength of input
|
|
|
+ void set_input (double I) {input = I;}
|
|
|
+
|
|
|
// Firing rates
|
|
|
double get_Qt (int) const;
|
|
|
double get_Qr (int) const;
|
|
|
|
|
|
@@ -37,14 +37,15 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { |
|
|
|
|
|
// Fetch inputs
|
|
|
const int T = (int) (mxGetScalar(prhs[0]));
|
|
|
- double* Connectivity = mxGetPr (prhs[1]);
|
|
|
+ const int Time = (T+onset)*res;
|
|
|
+ double* Param_Thalamus = mxGetPr (prhs[1]);
|
|
|
double* var_stim = mxGetPr (prhs[2]);
|
|
|
|
|
|
// Initializing the populations;
|
|
|
- Thalamic_Column Thalamus(Connectivity);
|
|
|
+ Thalamic_Column Thalamus(Param_Thalamus);
|
|
|
|
|
|
// Initialize the stimulation protocol
|
|
|
- Stim Stimulation(Thalamus, Var_Stim);
|
|
|
+ Stim Stimulation(Thalamus, var_stim);
|
|
|
|
|
|
// setting up the data containers
|
|
|
mxArray* Vt = SetMexArray(1, T*red);
|
|
|
|
|
|
@@ -78,8 +78,8 @@ |
|
|
/* reversal potentials */
|
|
|
/****************************************************************************************************/
|
|
|
// synaptic inputs in mV
|
|
|
-#define V_rev_e 0
|
|
|
-#define V_rev_i -70
|
|
|
+#define E_AMPA 0
|
|
|
+#define E_GABA -70
|
|
|
|
|
|
// Leak current
|
|
|
#define E_L_t -70
|
|
|
|
0 comments on commit
3e69e68