fafbseg.flywire.locs_to_supervoxels¶
- fafbseg.flywire.locs_to_supervoxels(locs, mip=-1, coordinates='voxel', backend='auto', *, dataset=None)[source]¶
Retrieve 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) – Scale to query. Lower mip = more precise but slower; higher mip = faster but less precise (small supervoxels might not show at all). The default is -1 which will use the highest available mip, -2 will use the second highest mip and so on. For the “cloudvolume” backend this will be mip 0 (i.e. the highest resolution). For “spine” the highest mip may be lower.
coordinates ("voxel" | "nm") – Units in which your coordinates are in. “voxel” is assumed to match the resolution shown in neuroglancer, i.e. 4x4x40nm for FlyWire/FAFB.
backend ("auto" | "spine" | "cloudvolume") – Which backend to use. If “auto”, will use “spine” if available then “cloudvolume”.
dataset ("public" | "production" | "sandbox", optional) – Against which FlyWire dataset to query. If
Nonewill fall back to the default dataset (seeset_default_dataset()).
- 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)