BinPrism uses nested classes. The most basic class is the FourierSeries. This object contains a NumPy array of the zero and positive-indexed components of a Fourier series (the negative-indexed components are derived using complex conjugation). The next class up is the PPD (periodic probability distribution), which is defined by the Fourier coefficients of its log-pdf, expressed as a FourierSeries
instance. PPD
objects also have a MomentCalculator, which is used to calculate circular moments of the distribution. The final, primary class in BinPrism is that of the Profile, which is a PPD
along with a total number of events and a range of times over which the events take place. The fit method creates a Profile
from input binned data using the algorithm described here.
FourierSeries
PPD
MomentCalculator
Profile
Classes for saving and loading profiles
In all examples of methods, NumPy and Matplotlib.pyplot are imported as np
and plt
, respectively.