You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When querying for structures as ID from coordinates, out of bounds coordinates return 0, but when asking for an acronym, it raises a KeyError value.
Describe the solution you'd like
Add an acronym to the id 0, named for example "OutOfBrain" or whatever.
Describe alternatives you've considered
This can be managed when using the API with a try/catch but I guess it would be nicer if it is handled directly in the bg-atlasapi.
Additional context
Code to reproduce the error :
from bg_atlasapi import BrainGlobeAtlas
atlas = BrainGlobeAtlas("kim_mouse_10um", check_latest=False) # does the same thing with allen_mouse_10um
atlas.structure_from_coords((9386.32578694152, 6137.89857535182, 8869.46676429553), microns=True) # returns 0
atlas.structure_from_coords((9386.32578694152, 6137.89857535182, 8869.46676429553), microns=True, as_acronym=True) # raises KeyError: 0
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When querying for structures as ID from coordinates, out of bounds coordinates return 0, but when asking for an acronym, it raises a KeyError value.
Describe the solution you'd like
Add an acronym to the id 0, named for example "OutOfBrain" or whatever.
Describe alternatives you've considered
This can be managed when using the API with a try/catch but I guess it would be nicer if it is handled directly in the bg-atlasapi.
Additional context
Code to reproduce the error :
The text was updated successfully, but these errors were encountered: