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

Add a "modality" field to the session model? #134

Open
alexpiet opened this issue Dec 5, 2024 · 1 comment
Open

Add a "modality" field to the session model? #134

alexpiet opened this issue Dec 5, 2024 · 1 comment

Comments

@alexpiet
Copy link

alexpiet commented Dec 5, 2024

The aind watchdog service has a concept of modality: what data types are being recorded for example behavior, video, fiber photometry, ephys, etc.

Does this information belong in the session model?

@bruno-f-cruz
Copy link
Collaborator

Hi!
The aind-data-schema is currently not a dependency of this project and i would like to keep it that way since anyone can use these definitions to derive tasks without use the aind-data-schemas-(models). That being said, I do acknowledge that at some point we need to interact with the existing infrastructure. To achieve that I have been pushing all that code into
https://github.com/AllenNeuralDynamics/Aind.Behavior.ExperimentLauncher.

The modality/watchdog integration, in particular, follows the strategy we discussed previously regarding waterlog-slims by using a aind session schema to instantiate the watchdog manifest (since the schema must know what modalities were used during the session). This means that the only point where Modality must be known is really at the session schema creation. I think this is a fair ask since, currently, in order to upload via watchdog, users are expected to provide a valid session.json anyway.

How to create the session.json is up to the user since it will be largely experiment-specific (as I am sure you are already doing too). For instance, I run this light weight mapper at the end of each session that determines whether video data was acquired or not and appends the modality.

https://github.com/AllenNeuralDynamics/Aind.Behavior.VrForaging/blob/025fe55b450df607dad036b5712c51453e7aedb8/src/DataSchemas/aind_behavior_vr_foraging/data_mappers.py#L177-L183

You could use a similar strategy to check if FIB, Ephys, etc... was also present but checking either the expected data output or even the rig schema instance that spawned the session.

If you feel its necessary to have it at the session level we can talk about wrapping the class that is needed since issues like AllenNeuralDynamics/aind-data-schema#960 (comment) make me a bit nervous adding aind-data-schema and the Modality class as a dependency to this package.

Thanks for the suggestion and lets keep chatting!

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

2 participants