-
Notifications
You must be signed in to change notification settings - Fork 191
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
Improve docstring of get_neuropixels_sample_shifts
#3620
base: main
Are you sure you want to change the base?
Improve docstring of get_neuropixels_sample_shifts
#3620
Conversation
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.
One question and adding the ticks.
Neuropixels 2.0 probes have 16 cycles. | ||
If None, the num_channels_per_adc is used. | ||
If None, defaults to the value of num_channels_per_adc. |
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.
If None, defaults to the value of num_channels_per_adc. | |
If None, defaults to the value of `num_channels_per_adc`. |
:)
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, will change in the next commit.
@@ -42,10 +50,11 @@ def get_neuropixels_sample_shifts(num_channels=384, num_channels_per_adc=12, num | |||
np.arange(num_channels), 2 | |||
) | |||
|
|||
sample_shifts = np.zeros_like(adc_indices) | |||
sample_shifts = np.zeros_like(adc_indices, dtype=float) |
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.
remind me the benefit of using python float in the case of numpy functions? This just auto scales the dtype between float32 and float64? Could this create float16 that could overflow? I honestly and super rusty on this stuff :)
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 is an alias that will auto scale depending on the OS if I remember well. But now that I think about it, I don't want to introduce a change on behavior on this PR so I am removing this. Thanks for the catch.
I am working on improving the NWB annotation of this property and I took the time to improve the docstring of this function. I also added type hints.