Skip to content
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

Record sampling rate as part of the Electrical series #1421

Open
pickles-bread-and-butter opened this issue Mar 11, 2020 · 2 comments
Open
Labels
braintv relates to Insitute BrainTV program NWB Issues related to NWB files

Comments

@pickles-bread-and-butter
Copy link
Contributor

pickles-bread-and-butter commented Mar 11, 2020

This attribute is really a feature of the voltage measurements themselves. Also, it is possible for a probe to collect data at varying sampling rates.

- name: sampling_rate
dtype: float64
doc: the sampling rate at which data were acquired on this probe's channels

Split off from: #1330

@njmei
Copy link
Contributor

njmei commented May 4, 2020

Hi, @rly @bendichter,

I tried implementing this suggestion, but it looks like ElectricalSeries does not allow both rate and timestamps to be defined at the same time. It looks like the error is being raised by:

https://github.com/NeurodataWithoutBorders/pynwb/blob/78ded2eb46d47a8dc400172fbbf97e0be4dbf7aa/src/pynwb/base.py#L146

We would like to store information about the lfp sampling rate without having to re-calculate that sampling rate from the LFP ElectricalSeries timestamps.

@bendichter
Copy link
Contributor

@njmei We recommend storing data with a constant sampling rate using the starting_time and rate. I agree that it is cumbersome to calculate timestamps on the fly. I maintain this helper function to do this when I need to. We have discussed adding this type of functionality to pynwb or hdmf here. Right now, nothing exists within the current APIs for computing this on the fly. If you really need to store timestamps that would be permissible by NWB- it just would not be what we recommend.

If you can apply compression, that would help somewhat by making the timestamps should be very small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
braintv relates to Insitute BrainTV program NWB Issues related to NWB files
Projects
None yet
Development

No branches or pull requests

4 participants