fafbseg.flywire.locs_to_supervoxels¶
- fafbseg.flywire.locs_to_supervoxels(locs, mip=2, coordinates='voxel', backend='spine')[source]¶
Retrieve FlyWire supervoxel IDs at given location(s).
- Parameters:
locs (list-like | pandas.DataFrame) – Array of x/y/z coordinates. If DataFrame must contain ‘x’, ‘y’, ‘z’ or ‘fw.x’, ‘fw.y’, ‘fw.z’ columns. If both present, ‘fw.’ columns take precedence!
mip (int [2-8]) – Scale to query. Lower mip = more precise but slower; higher mip = faster but less precise (small supervoxels might not show at all).
coordinates ("voxel" | "nm") – Units in which your coordinates are in. “voxel” is assumed to be 4x4x40 (x/y/z) nanometers.
backend ("spine" | "cloudvolume") – Which backend to use. Use “cloudvolume” only when spine doesn’t work.
- Returns:
List of segmentation IDs in the same order as
locs
. Invalid locations will be returned with ID 0.- Return type:
numpy.array
See also
locs_to_segments()
Takes locations and returns root IDs. Can also map to a specific time or materialization.
Examples
>>> from fafbseg import flywire >>> # Fetch supervoxel at two locations >>> locs = [[133131, 55615, 3289], [132802, 55661, 3289]] >>> flywire.locs_to_supervoxels(locs) array([79801454835332154, 79731086091150780], dtype=uint64)