data_base ❭ db_initializers ❭ synapse_activation_binning ❭ init
init¶
- data_base.db_initializers.synapse_activation_binning.init(db, groupby='', scheduler=None, prefun=prefun, applyfun=applyfun, postfun=postfun, maxtime=400)¶
Main pipeline to bin synapse activations from a Synapse activation dataframe.
- Parameters:¶
db (
ISFDataBase) – The simrun-initialized database object. Must contain the keysynapse\_activation.groupby (str) – Aggregation key for the synapse activation bins. Available values include:
celltypepresynaptic\_columnproximal(soma distance < 500 um)EI(Lumping the EXC / INH celltypes together)binned\_somadist: synapse counts for all 50 micronsany column in the specified dataframe.
Can be a list, if “sub-subgroups” should be calculated.
scheduler (dask scheduler) – A dask scheduler for the comptation (e.g.
dask.distributed.Client.get())prefun (callable) – A function to preprocess the synapse activation dataframe before binning. The function should take a pandas dataframe and return a pandas dataframe. Default:
prefun()applyfun (callable) – A function to bin the synapse activations. The function should take a pandas dataframe and return a numpy array. Default:
applyfun()postfun (callable) – A function to postprocess the binned synapse activations. The function should take a pandas series and return a numpy array. Default:
postfun()
- Returns:¶
None. The binned synapse activation data will be stored in
db.
See also
prefun(),applyfun(), andpostfun()for the default functions that bin the synapse activations.See also
init()for how to simrun-initialize a database.