single_cell_parser
❭ reader
❭ read_pruned_synapse_realization
read_pruned_synapse_realization¶
- single_cell_parser.reader.read_pruned_synapse_realization(fname)¶
Read in a .syn and returns a dictionary of synapse locations and whether they are pruned or not.
Pruned synapses are synapses that have been removed from the model. Whether or not they are pruned is indicated by an additional column in the synapse realization file.
See also:
.syn for more information on the .syn file format.
write_pruned_synapse_locations()
for the corresponding writer.
- Parameters:¶
fname (str) – The name of the file to be read.
- Raises:¶
IOError – If the input file does not have a .syn or .SYN suffix.
- Returns:¶
A dictionary with synapse types as keys and lists of synapse locations as values.
- Return type:¶
dict
Example
>>> synapse\_file # Synapse distribution file # corresponding to cell: 86\_C2\_center # Type - section - section.x - pruned VPM\_E1 112 0.138046479525 0 VPM\_E1 130 0.305058053119 0 ... >>> read\_pruned\_synapse\_realization(synapse\_file) { 'VPM\_E1': [ (112, 0.138046479525, 0), (130, 0.305058053119, 0), ... ] }