-
Notifications
You must be signed in to change notification settings - Fork 7
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 _roi_response_denoised to store denoised traces #291
Conversation
@@ -56,7 +56,8 @@ def __init__(self, file_path: PathType): | |||
self.file_path = file_path | |||
self._dataset_file = self._file_extractor_read() | |||
self._roi_response_dff = self._trace_extractor_read("F_dff") | |||
self._roi_response_neuropil = self._trace_extractor_read("C") | |||
self._roi_response_denoised = self._trace_extractor_read("C") | |||
self._roi_response_neuropil = self._trace_extractor_read("b") |
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.
Hi I'm just in here poking around your PR 😄 It looks great 🚀
I think you probably want f
here for neuropil for the trace_extractor()
method (that's the background fluctuations). b
is the background spatial component(s) that would correspond for instance to A
for the neural components. Forgive me if I've misunderstood how things work I'm pretty new to NWB.
I'm thinking it's just a typo (our variable names are awful, b
/f
what do those mean? 😆 ), as f
is what you noted in the original 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.
Thank you so much @EricThomson. I am now trying include the spatial component "b" as well.
For neuroconv #783, I need
|
…stneuro/roiextractors into add_denoised_roi_response
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #291 +/- ##
==========================================
- Coverage 79.35% 79.25% -0.10%
==========================================
Files 39 39
Lines 3071 3100 +29
==========================================
+ Hits 2437 2457 +20
- Misses 634 643 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 on first viewing -- I'll try it out in neuroconv and see if I run into any issues.
I noticed that CaimanSegmentationExtractor doesn't have any dedicated unit tests -- maybe this would be a good time to put that together? I'm still pretty torn about whether we should go for a rolling refactor or an intensive refactor for the testing. @CodyCBakerPhD maybe you can weigh in? Also, perhaps it is time to add a deprecation warning to the |
Note away on vacation until end of next week but I should be able to start looking more then. Very exciting stuff! |
Looks like it's a part of the general roundtrip tests: https://github.com/catalystneuro/roiextractors/blob/main/tests/test_io.py From that perspective, dedicated tests would only be for specific assertions of specific structures unique to Caiman that can't be easily included as params in the generic testing framework
Rolling in small iterative steps is always appreciated for review - for tests as well, there's nothing wrong with keeping the current infrastructure, adding a new one, then remove the old one after the new one is completely done I'd be in favor of a refactor to something akin to the mixin style of NeuroConv interface tests, which allow you to define format-specific tests pretty easily
Yeah, I share the philosophy of SpikeInterface that supporting format-specific writing methods is beyond our scope in this package |
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.
Works well in neuroconv, I think this is good to go.
Denoised calcium traces should be distinguished from raw calcium traces.
See discussion in #287 (comment)
This implementation should also fix #249.
TODO