eztaox.kernel_stat2

Second-Order statistic functions for kernels in kernels.quasisep.

Classes

gpStat2

Base class for second-order statistics of GP kernels.

Functions

carma_rms(→ tinygp.helpers.JAXArray)

carma_psd(→ tinygp.helpers.JAXArray)

Return a function that computes CARMA power spectral density (PSD).

carma_acf(→ tinygp.helpers.JAXArray)

Return a function that computes the model autocorrelation function (ACF) of CARMA.

carma_sf(→ tinygp.helpers.JAXArray)

Return a function that computes the CARMA structure function (SF).

Module Contents

class gpStat2(kernel: collections.abc.Callable)[source]

Bases: equinox.Module

Base class for second-order statistics of GP kernels.

Parameters:

kernel (Quasisep) – A kernel function from kernels.quasisep.

kernel_def: collections.abc.Callable[source]
kernel_params: tinygp.helpers.JAXArray[source]
_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.