NeurodataWithoutBorders / nwb-schema

Data format specification schema for the NWB neurophysiology data format
http://nwb-schema.readthedocs.io
Other
53 stars 16 forks source link

new neurodata_type: periodogram #272

Open bendichter opened 5 years ago

bendichter commented 5 years ago

I think it would be nice to have a built-in neurodata_type for a periodogram that lives in misc. This would hold datasets with dims with just frequencies or with frequencies x channels:

dims
  - - frequencies
  - - frequencies
    - channels

Like DecompositionSeries, It would also have an optional link to a source_timeseries. It would be able to hold data in analytic amplitude, phase, or power.

tjd2002 commented 5 years ago

Would vote for a less-specific name, like 'Spectrum', or 'PowerSpectrum', since the periodogram is but one method of computing a spectral density estimate: https://en.wikipedia.org/wiki/Spectral_density_estimation

I'm concerned that it may be hard to capture all the parameters that would be needed to specify (in a reasonably complete way) how a spectrum/periodogram was computed from a TimeSeries, since there are many methods to compute a power spectrum, typically having many parameters, and the results are often quite sensitive to the parameters chosen. In this regard it's not so different from the filters used in a DecompositionSeries so maybe this is part of a more general discussion about how NWB should represent the relations between derived datasets--I understand we're not trying to capture the entire compute graph, but just labeling data with 'derived from TimeSeries X' feels somehow inadequate.

bendichter commented 5 years ago

I was thinking this would be a base type that would work for a simple FFT, and would be ideal for users to extend it for more advanced methods like multi-taper, Bartlett's etc that have more parameters. I would be OK with calling this 'Spectrum' if we want to emphasize the ability to extend this beyond simple periodograms.

bendichter commented 5 years ago

@luiztauffer

bendichter commented 5 years ago

@rly any thoughts on this?

rly commented 5 years ago

Sounds good. I would also vote for a less-specific name, like 'Spectrum', or 'PowerSpectrum'. We could come up with specific subtypes and their parameterization as requested/needed.