Skip to content
Snippets Groups Projects
Commit 976a9436 authored by Maximilian Schmidt's avatar Maximilian Schmidt
Browse files

Add documentation to scripts

parent ce2f5b00
No related branches found
No related tags found
1 merge request!1Add all necessary files for the multi-area model
Showing with 77 additions and 3 deletions
......@@ -3,6 +3,12 @@ import os
import sys
"""
Compute BOLD signal for a given area from the time series of
population-averaged spike rates of a given simulation using the
neuRosim package of R (see Schmidt et al. 2018 for more details).
"""
data_path = sys.argv[1]
label = sys.argv[2]
area = sys.argv[3]
......
......@@ -6,6 +6,11 @@ import correlation_toolbox.helper as ch
from multiarea_model import MultiAreaModel
import sys
"""
Compute correlation coefficients for a subsample
of neurons for the entire network from raw spike files of a given simulation.
"""
data_path = sys.argv[1]
label = sys.argv[2]
......@@ -31,7 +36,7 @@ M = MultiAreaModel({})
spike_data = {}
cc_dict = {}
for area in ['V1', 'V2', 'FEF']:
for area in M.area_list:
cc_dict[area] = {}
LvR_list = []
N = []
......
......@@ -5,6 +5,11 @@ import numpy as np
import os
import sys
"""
Compute the cross-correlation betwen two given areas from their
time series of population-averaged spike rates of a given simulation.
"""
data_path = sys.argv[1]
label = sys.argv[2]
area1 = sys.argv[3]
......
......@@ -7,6 +7,12 @@ from multiarea_model import MultiAreaModel
from scipy.spatial.distance import pdist
from scipy.spatial.distance import squareform
"""
Compute the functional connectivity between all areas of a given
simulation based on their time series of spiking rates or their
estimated BOLD signal.
"""
data_path = sys.argv[1]
label = sys.argv[2]
method = sys.argv[3]
......
......@@ -9,6 +9,13 @@ from multiarea_model.multiarea_helpers import create_mask
from scipy.stats import levene
from statsmodels.tsa.vector_ar.var_model import VAR
"""
Compute the conditional Granger causality to a given population of an
area based on the population-averaged spike rates from a given
simulation.
"""
data_path = sys.argv[1]
label = sys.argv[2]
area = sys.argv[3]
......
......@@ -8,6 +8,13 @@ import sys
from multiarea_model.multiarea_model import MultiAreaModel
"""
Determines communities in the functional connectivity of either the
experimental fMRI data used in Schmidt et al. 2018 or of a given
simulation (the functional connectivity being based either on spike
rates or an estimated BOLD signal).
"""
data_path = sys.argv[1]
label = sys.argv[2]
method = sys.argv[3]
......
......@@ -6,6 +6,11 @@ from multiarea_model.analysis_helpers import pop_LvR
from multiarea_model import MultiAreaModel
import sys
"""
Compute LvR for the entire network from raw spike
files of a given simulation.
"""
data_path = sys.argv[1]
label = sys.argv[2]
......
......@@ -6,6 +6,11 @@ from multiarea_model.analysis_helpers import pop_rate
from multiarea_model import MultiAreaModel
import sys
"""
Compute stationary spike rates for the entire network from raw spike
files of a given simulation.
"""
data_path = sys.argv[1]
label = sys.argv[2]
......@@ -27,7 +32,7 @@ M = MultiAreaModel({})
spike_data = {}
pop_rates = {}
for area in ['V1', 'V2', 'FEF']:
for area in M.area_list:
pop_rates[area] = {}
rate_list = []
N = []
......
......@@ -6,6 +6,18 @@ from multiarea_model import MultiAreaModel
from multiarea_model.analysis_helpers import centralize
from scipy.signal import welch
"""
Compute the power spectrum time series for a given area of
population-averaged spike rates of a given simulation.
The spike rates can be based on three different methods:
- binned spike histograms on all neurons ('full')
- binned spike histograms on a subsample of 140 neurons ('subsample')
- spike histograms convolved with a Gaussian kernel of optimal width
after Shimazaki et al. (2010)
"""
# Parameters for Welch Power Spectral density and spectrogram
noverlap = 1000
nperseg = 1024
......
......@@ -6,6 +6,12 @@ import sys
from multiarea_model import MultiAreaModel
from multiarea_model.analysis_helpers import pop_rate_distribution
"""
Compute histogram of spike rates over single neurons for a given area
from raw spike files of a given simulation.
"""
assert(len(sys.argv) == 4)
data_path = sys.argv[1]
label = sys.argv[2]
......
......@@ -2,7 +2,6 @@ import json
import neo
import numpy as np
import os
import pandas as pd
import quantities as pq
from multiarea_model.analysis_helpers import pop_rate_time_series
......@@ -10,6 +9,17 @@ from elephant.statistics import instantaneous_rate
from multiarea_model import MultiAreaModel
import sys
"""
Compute time series of population-averaged spike rates for a given
area from raw spike files of a given simulation.
Implements three different methods:
- binned spike histograms on all neurons ('full')
- binned spike histograms on a subsample of 140 neurons ('subsample')
- spike histograms convolved with a Gaussian kernel of optimal width
after Shimazaki et al. (2010)
"""
assert(len(sys.argv) == 5)
data_path = sys.argv[1]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment