dvid.fetch.get_synapses

dvid.fetch.get_synapses(bodyid, pos_filter=None, with_details=False, server=None, node=None)[source]

Return table of pre- and postsynapses associated with given body.

Parameters
  • bodyid (int | str) – ID of body for which to get synapses.

  • pos_filter (function, optional) – Function to filter synapses by position. Must accept numpy array (N, 3) and return array of [True, False, …]

  • with_details (bool, optional) – If True, will include more detailed information about connector links.

  • server (str, optional) – If not provided, will try reading from global.

  • node (str, optional) – If not provided, will try reading from global.

Return type

pandas.DataFrame

Examples

Get synapses only in the LH (requires navis) >>> import navis >>> lh = navis.Volume(*dvidtools.get_roi(‘LH’)) >>> lh_syn = dvidtools.get_synapses(329566174, … pos_filter=lambda x: navis.in_volume(x, lh))