neurodsp.plts.combined.plot_timeseries_and_spectra

neurodsp.plts.combined.plot_timeseries_and_spectra(sigs, fs, ts_range=None, f_range=None, times=None, start_val=0.0, spectrum_kwargs=None, ts_kwargs=None, psd_kwargs=None, **plt_kwargs)[source]

Plot timeseries together with their associated power spectra.

Parameters:
sigs1d or 2d array

Time series to plot.

fsfloat

Sampling rate, in Hz.

ts_rangelist of [float, float], optional

The time range to restrict the time series to. For visualization only - the power spectrum is computed over the entire time series.

f_rangelist of [float, float], optional

The frequency range to restrict the power spectrum to.

times1d, optional

Time definition for the time series to be plotted. If not provided, times are recomputed from signal length and sampling rate.

start_valfloat, optional, default: 0.

The starting value for the time definition for the time series. Only used if times is not provided.

spectrum_kwargsdict, optional

Keyword arguments for computing the power spectrum. See compute_spectrum for details.

ts_kwargsdict, optional

Keyword arguments for customizing the time series plot.

psd_kwargsdict, optional

Keyword arguments for customizing the power spectrum plot.

**plt_kwargs

Keyword arguments for customizing the plots. These arguments are passed to both plot axes. Plot layout can be edited with: [‘gap’, ‘height’, ‘bottom’, ‘ts_width’, ‘psd_width’].