-
Notifications
You must be signed in to change notification settings - Fork 4
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
Congruence np1e Offset #195
Comments
Hey @RobertoDF, good question. The spikeinterface docs scales data in the following manner: gain = 0.1
offset = -(2 ** (10 - 1)) * gain
recording.set_channel_gains(gain)
recording.set_channel_offsets(offset) In the example script we provide, we scale data using if gain_to_uV is not None:
self.set_channel_gains(gain_to_uV)
if offset_to_uV is not None:
self.set_channel_offsets(offset_to_uV) Also, if I'm interpreting spikeinterface's code correctly, this line suggests that offset subtraction seems to be applied after gain multiplication (Python follows PEMDAS order of operations). Have you plotted the traces? I ran this on some test data and the traces seem centered around zero. I want to make sure it does on your end as well in case I'm overlooking something. Also, you can change |
It should be 3.05176. Thanks for the heads up. |
And np1e ? 1.2e6 / (2 ** bit_depth) / ap_gain or 512? |
The first one. I laid out my reasoning here. In any case, please plot your data, confirm it's centered around zero, and let me know how it goes. |
I am still a bit puzzled that after the offset the mean is not at 0 but my original question regarding which was the correct answer was answered. |
Ground is connected to Ref like in the pic 👍. I was in external REF |
Hi,
I have a doubt abt the offset to apply to the recordings with np1e.
in https://open-ephys.github.io/bonsai-onix1-docs/articles/getting-started/reference.html#fn:1 offset is fixed at 512, however in the load data script it is set dynamically depending on the value of the scaling (itself dependent on the Gain applied):
Which one is right?
Thanks!
R
The text was updated successfully, but these errors were encountered: