Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle object mappers #7

Open
sneakers-the-rat opened this issue Aug 8, 2024 · 0 comments
Open

How to handle object mappers #7

sneakers-the-rat opened this issue Aug 8, 2024 · 0 comments

Comments

@sneakers-the-rat
Copy link
Contributor

There is this mysterious attribute electrodes that is in the pynwb NWBFile class mentioned in the various getter/setter methods: https://github.com/NeurodataWithoutBorders/pynwb/blob/379213673cdb4064d5565326622d0dc1ca31d50c/src/pynwb/file.py#L725

But the schema has no such attribute: https://github.com/NeurodataWithoutBorders/nwb-schema/blob/dev/core/nwb.file.yaml

There's NWBFile.extracellular_ephys.electrodes but not just a plain electrodes

Its an ElectrodeTable which also does not exist in the schema: https://github.com/search?q=repo%3ANeurodataWithoutBorders%2Fnwb-schema+ElectrodeTable&type=code

It turns out there is an out of spec mapping between the electrodes attribute and the ecephys.electrodes attribute: https://github.com/NeurodataWithoutBorders/pynwb/blob/379213673cdb4064d5565326622d0dc1ca31d50c/src/pynwb/io/file.py#L74-L77

Thats implemented here:
https://github.com/hdmf-dev/hdmf/blob/a98e5e98cbfb6e824fb57eb5e7eac1dc6cd4532b/src/hdmf/build/objectmapper.py#L92

Do we need to interact with these at all? I dont see why they exist. Main thing to do is figure out if they add any functionality that is actually completely out of spec rather than renaming stuff in the in-memory object for some reason. There is a ton of special casing to handle coercion and whatnot in pynwb that we may or may not need to implement as well, but thats a separate question from "do we need to do anything about the maps"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant