fafbseg.flywire.locs_to_segments

fafbseg.flywire.locs_to_segments(locs, root_ids=True, dataset='production', coordinates='pixel')[source]

Retrieve flywire segment IDs at given location(s).

Parameters
  • locs (list-like) – Array of x/y/z coordinates.

  • root_ids (bool) – If True, will return root IDs. If False, will return supervoxel IDs.

  • dataset (str | CloudVolume) –

    Against which flywire dataset to query::
    • ”production” (current production dataset, fly_v31)

    • ”sandbox” (i.e. fly_v26)

    Only relevant if root_ids=True.

  • coordinates ("pixel" | "nm") – Units in which your coordinates are in. “pixel” is assumed to be 4x4x40 (x/y/z) nanometers.

Returns

List of segmentation IDs in the same order as locs.

Return type

numpy.array

Examples

>>> from fafbseg import flywire
>>> # Fetch root IDs at two locations
>>> locs = [[133131, 55615, 3289], [132802, 55661, 3289]]
>>> flywire.locs_to_segments(locs)
array([720575940621039145, 720575940621039145])