sportran.plotter.cli.CLIPlotter¶
- class sportran.plotter.cli.CLIPlotter¶
Bases:
sportran.plotter.plotter.Plotter
A Plotter subclass containing the plot functions used by the command-line interface.
- __init__()¶
Methods
__init__
()plot_L0_Pstar
(*[, axis, label, FIGSIZE])Plots L0 as a function of P*.
plot_cepstral_spectrum
(*[, freq_units, ...])Plots the cepstral spectrum.
plot_ck
(*[, axis, label, FIGSIZE])Plots the cepstral coefficients c_K.
plot_cospectrum_component
(idx1, idx2, *[, ...])Plot the (idx1, idx2) component of the cospectrum.
plot_fstar_analysis
(FSTAR_THZ_LIST[, ...])Plots kappa(P*) as a function of the f*.
plot_kappa_Pstar
(*[, axis, label, FIGSIZE, ...])Plots the value of kappa as a function of P*.
plot_periodogram
([PSD_FILTER_W, freq_units, ...])Plots the current's periodogram (psd) :param current: current object to plot periodogram :param PSD_FILTER_W: width of the filtering window :param freq_units: 'thz' [THz] 'red' [omega*DT/(2*pi)] :param freq_scale: rescale red frequencies by this factor (e.g. 2 --> freq = [0, 0.25]) :param axes: matplotlib.axes.Axes object (if None, create one) :param kappa_units: plot periodograms in units of kappa (default: True) - NB: log-psd not converted :param FIGSIZE: size of the plot.
plot_psd
([j2, j2pl, f_THz_max, k_SI_max, ...])plot_resample
(xf[, PSD_FILTER_W, ...])Plots the periodogram of a time series and of a filtered/resampled one for comparison. :param x: a time series object to plot :param xf: a filtered & resampled time series object :param freq_units: 'thz' [THz] 'red' [omega*DT/(2*pi)] :param PSD_FILTER_W: PSD filtering window width [chosen frequency units] :param FIGSIZE: plot figure size.
- plot_L0_Pstar(*, axis=None, label=None, FIGSIZE=None)¶
Plots L0 as a function of P*. :param current: current object to plot :param axis: matplotlib.axes.Axes object (if None, create one) :param label: :param FIGSIZE: size of the plot
- Returns
a matplotlib.axis.Axes object
- plot_cepstral_spectrum(*, freq_units='THz', freq_scale=1.0, axes=None, kappa_units=True, FIGSIZE=None, mode='log', **plot_kwargs)¶
Plots the cepstral spectrum.
- Parameters
current – current object to plot
freq_units – ‘thz’ [THz] ‘red’ [omega*DT/(2*pi)]
freq_scale – rescale red frequencies by this factor (e.g. 2 –> freq = [0, 0.25])
axes – matplotlib.axes.Axes object (if None, create one)
kappa_units – plot periodograms in units of kappa (default: True) - NB: log-psd not converted
FIGSIZE – size of the plot
- Returns
a matplotlib.axes.Axes object
- plot_ck(*, axis=None, label=None, FIGSIZE=None)¶
Plots the cepstral coefficients c_K. :param current: current object to plot :param axis: matplotlib.axes.Axes object (if None, create one) :param label: :param FIGSIZE: size of the plot
- Returns
a matplotlib.axis.Axes object
- plot_cospectrum_component(idx1, idx2, *, axis=None, FIGSIZE=None, f_THz_max=None, k_SI_max=None, k_SI_min=None, k_tick=None, f_tick=None)¶
Plot the (idx1, idx2) component of the cospectrum.
- plot_fstar_analysis(FSTAR_THZ_LIST, original_current=None, *, axes=None, FIGSIZE=None, **plot_kwargs)¶
Plots kappa(P*) as a function of the f*.
- plot_kappa_Pstar(*, axis=None, label=None, FIGSIZE=None, pstar_max=None, kappa_SI_min=None, kappa_SI_max=None, pstar_tick=None, kappa_tick=None)¶
Plots the value of kappa as a function of P*. :param current: current object to plot :param axis: matplotlib.axes.Axes object (if None, create one) :param label: :param FIGSIZE: size of the plot
- Returns
a matplotlib.axes.Axes object
- plot_periodogram(PSD_FILTER_W=None, *, freq_units='THz', freq_scale=1.0, axes=None, kappa_units=True, FIGSIZE=None, mode='log', **plot_kwargs)¶
Plots the current’s periodogram (psd) :param current: current object to plot periodogram :param PSD_FILTER_W: width of the filtering window :param freq_units: ‘thz’ [THz]
‘red’ [omega*DT/(2*pi)]
- Parameters
freq_scale – rescale red frequencies by this factor (e.g. 2 –> freq = [0, 0.25])
axes – matplotlib.axes.Axes object (if None, create one)
kappa_units – plot periodograms in units of kappa (default: True) - NB: log-psd not converted
FIGSIZE – size of the plot
- Returns
a matplotlib.axes.Axes object
- plot_resample(xf, PSD_FILTER_W=None, *, freq_units='THz', axes=None, FIGSIZE=None, mode='log')¶
Plots the periodogram of a time series and of a filtered/resampled one for comparison. :param x: a time series object to plot :param xf: a filtered & resampled time series object :param freq_units: ‘thz’ [THz]
‘red’ [omega*DT/(2*pi)]
- Parameters
PSD_FILTER_W – PSD filtering window width [chosen frequency units]
FIGSIZE – plot figure size
- Returns
xf: a filtered & resampled time series object axes: a matplotlib.axes.Axes object