The output patch will have one more dimensions than the input patch.
Parameters
Parameter
Description
patch
The input patch
dim
The dimension along which the spectrograms are calculated.
**kwargs
Passed to scipy.signal.spectrogram to control spectrogram options. See its documentation for options.
Examples
import dascore as dcpatch = dc.get_example_patch()# calculate spectrogram along time axistime_spec = patch.spectrogram("time")# note the new dimensionsprint(time_spec.dims)# perform fourier transforms along distance dimensionsdist_spec = patch.spectrogram("distance")