eztaox.kernel_stat2#
Second-Order statistic functions for kernels in kernels.quasisep.
Classes#
Base class for second-order statistics of GP kernels. |
Functions#
|
Return a function that computes CARMA root-mean-squared (RMS). |
|
Return a function that computes CARMA power spectral density (PSD). |
|
Return a function to compute the model autocorrelation function (ACF) of CARMA. |
|
Return a function that computes the CARMA structure function (SF). |
Module Contents#
- class gpStat2(kernel: collections.abc.Callable)[source]#
Bases:
equinox.ModuleBase class for second-order statistics of GP kernels.
- Parameters:
kernel (Callable) – A kernel function from kernels.quasisep.
- acf(ts: tinygp.helpers.JAXArray | numpy.typing.NDArray, params: tinygp.helpers.JAXArray | numpy.typing.NDArray | None = None) tinygp.helpers.JAXArray[source]#
Compute the autocorrelation function (ACF) for given time lags.
- Parameters:
ts (JAXArray | NDArray) – Time lags for which to compute the ACF.
params (JAXArray | NDArray | None, optional) – Parameters of the GP kernel if different from those used to initialize the object. Defaults to None.
- Returns:
The computed ACF values for the given time lags.
- Return type:
JAXArray
- sf(ts: tinygp.helpers.JAXArray | numpy.typing.NDArray, params: tinygp.helpers.JAXArray | numpy.typing.NDArray | None = None) tinygp.helpers.JAXArray[source]#
Compute the structure function (SF) for given time lags.
- Parameters:
ts (JAXArray | NDArray) – Time lags for which to compute the SF.
params (JAXArray | NDArray | None, optional) – Parameters of the GP kernel if different from those used to initialize the object. Defaults to None.
- Returns:
The computed SF values for the given time lags.
- Return type:
JAXArray
- psd(fs: tinygp.helpers.JAXArray | numpy.typing.NDArray, params: tinygp.helpers.JAXArray | numpy.typing.NDArray | None = None, df: float | tinygp.helpers.JAXArray | None = 0.01) tinygp.helpers.JAXArray[source]#
Compute the power spectral density (PSD) for given frequencies.
- Parameters:
fs (JAXArray | NDArray) – Frequencies for which to compute the PSD.
params (JAXArray | NDArray | None, optional) – Parameters of the GP kernel if different from those used to initialize the object. Defaults to None.
df (float | JAXArray | None, optional) – Frequency width for create convolved PSDs (not in use). Defaults to 0.01.
- Returns:
The computed PSD values for the given frequencies.
- Return type:
JAXArray
- carma_rms(alpha: tinygp.helpers.JAXArray | numpy.typing.NDArray, beta: tinygp.helpers.JAXArray | numpy.typing.NDArray) tinygp.helpers.JAXArray[source]#
Return a function that computes CARMA root-mean-squared (RMS).
- Parameters:
alpha (JAXArray | NDArray) – kernel alpha coefficients.
beta (JAXArray | NDArray) – kernel beta coefficients
- Returns:
A function that takes in frequencies and returns RMS for the given coefficients.
- Return type:
JAXArray
- carma_psd(f: tinygp.helpers.JAXArray | numpy.typing.NDArray, arparams: tinygp.helpers.JAXArray | numpy.typing.NDArray, maparams: tinygp.helpers.JAXArray | numpy.typing.NDArray) tinygp.helpers.JAXArray[source]#
Return a function that computes CARMA power spectral density (PSD).
- Parameters:
f (JAXArray | NDArray) – frequencies.
arparams (JAXArray | NDArray) – AR coefficients.
maparams (JAXArray | NDArray) – MA coefficients
- Returns:
A function that takes in frequencies and returns PSD at the given frequencies.
- Return type:
JAXArray
- carma_acf(t: tinygp.helpers.JAXArray | numpy.typing.NDArray, arparams: tinygp.helpers.JAXArray | numpy.typing.NDArray, maparams: tinygp.helpers.JAXArray | numpy.typing.NDArray) tinygp.helpers.JAXArray[source]#
Return a function to compute the model autocorrelation function (ACF) of CARMA.
- Parameters:
t (JAXArray | NDArray) – times.
arparams (JAXArray | NDArray) – AR coefficients.
maparams (JAXArray | NDArray) – MA coefficients.
- Returns:
A function that takes in time lags and returns ACF at the given lags.
- Return type:
JAXArray
- carma_sf(t: tinygp.helpers.JAXArray | numpy.typing.NDArray, arparams: tinygp.helpers.JAXArray | numpy.typing.NDArray, maparams: tinygp.helpers.JAXArray | numpy.typing.NDArray) tinygp.helpers.JAXArray[source]#
Return a function that computes the CARMA structure function (SF).
- Parameters:
t (JAXArray | NDArray) – times.
arparams (JAXArray | NDArray) – AR coefficients.
maparams (JAXArray | NDArray) – MA coefficients.
- Returns:
A function that takes in time lags and returns CARMA SF at the given lags.
- Return type:
JAXArray