brainglobe / brainglobe-atlasapi

A lightweight python module to interact with atlases for systems neuroscience
https://brainglobe.info/documentation/brainglobe-atlasapi/index.html
BSD 3-Clause "New" or "Revised" License
125 stars 33 forks source link

Return "Outside atlas" rather than key error #299

Closed adamltyson closed 4 months ago

adamltyson commented 4 months ago

Description

What is this PR

Why is this PR needed? 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.

What does this PR do? Rather than a key error, "Outside atlas" is returned

References

Closes #157

How has this PR been tested?

New tests added & checked manually

Is this a breaking change?

Nope

Does this PR require an update to the documentation?

Don't think so

Checklist: