From 429e8eb0af7375053f3b438bdd1c60053a3ca3c0 Mon Sep 17 00:00:00 2001 From: Schellenberger Date: Wed, 18 Jun 2014 18:41:40 +0200 Subject: [PATCH] Cleaned up the code. Needs minor parameter fixing for figures. --- Cortical_Column.h | 2 +- Plots.m | 14 +++++++------- Stimulation.h | 6 ++---- TC.cpp | 14 +++++++------- Thalamic_Column.cpp | 3 +-- Thalamic_Column.h | 4 ++-- 6 files changed, 20 insertions(+), 23 deletions(-) diff --git a/Cortical_Column.h b/Cortical_Column.h index ca20ee6..3e94d3b 100644 --- a/Cortical_Column.h +++ b/Cortical_Column.h @@ -152,7 +152,7 @@ class Cortical_Column { const double gamma_i = 58.6E-3; /* Axonal flux time constant */ - const double nu = 120E-3; + const double nu = 60E-3; /* Conductivities in mS/cm^-2 */ /* Leak */ diff --git a/Plots.m b/Plots.m index db96d8f..b20624b 100644 --- a/Plots.m +++ b/Plots.m @@ -17,10 +17,10 @@ function Plots(T) 1.33; % g_KNa 60E-3]; % dphi - Connectivity= [2; % N_et - 2; % N_er - 5; % N_te - 5]; % N_ti + Connectivity= [3; % N_et + 3; % N_er + 15; % N_te + 20]; % N_ti % stimulation parameters % first number is the mode of stimulation @@ -30,9 +30,9 @@ function Plots(T) % 3 == phase dependend down state var_stim = [ 0; % mode of stimulation - 0; % strength of the stimulus in Hz (spikes per second) - 0; % duration of the stimulus in ms - 0; % time between stimuli in s + 30; % strength of the stimulus in Hz (spikes per second) + 50; % duration of the stimulus in ms + 5; % time between stimuli in s 0]; % time until stimuli after min in ms T = 30; % duration of the simulation diff --git a/Stimulation.h b/Stimulation.h index 325806f..12eb22a 100644 --- a/Stimulation.h +++ b/Stimulation.h @@ -195,15 +195,13 @@ class Stim { } private: - - /* Stimulation parameters */ /* Stimulation strength */ double strength = 0.0; /* Duration of the stimulation */ int duration = 500; - /* Inter stimulus intervall in case of periodic stimulation */ + /* Inter-stimulus-interval in case of periodic stimulation */ int ISI = 5E4; /* Threshold for phase dependent stimulation */ @@ -229,7 +227,7 @@ class Stim { /* Minimum found */ bool minimum_found = false; - /* Onset in timesteps to correct the given time of the markers */ + /* Onset in time steps to correct the given time of the markers */ int correction = 10000; /* Counter for stimulation duration */ diff --git a/TC.cpp b/TC.cpp index 0c85b1b..54ae42e 100644 --- a/TC.cpp +++ b/TC.cpp @@ -20,13 +20,13 @@ * THE SOFTWARE. */ -/********************************************************************************************************/ -/* Implementation of the simulation as MATLAB routine (mex compiler) */ -/* mex command is given by: */ -/* mex CXXFLAGS="\$CXXFLAGS -std=gnu++0x -fpermissive" TC.cpp Cortical_Column.cpp Thalamic_Column.cpp */ -/* The Simulation requires the following boost libraries: Preprocessor */ -/* Random */ -/********************************************************************************************************/ +/****************************************************************************************************/ +/* Implementation of the simulation as MATLAB routine (mex compiler) */ +/* mex command is given by: */ +/* mex CXXFLAGS="\$CXXFLAGS -std=c++0x" TC.cpp Cortical_Column.cpp Thalamic_Column.cpp */ +/* The Simulation requires the following boost libraries: Preprocessor */ +/* Random */ +/****************************************************************************************************/ #include #include "mex.h" #include "matrix.h" diff --git a/Thalamic_Column.cpp b/Thalamic_Column.cpp index d26ce64..35acbf5 100644 --- a/Thalamic_Column.cpp +++ b/Thalamic_Column.cpp @@ -249,8 +249,7 @@ void Thalamic_Column::set_RK (int N) { _SWITCH((Ca) (Phi_tt)(Phi_tr)(Phi_rt)(Phi_rr)(phi) (x_tt) (x_tr) (x_rt) (x_rr) (y) - (h_T_t) (h_T_r) - (m_h) (m_h2) (P_h)) + (h_T_t) (h_T_r) (m_h) (m_h2) (P_h)) Vt [N] = dt*(-(I_L_t(N) + I_et(N) + I_it(N))/tau_t - (I_LK_t(N) + I_T_t(N) + I_h(N))); Vr [N] = dt*(-(I_L_r(N) + I_er(N) + I_ir(N))/tau_r - (I_LK_r(N) + I_T_r(N))); Ca [N] = dt*(alpha_Ca * I_T_t(N) - (var_Ca - Ca_0)/tau_Ca); diff --git a/Thalamic_Column.h b/Thalamic_Column.h index 4d5f11e..7458a3e 100644 --- a/Thalamic_Column.h +++ b/Thalamic_Column.h @@ -165,7 +165,7 @@ class Thalamic_Column { const double gamma_i = 58.6E-3; /* axonal flux time constant */ - const double nu = 120E-3; + const double nu = 60E-3; /* Conductivities in mS/cm^-2 */ /* Leak current */ @@ -216,7 +216,7 @@ class Thalamic_Column { /* Noise parameters in ms^-1 */ const double mphi = 0E-3; - const double dphi = 10E-3;; + const double dphi = 20E-3;; double input = 0.0;