Permalink
Browse files

General code cleanup.

Updated the license.
Removed dependency on boost libraries
  • Loading branch information...
1 parent f3c245c commit baf0818649b1f19cc616014df3f52a9db56800bd @miscco committed Dec 29, 2015
Showing with 86 additions and 34 deletions.
  1. +9 −1 Data_Storage.h
  2. +28 −24 Random_Stream.h
  3. +9 −1 Stimulation.h
  4. +11 −3 Thalamic_Column.cpp
  5. +10 −2 Thalamic_Column.h
  6. +9 −1 Thalamus.cpp
  7. +10 −2 Thalamus_mex.cpp
View
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2014 Michael Schellenberger Costa
+* Copyright (c) 2015 Michael Schellenberger Costa
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -18,6 +18,14 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
+*
+* AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com
+*
+* Based on: A thalamocortical neural mass model of the EEG during NREM sleep and its response
+* to auditory stimulation.
+* M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born,
+* T Martinetz, JC Claussen.
+* PLoS Compuational Biology (in review)
*/
/****************************************************************************************************/
View
@@ -1,28 +1,32 @@
/*
- * Copyright (c) 2015 University of Lübeck
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- * AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com
- * Stefanie Gareis: gareis@inb.uni-luebeck.de
- *
- */
+* Copyright (c) 2015 Michael Schellenberger Costa
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the "Software"), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+* THE SOFTWARE.
+*
+* AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com
+*
+* Based on: A thalamocortical neural mass model of the EEG during NREM sleep and its response
+* to auditory stimulation.
+* M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born,
+* T Martinetz, JC Claussen.
+* PLoS Compuational Biology (in review)
+*/
/****************************************************************************************************/
/* Random number streams */
View
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2014 Michael Schellenberger Costa
+* Copyright (c) 2015 Michael Schellenberger Costa
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -18,6 +18,14 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
+*
+* AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com
+*
+* Based on: A thalamocortical neural mass model of the EEG during NREM sleep and its response
+* to auditory stimulation.
+* M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born,
+* T Martinetz, JC Claussen.
+* PLoS Compuational Biology (in review)
*/
/****************************************************************************************************/
View
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2014 Michael Schellenberger Costa
+* Copyright (c) 2015 Michael Schellenberger Costa
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -18,6 +18,14 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
+*
+* AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com
+*
+* Based on: A thalamocortical neural mass model of the EEG during NREM sleep and its response
+* to auditory stimulation.
+* M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born,
+* T Martinetz, JC Claussen.
+* PLoS Compuational Biology (in review)
*/
/****************************************************************************************************/
@@ -265,8 +273,8 @@ void Thalamic_Column::set_RK (int N) {
y_rr [N+1] = y_rr [0] + A[N]*dt*(x_rr[N]);
x_et [N+1] = x_et [0] + A[N]*dt*(pow(gamma_e, 2) * ( - y_et[N]) - 2 * gamma_e * x_et[N]) + noise_xRK(N,0);
x_er [N+1] = x_er [0] + A[N]*dt*(pow(gamma_e, 2) * (N_tr * get_Qt(N) - y_er[N]) - 2 * gamma_e * x_er[N]);
- x_rt [N+1] = x_rt [0] + A[N]*dt*(pow(gamma_i, 2) * (N_rt * get_Qr(N) - y_rt[N]) - 2 * gamma_i * x_rt[N]);
- x_rr [N+1] = x_rr [0] + A[N]*dt*(pow(gamma_i, 2) * (N_rr * get_Qr(N) - y_rr[N]) - 2 * gamma_i * x_rr[N]);
+ x_rt [N+1] = x_rt [0] + A[N]*dt*(pow(gamma_r, 2) * (N_rt * get_Qr(N) - y_rt[N]) - 2 * gamma_r * x_rt[N]);
+ x_rr [N+1] = x_rr [0] + A[N]*dt*(pow(gamma_r, 2) * (N_rr * get_Qr(N) - y_rr[N]) - 2 * gamma_r * x_rr[N]);
}
/****************************************************************************************************/
/* end */
View
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2014 Michael Schellenberger Costa
+* Copyright (c) 2015 Michael Schellenberger Costa
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -18,6 +18,14 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
+*
+* AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com
+*
+* Based on: A thalamocortical neural mass model of the EEG during NREM sleep and its response
+* to auditory stimulation.
+* M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born,
+* T Martinetz, JC Claussen.
+* PLoS Compuational Biology (in review)
*/
/************************************************************************************************/
@@ -152,7 +160,7 @@ class Thalamic_Column {
/* PSP rise time in ms^-1 */
const double gamma_e = 70E-3;
- const double gamma_i = 100E-3;
+ const double gamma_r = 100E-3;
/* Conductivities in mS/cm^-2 */
/* Leak current */
View
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2014 Michael Schellenberger Costa
+* Copyright (c) 2015 Michael Schellenberger Costa
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -18,6 +18,14 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
+*
+* AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com
+*
+* Based on: A thalamocortical neural mass model of the EEG during NREM sleep and its response
+* to auditory stimulation.
+* M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born,
+* T Martinetz, JC Claussen.
+* PLoS Compuational Biology (in review)
*/
/****************************************************************************************************/
View
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2014 Michael Schellenberger Costa
+* Copyright (c) 2015 Michael Schellenberger Costa
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -18,12 +18,20 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
+*
+* AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com
+*
+* Based on: A thalamocortical neural mass model of the EEG during NREM sleep and its response
+* to auditory stimulation.
+* M Schellenberger Costa, A Weigenand, H-VV Ngo, L Marshall, J Born,
+* T Martinetz, JC Claussen.
+* PLoS Compuational Biology (in review)
*/
/****************************************************************************************************/
/* Implementation of the simulation as MATLAB routine (mex compiler) */
/* mex command is given by: */
-/* mex CXXFLAGS="\$CXXFLAGS -std=gnu++0x -fpermissive" Thalamus_mew.cpp Thalamic_Column.cpp */
+/* mex CXXFLAGS="\$CXXFLAGS -std=gnu++0x -fpermissive" Thalamus_mex.cpp Thalamic_Column.cpp */
/****************************************************************************************************/
#include "mex.h"
#include "matrix.h"

0 comments on commit baf0818

Please sign in to comment.