-
Notifications
You must be signed in to change notification settings - Fork 4
Add option to save the electrical series in ADC units #140
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: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #140 +/- ##
==========================================
- Coverage 89.53% 89.43% -0.11%
==========================================
Files 13 13
Lines 1711 1722 +11
==========================================
+ Hits 1532 1540 +8
- Misses 179 182 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I am still not convinced this is best to have in general for the lab. We would like to keep data processed as similarly as possible and this would lead to a divergence that, as far as I know, only you are interested in. If there is a truly good reason to save it in ADC units, we should do it universally, but I would want to know the pros and cons of such. |
|
If I remember correctly from a lab meeting when we were writing this package, we determined that the precision lost from converting is less than the noise in the recording. I agree that unless we have a scientific reason for it, having a mix of units between lab files is unnecessary confusion. |
|
|
Those are very reasonable points, and I’m fine with the addition as long as we keep our data consistent.
On Sep 5, 2025, at 10:34 AM, Kyu Hyun Lee ***@***.***> wrote:
This Message Is From an External Sender
This message came from outside your organization.
[https://avatars.githubusercontent.com/u/9277197?s=20&v=4]khl02007 left a comment (LorenFrankLab/trodes_to_nwb#140)<https://urldefense.com/v3/__https://github.com/LorenFrankLab/trodes_to_nwb/pull/140*issuecomment-3259231048__;Iw!!LQC6Cpwp!uOZnYY61EZhG1Qc8C6cvlB8Eg4BObVPovjALj0Y1Wtji1k1ubHBdv_KNc97fXYW7kG1WKNY7622dSl08mnG4fuBbpAM$>
* If this package is to be used by people outside of our lab, I'm pretty sure there are many who would be interested in this feature, because this is the recommended way of doing NWB conversion: keep the data values and conversion factor separate. You can find many examples of this in DANDI. In my own lab (if I ever get to have one in the future) I plan to save the data in ADC units and I'd like to be able to use this package.
* Current practice adds 0.5 microV of noise on average to each sample. This might be small, but it seems strange to add even a small amount of noise to data unnecessarily. Unless we have a scientific reason for it, we shouldn't do this.
* We're not introducing new units here. Converting to physically meaningful unit is a simple matter of multiplying by the conversion factor.
* I'm not saying we should do this for all Frank lab data going forward. Note that this feature is optional. Even if we do make this change for Frank lab data going forward, this won't lead to any divergence. We just have to multiply the electrical series we load by the conversion factor. We probably should do this anyway, since we may want to process NWB files from outside Frank lab. I'm happy to add that line wherever the electrical series is loaded in Spyglass (this happens only for LFP and spike sorting pipelines, and spike sorting pipeline already does this).
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/LorenFrankLab/trodes_to_nwb/pull/140*issuecomment-3259231048__;Iw!!LQC6Cpwp!uOZnYY61EZhG1Qc8C6cvlB8Eg4BObVPovjALj0Y1Wtji1k1ubHBdv_KNc97fXYW7kG1WKNY7622dSl08mnG4fuBbpAM$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABV4PSP6P2E4TL22G7BQHOL3RHCTPAVCNFSM6AAAAACFVSFCSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENJZGIZTCMBUHA__;!!LQC6Cpwp!uOZnYY61EZhG1Qc8C6cvlB8Eg4BObVPovjALj0Y1Wtji1k1ubHBdv_KNc97fXYW7kG1WKNY7622dSl08mnG4xGak84k$>.
You are receiving this because you commented.
|
|
To confirm, keeping our data consistent means this option wouldn't be used for things in the franklab database correct? |
save_as_microvoltsfield in metadata, uses that