write_synapse_activation_file¶
- 
single_cell_parser.writer.write_synapse_activation_file(fname=None, cell=None, synTypes=None, synDistances=None, synTimes=None, activeSyns=None)¶
- Write out a Synapse activation file. - Used in - compute_synapse_distances_times()to write out a synapse activation file.- The following information is saved: - synapse type: to which presynaptic cell type this synapse belongs to. 
- synapse ID: unique identifier for the synapse. 
- soma distance: distance from the synapse to the soma. 
- section ID: ID of the section of the postsynaptic cell that contains this synapse. 
- section pt ID: ID of the point in the section that contains this synapse. 
- dendrite label: label of the dendrite that contains this synapse. 
- activation times: times at which the synapse was active (ms). 
 - Parameters:¶
- fname : str¶
- The output file name as a ful path, including the file extension. Preferably unique (see e.g. - _evoked_activity()for the generation of unique syapse activation filenames)
- cell : single_cell_parser.cell.Cell¶
- Cell object. 
- synTypes : list¶
- list of synapse types. 
- synDistances : dict¶
- dictionary of synapse distances per synapse type. 
- synTimes : dict¶
- dictionary of synapse activation times per synapse type. Values are a list of the activation times for each synapse within that type. 
- activeSyns : dict¶
- dictionary of active synapses per synapse type. Values are a list of booleans indicating whether each synapse of that type is active. 
 
- Returns:¶
- None. Writes out the synapse activation file to - fname.
 - Example - >>> synTypes = ['cell_type_1'] # 1 synapse type >>> synTimes = {'cell_type_1': [[0.1, 0.2, 0.3], [0.15, 0.25, 0.35], [0.2, 0.3, 0.4]]} # 3 synapses of that type >>> synDistances = {'cell_type_1': [150.0, 200.0, 250.0]} >>> activeSyns = {'cell_type_1': [True, True, True]} # all 3 synapses are active >>> write_synapse_activation_file( ... 'synapse_activation.csv', ... cell, ... synTypes, ... synDistances, ... synTimes, ... activeSyns ... )
Documentation unclear, incomplete, broken or wrong? Let us know