single_cell_parser
❭ reader
❭ read_synapse_realization
read_synapse_realization¶
- single_cell_parser.reader.read_synapse_realization(fname)¶
Read a .syn file and returns a dictionary of synapse locations.
See also:
.syn for more information on the .syn file format.
write_cell_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. Each synapse location is a tuple of (section ID, section point ID).
- Return type:¶
dict
Example
>>> synapse\_file # Synapse distribution file # corresponding to cell: 86\_C2\_center # Type - section - section.x VPM\_E1 112 0.138046479525 VPM\_E1 130 0.305058053119 VPM\_E1 130 0.190509288017 VPM\_E1 9 0.368760777084 VPM\_E1 110 0.0 VPM\_E1 11 0.120662910562 ... >>> read\_synapse\_realization(synapse\_file) { 'VPM\_E1': [ (112, 0.138046479525), (130, 0.305058053119), (130, 0.190509288017), (9, 0.368760777084), (110, 0.0), (11, 0.120662910562), ... ] }