NeurodataWithoutBorders / pynwb

A Python API for working with Neurodata stored in the NWB Format
https://pynwb.readthedocs.io
Other
178 stars 84 forks source link

[Documentation]: Update text describing LFP and FilteredEphys in ecephys tutorial. #2005

Open ehennestad opened 4 days ago

ehennestad commented 4 days ago

What would you like changed or added to the documentation and why?

I am working through the matnwb tutorial and the following seems inaccurate:

About LFP:

LFP data is typically considered processed data because the raw data was filtered and downsampled to generate the LFP.

About FilteredEphys

If the derived data is filtered, but not downsampled, you can store the data in an ElectricalSeries object in a FilteredEphys object instead of a object.

Filtered ephys refers to filtering in general, and does not concern resampling. The schema description seems accurate:

Overview: Electrophysiology data from one or more channels that has been subjected to filtering. Examples of filtered data include Theta and Gamma (LFP has its own interface).

https://nwb-schema.readthedocs.io/en/latest/format.html#filteredephys

Suggestions for new text [edited]

LFP: LFP refers to data that has been low-pass filtered, typically below 300 Hz. This data may also be downsampled. Because it is filtered and potentially resampled, it is categorized as processed data.

FilteredEphys: If your data is filtered for frequency ranges other than LFP—such as Gamma or Theta—you should store it in an ElectricalSeries and encapsulate it within a FilteredEphys object.

@bendichter @stephprince @oruebel Please let me know your opinions

Do you have any interest in helping write or edit the documentation?

Yes.

Code of Conduct

ehennestad commented 4 days ago

From the documentation:

Filter properties should be noted in the ElectricalSeries ‘filtering’ attribute. https://nwb-schema.readthedocs.io/en/latest/format.html#lfp

This seems like a key property that should be highlighted and exemplified in these examples

bendichter commented 4 days ago

Oh yeah good point!

Ben Dichter, PhD Data Science Consultant personal website http://bendichter.com/

On Thu, Nov 21, 2024 at 12:47 PM ehennestad @.***> wrote:

From the documentation:

Filter properties should be noted in the ElectricalSeries ‘filtering’ attribute. https://nwb-schema.readthedocs.io/en/latest/format.html#lfp

This seems like a key property that should be highlighted and exemplified in these examples

— Reply to this email directly, view it on GitHub https://github.com/NeurodataWithoutBorders/pynwb/issues/2005#issuecomment-2490905438, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGOEERCMTOI323MCXGG5WD2BXB5NAVCNFSM6AAAAABSGYUUGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJQHEYDKNBTHA . You are receiving this because you were mentioned.Message ID: @.***>

stephprince commented 4 days ago

If the derived data is filtered, but not downsampled, you can store the data in an ElectricalSeries object in a FilteredEphys object instead of a object.

Filtered ephys refers to filtering in general, and does not concern resampling.

I think you're suggesting we remove the "but not downsampled" statement? If so I agree, in my experience at least theta/gamma filtering is often applied to the downsampled LFP data, and filtered ephys should not concern resampling.

I think demonstrating the filtering attribute is also a good idea!

rly commented 4 days ago

Just to add:

I like @ehennestad 's proposed new text. For FilteredEphys, if it's not clear in the surrounding text, it should be made clear that that is typically also considered processed data...

I also think demonstrating the filtering attribute is a good idea.

ehennestad commented 4 days ago

You can also store multiple filtered time series data in a single DecompositionSeries object

I think the decomposition series is meant for the results of spectral analysis, which is a different operation than filtering

For FilteredEphys, if it's not clear in the surrounding text, it should be made clear that that is typically also considered processed data...

good point!

rly commented 4 days ago

I think the decomposition series is meant for the results of spectral analysis, which is a different operation than filtering

You are right! My mistake.