-
Notifications
You must be signed in to change notification settings - Fork 21
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
[neuralynx] exploit metadata available from neo.neuralynxrawio #170
[neuralynx] exploit metadata available from neo.neuralynxrawio #170
Conversation
…eaders and annotations
for more information, see https://pre-commit.ci
49330fb
to
9d14f6e
Compare
src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py
Outdated
Show resolved
Hide resolved
@JuliaSprenger this looks great! Can you add tests please? |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
This PR will be simplified based on #174 |
The coverage seems to decrease as code lines intended for the next neo version are not covered and test files are not downloaded as they are cached. |
src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py
Outdated
Show resolved
Hide resolved
src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py
Show resolved
Hide resolved
…terface.py Co-authored-by: Heberto Mayorquin <h.mayorquin@gmail.com>
src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py
Outdated
Show resolved
Hide resolved
src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Heberto Mayorquin <h.mayorquin@gmail.com>
Co-authored-by: Heberto Mayorquin <h.mayorquin@gmail.com>
src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py
Outdated
Show resolved
Hide resolved
Thanks for implementing the suggestions above @JuliaSprenger . |
…/neuralynx_metadata
for more information, see https://pre-commit.ci
@JuliaSprenger |
All properties were numpy arrays, but it seems an object (e.g. datetime.datetime objects) or bool dtype is not accepted by nwb. So I added some lines to convert these to a string representation. |
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.
Oh, yes, this is OK, thanks for changing the types, we should accept bools and I will fix that into another PR. One last thing, can you remove the annotation out of the initialization, as I mentioned in our discussion we don't really propagate those.
src/neuroconv/datainterfaces/ecephys/neuralynx/neuralynxdatainterface.py
Show resolved
Hide resolved
…/neuralynx_metadata
Codecov Report
@@ Coverage Diff @@
## main #170 +/- ##
==========================================
- Coverage 91.63% 90.76% -0.88%
==========================================
Files 65 65
Lines 3409 3423 +14
==========================================
- Hits 3124 3107 -17
- Misses 285 316 +31
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.
Thanks for all the hard work.
"DSPLowCutFilterEnabled": "True", | ||
"DspLowCutFrequency": "10", | ||
"DspLowCutNumTaps": "0", | ||
"DspLowCutFilterType": "DCO", | ||
"DSPHighCutFilterEnabled": "True", | ||
"DspHighCutFrequency": "9000", | ||
"DspHighCutNumTaps": "64", | ||
"DspHighCutFilterType": "FIR", | ||
"DspDelayCompensation": "Enabled", |
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.
@JuliaSprenger It looks like there are int and bool values here there encoded as strings. Is there a reason for that?
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.
For export of these properties we need to convert bool values to strings, as we otherwise get an error in nwb (see #185 first checkpoint).
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.
the electrodes table should be able to handle ints and bools with no problem. What's the error in NWB?
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.
It's not an error with NWB, it's an error with channel properties that are bool which are then used in our add_electrodes
function (see #185) which doesn't have a default type set for that class, which is something needed when writing multiple recording objects (not all of which have that same boolean channel property)
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.
The float
and int
values here shouldn't have to be strings though
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.
OK, well we can change the bools to uint8 that's almost as good
Exploit metadata available from neo NeuralynxIO file headers and annotations. This PR is an update of catalystneuro/nwb-conversion-tools#596
Contributes to #43
Motivation
Recent versions of Neo provide access to header metadata from recording files. There is no need to re-read and interpret the headers twice.
Checklist
fix #XXX
whereXXX
is the issue number?