Loader class for CBGTC results (in respective files)¶
- class analyseur.cbgtc.loader.CommonLoader(full_filepath=' ')[source]¶
This is the parent class for
LoadSpikeTimesandLoadChannelVorG- Instantiated with the full file path
sets atrributes: full_filepath, filename
Contains instance method
get_region_name()
- class analyseur.cbgtc.loader.FetchConnectionList[source]¶
Fetches the connection_lists_i.dat and connection_lists_j.dat from connection_list/.
Methods
Use Cases¶
1. Pre-requisites¶
1.1. Import Modules and Instantiate¶
from analyseur.cbgtc.loader import FetchConnectionList loadST = LoadSpikeTimes("spikes_GPi.csv")
2. Cases¶
2.1. Load file and fetch the connection lists¶
conn_i, self.conn_j = fetch(rootfolder=folder_path, verbose=True)
such that the folder_path is the CBGT data directory whose structure is shown below
. ├── BG/ │ ├── connection_list/ │ │ ├── scale=4_nbchannels=4/ │ │ │ └── model_9/ │ │ └── active_cortex_inputs_scale=4_nbchannels=4/ │ │ └── model_9/ │ └── ... ├── CORTEX/ │ ├── connection_list/ │ │ ├── Thalamus_inputs_nbpops=4/ │ │ └── nbpops=4/ │ └── ... ├── THALAMUS/ │ ├── connection_list/ │ │ ├── nbpops=4/ │ │ ├── BG_inputs_nbpops=4/ │ │ └── active_cortex_inputs_nbpops=4/ │ └── ... ├── ... :
where
terminal folders in connection_list/ contains files connection_lists_i.dat and connection_lists_j.dat
- classmethod bg_to_thalamus(rootfolder=None, verbose=False, nuclei_filter=False)[source]¶
Allows to fetch the synapses connection lists between the basal ganglia and thalamus.
- classmethod cortex_to_bg(rootfolder=None, verbose=False, nuclei_filter=False)[source]¶
Allows to fetch the synapses connection lists between the cortex and basal ganglia.
- classmethod cortex_to_thalamus(rootfolder=None, verbose=False, nuclei_filter=False)[source]¶
Allows to fetch the synapses connection lists between the cortex and thalamus.
- classmethod thalamus_to_cortex(rootfolder=None, verbose=False, nuclei_filter=False)[source]¶
Allows to fetch the synapses connection lists between the thalamus and cortex.
- classmethod within_bg(rootfolder=None, verbose=False, nuclei_filter=False)[source]¶
Allows to fetch the synapses connection lists within basal ganglia.
- class analyseur.cbgtc.loader.LoadChannelIorG(full_filepath=' ')[source]¶
Loads the csv file containing measureables (currents and conductances) mean across the first 400 neurons in a particular nucleus and returns all their measurables in milliseconds by calling
get_measurables().Methods
Argument
Return
no arguments
instantiated with full file path
1-D array with respective measuralble sampled at 1 milliseconds
key value is a array of spike times for respective neuron n<X>
NOTE: Unlike spike times (from
get_spiketimes_superset()) whose time axis is in seconds, the time axis for the measurables is in milliseconds.Use Cases¶
1. Pre-requisites¶
1.1. Import Modules and Instantiate¶
from analyseur.cbgtc.loader import LoadChannelIorG loadIG = LoadChannelIorG("CSN_V_syn_GABAA_1msgrouped_mean_preprocessed4Matlab_SHIFT.csv")
2. Cases¶
2.1. Load file and get the whole spike times¶
I_GABAB_for_CSN = loadIG.get_measurables()
- class analyseur.cbgtc.loader.LoadSpikeTimes(full_filepath=' ')[source]¶
Loads the csv file containing spike times for all the neurons in a particular nucleus and returns all their spike times in seconds by calling
get_spiketimes_superset().Methods
Argument
Return
no arguments
instantiated with full file path
dictionary with keys, n<X> where X ∊ [0, N] ⊂ 𝗭
key value is a array of spike times for respective neuron n<X>
superset (return of
get_spiketimes_superset())“neurons” (“all”, range or list)
dictionary with keys, n<X> where X ∊ neurons
key value is a array of spike times for respective neuron n<X>
Use Cases¶
1. Pre-requisites¶
1.1. Import Modules and Instantiate¶
from analyseur.cbgtc.loader import LoadSpikeTimes loadST = LoadSpikeTimes("spikes_GPi.csv")
2. Cases¶
2.1. Load file and get the whole spike times¶
spiketimes_superset = loadST.get_spiketimes_superset()
2.2. From the whole spike times get a subset; specific range¶
neurons = range(30, 62) # neuron id from "n30" to "n62" spiketimes_subset = LoadSpikeTimes.get_spiketimes_subset(spiketimes_superset, neurons=neurons)
2.3. From the whole spike times get a subset; specific list¶
neurons = [1, 2, 3, 6, 9, 10, 11, 21, 31] # neuron ids "n1", "n2", ..., "n21", "n31" spiketimes_subset = LoadSpikeTimes.get_spiketimes_subset(spiketimes_superset, neurons=neurons)
2.4. From the whole spike times get a subset; first N neurons¶
N = 50 # first 50 neurons regardless of the neuron id spiketimes_subset = LoadSpikeTimes.get_spiketimes_subset(spiketimes_superset, neurons=N)
2.5 Superset and subset are the same¶
spiketimes_subset = LoadSpikeTimes.get_spiketimes_subset(spiketimes_superset, neurons="all")
- static get_spiketimes_subset(spiketimes_superset, window=None, neurons=None)[source]¶
Returns a dictionary containing the spike times (in seconds) of desired neurons.
- Parameters:
spiketimes_superset – Dictionary returned using
get_spiketimes_superset()window – Tuple in the form (start_time, end_time); (0, 10) [default]
neurons –
“all” or scalar or range(a, b) or list of neuron ids like [2, 3, 6, 7]
”all” means subset = superset
N (a scalar) means subset of first N neurons in the superset
range(a, b) or [2, 3, 6, 7] means subset of selected neurons
- Returns:
dictionary