sportran.plotter.plotter¶
Defines an (abstract) Plotter class and all the plot functions that its subclasses can import.
Functions
|
|
|
Plots L0 as a function of P*. |
|
Plots the cepstral spectrum. |
|
Plots the cepstral coefficients c_K. |
|
Plot the (idx1, idx2) component of the cospectrum. |
|
Plots kappa(P*) as a function of the f*. |
|
Plots the value of kappa as a function of P*. |
|
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. |
|
|
|
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 the time series. |
Classes
|
Plotter abstract class. |
- sportran.plotter.plotter.addPlotToPdf(func, pdf, *args, **kwargs)¶
- sportran.plotter.plotter.plot_L0_Pstar(current, *, 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
- sportran.plotter.plotter.plot_cepstral_spectrum(current, *, 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
- sportran.plotter.plotter.plot_ck(current, *, 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
- sportran.plotter.plotter.plot_cospectrum_component(current, 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.
- sportran.plotter.plotter.plot_fstar_analysis(currents, FSTAR_THZ_LIST, original_current=None, *, axes=None, FIGSIZE=None, **plot_kwargs)¶
Plots kappa(P*) as a function of the f*.
- sportran.plotter.plotter.plot_kappa_Pstar(current, *, 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
- sportran.plotter.plotter.plot_periodogram(current, 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
- sportran.plotter.plotter.plot_psd(jf, j2=None, j2pl=None, f_THz_max=None, k_SI_max=None, k_tick=None, f_tick=None)¶
- sportran.plotter.plotter.plot_resample(x, 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
- sportran.plotter.plotter.plot_trajectory(x, *, axis=None, FIGSIZE=None, **plot_kwargs)¶
Plot the time series.