-
Notifications
You must be signed in to change notification settings - Fork 4
Implement addition of optogenetic metadata #118
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
==========================================
+ Coverage 89.32% 89.50% +0.17%
==========================================
Files 12 13 +1
Lines 1471 1686 +215
==========================================
+ Hits 1314 1509 +195
- Misses 157 177 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
This PR adds support for ingesting and converting optogenetic metadata into the NWB export pipeline by generalizing “probe_metadata” to “device_metadata”, introducing a new convert_optogenetics module, and providing sample/test YAMLs and device metadata files.
- Renamed and extended metadata loading to handle multiple device types (probes, viruses, fibers, light sources).
- Added
convert_optogeneticsto parse and inject optogenetic devices, injections, fibers, and stimulation epochs. - Introduced test fixtures (
fsgui_*.yaml,geometry.trackgeometry), updated sample metadata, and new unit tests for optogenetics.
Reviewed Changes
Copilot reviewed 19 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/trodes_to_nwb/convert.py | Swapped probe → device metadata paths, hooked in add_optogenetics |
| src/trodes_to_nwb/convert_optogenetics.py | New module: builds optogenetic devices, fibers, viruses, epochs |
| src/trodes_to_nwb/tests/test_convert_optogenetics.py | Unit tests validating optogenetic device and epoch creation |
| src/trodes_to_nwb/tests/test_data/fsgui_theta_trigger.yaml | FS GUI YAML for theta-triggered optogenetic epochs |
| src/trodes_to_nwb/tests/test_data/20230622_sample_metadata.yml | Added virus_injection, opto_excitation_source, optical_fiber, FS‐GUI YAML refs |
Comments suppressed due to low confidence (2)
src/trodes_to_nwb/tests/test_data/fsgui_theta_trigger.yaml:1
- The list items under
nodes:are not indented, which will produce invalid YAML. Prefix each item with two spaces before-(e.g.,- type_id: ...).
nodes:
src/trodes_to_nwb/tests/test_data/20230622_sample_metadata.yml:656
- Inconsistent key casing: you have both
volume_in_uLandvolume_in_ul. Standardize to a single key (e.g.,volume_in_uL) to avoid lookup errors.
volume_in_ul: 100.0
edeno
left a comment
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.
Looks good to me.
I had a couple questions:
- What happens if an old user has an old yaml and uses the new version of
trodes_to_nwb. - Where does someone go to find documentation about the different opto objects and what they correspond to?
edeno
left a comment
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.
Err actually the docstrings are in the google format and not the numpy docstring style. Would be nice to be consistent.
|
I think the new |
Fixes #110
Related PR's:
To Do: