Periodicity

Several methods for analyzing periodicity are included.

Autocorrelation

Autocorrelation is plotted using pandas.plotting.autocorrelation_plot().

traja.plotting.plot_autocorrelation(trj: traja.frame.TrajaDataFrame, coord: str = 'y', unit: str = 'Days', xmax: int = 1000, interactive: bool = True)[source]

Plot autocorrelation of given coordinate.

Parameters:
  • - Trajectory (trj) –
  • - 'x' or 'y' (coord) –
  • - string, eg, 'Days' (unit) –
  • - max xaxis value (xmax) –
  • - Plot immediately (interactive) –
Returns:

Matplotlib Figure

(Source code, png, hires.png, pdf)

_images/periodicity-1.png

Note

Convenience wrapper for pandas autocorrelation_plot().

Periodogram (Power Spectum)

Convenience wrapper for scipy.signal.periodogram().

traja.plotting.plot_periodogram(trj, coord: str = 'y', fs: int = 1, interactive: bool = True)[source]

Plot power spectral density of coord timeseries using a periodogram.

Parameters:
  • - Trajectory (trj) –
  • - choice of 'x' or 'y' (coord) –
  • - Sampling frequency (fs) –
  • - Plot immediately (interactive) –
Returns:

Figure

(Source code)

Note

Convenience wrapper for scipy.signal.periodogram().