MultitaperSpectrum¶
Calculate the power spectral density (PSD) of the given data using the Multi-taper method.
This is a high-quality spectral estimator, which averages the spectrum over multiple reweighted ("tapered") windows. The spectrum can be smoothed by increasing the time-halfbandwidth product parameter, which yields a less noisy spectrum. There is also an alternative drop-in replacement for this node, called WelchSpectrum, that uses a different method that is slightly faster to compute but yields somewhat lower-quality spectra. The most common use case for either node is to apply it to segmented data (i.e., following the Segmentation node), which will compute the spectrum for each segment of the data. Another use case is to apply it in an offline fashion on an entire recording (which yields the average power spectrum of that recording). It is not useful to apply this node on streaming data without any buffering or segmentation, because this would try to estimate the spectrum on the very short chunks of data without any averaging across chunks, yielding bad data. Therefore for streaming data, this node should be preceded by the MovingWindow node (or Segmentation). At a technical level, this node will replace the time axis of the data by a frequency axis (since time is averaged out), but it will add a dummy time axis with one entry that is annotated with the average time value of the former time axis (so that that information is not lost). If you need to remove this axis later on, but want to retain that information you can use Fold Into Axis node to include that into some other axis (usually that would be space, i.e., channels). This node accepts both continuous signals and sparse events as its input. More Info... Version 1.2.1
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
half_bandwidth¶
Time-halfbandwidth product parameter of the multi-taper method. Larger values yield smoother spectra, and typical values for segmented data are in the 2-5 range (going to as high as 20). By default, this is used to determine the number of tapers that should be averaged (as 2*time_halfbandwith-1).
- verbose name: Time-Halfbandwith Product
- default value: 2.5
- port type: FloatPort
- value type: float (can be None)
num_tapers¶
Override number of tapers. If the value is not given, then the maximum number of tapers according to the time-halfbandwith parameter is used. If given, more tapers yield smoother spectra.
- verbose name: Override Number Of Tapers
- default value: None
- port type: IntPort
- value type: int (can be None)
nfft¶
FFT Size. Allows for oversampling in the frequency domain for a smoother appearance.
- verbose name: Fft Size (Oversampling)
- default value: None
- port type: IntPort
- value type: int (can be None)
onesided¶
Return one-sided spectrum if the input data is real-valued. For complex data, the spectrum is always two-sided. One may set this to false in order to get data that is formatted the same way as for the complex case, but the extra values are redundant in this case.
- verbose name: Onesided Spectrum For Real-Valued Data
- default value: True
- port type: BoolPort
- value type: bool (can be None)
average_over_time_window¶
If set the computed spectrum is finally averaged over the time windows (an Instance axis introduced by the Shifted Windows node).
- verbose name: Average Over Time Window
- default value: False
- port type: BoolPort
- value type: bool (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)