-
Notifications
You must be signed in to change notification settings - Fork 2
More fib plus pav updates #293
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
base: dev
Are you sure you want to change the base?
Conversation
Note: this is related to this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes confirmed. Major modality specific functions tested. Bash argparse example usage tested.
Once Saskia et al. give a green light to the (tentative) design of stimulus_epoch
, goo to be merged! (or merge now and later patch-fix)
The original code was mainly designed to be used for CLI/argparse via command-line. I foresee a need to use it as a standalone python function. So, this refactoring introduced the create_unified_session_metadata() while keeping the main() function at the bottom so it can be used for both usecases.
restoring help args for CLI
…dates_patch_kh suggestion for the example code to make it a python function
…euralDynamics/aind-metadata-mapper into more_fib_plus_pav_updates
Comment from Saskia: remove active_mouse_platform and anesthesia as passable params. They are not relevant here. |
@hagikent, I reviewed the session.json that is produced by this code with @saskiad yesterday afternoon. She had a few questions/suggestions. Here's a subset of those that I could use some help from you in answering:
|
Summary of updates:
src/aind_metadata_mapper/pavlovian_behavior/example_create_session.py
src/aind_metadata_mapper/pavlovian_behavior/example_create_session.py
with an example CLI command.src/aind_metadata_mapper/utils/merge_sessions.py
to deal with conflicting reward units. If one session file hasreward_consumed_total = null
, ignore the associated units.stimulus_epochs
field insrc/aind_metadata_mapper/pavlovian_behavior/example_create_session.py
scripts/example_create_fiber_and_pav_sessions.py
to use the default params specified insrc/aind_metadata_mapper/pavlovian_behavior/example_create_session.py
andsrc/aind_metadata_mapper/fib/example_create_session.py
Testing the Session Mapper
To test the session mapper with real data:
First, check out this branch and update your environment:
Then download a session's data. Running the command below in your terminal will download data from one real session from S3 to the
data
folder in the root of this repo (creating the folder if it doesn't already exist):Note that this requires you having AWS credentials saved locally. See the docstring for details.
This will create a directory structure at
data/behavior_694360_2024-01-10_13-43-17/
containing the session's CSV files, which are the input to the session metadata mappers.Then generate the session metadata by running the following at the command line:
The output session JSON will be written to
data/behavior_694360_2024-01-10_13-43-17/session.json
.