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 power spectral density (PSD). |
|
Return a function that computes 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 (Quasisep) – A kernel function from kernels.quasisep.
- _build_kernel(params: tinygp.helpers.JAXArray | numpy.typing.NDArray) tuple[tinygp.kernels.Kernel, tinygp.helpers.JAXArray][source]
- 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]
- 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 (array) – frequencies.
arparams (array(float)) – AR coefficients.
maparams (array(float)) – MA coefficients
- Returns:
A function that takes in frequencies and returns PSD at the given frequencies.
- 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 that computes the model autocorrelation function (ACF) of CARMA.
- Parameters:
t (array) – times.
arparams (array(float)) – AR coefficients.
maparams (array(float)) – MA coefficients.
- Returns:
A function that takes in time lags and returns ACF at the given lags.
- 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 (array) – times.
arparams (array(float)) – AR coefficients.
maparams (array(float)) – MA coefficients.
- Returns:
A function that takes in time lags and returns CARMA SF at the given lags.