lisa_noise.modelled.compute_covariance ====================================== .. py:module:: lisa_noise.modelled.compute_covariance .. autoapi-nested-parse:: TDI-2 XYZ instrument covariance and its composition into a data model. Three layers, each a callable ``model(freq, params) -> (Nf, 3, 3)``: - :class:`TDI2NoiseModel` — the instrument covariance ``C(f, θ)`` (this module); - :class:`~lisa_noise.modelled.response.ConditionedModel` — the filter response and the power aliased by the decimation; - :class:`~lisa_noise.modelled.window.WindowedModel` — the taper convolution. :func:`build_data_model` nests them; the outermost is what the likelihood calls. Classes ------- .. autoapisummary:: lisa_noise.modelled.compute_covariance.TDI2NoiseModel Functions --------- .. autoapisummary:: lisa_noise.modelled.compute_covariance.ltts_at_epochs lisa_noise.modelled.compute_covariance.tdi_kernels lisa_noise.modelled.compute_covariance.build_data_model lisa_noise.modelled.compute_covariance.describe Module Contents --------------- .. py:function:: ltts_at_epochs(data: dict, t0: float, duration: float | None = None, n_epochs: int = 1) -> numpy.ndarray Light travel times ``(n_epochs, 6)`` in segwo link order. One epoch is ``t0``; more are the midpoints of ``n_epochs`` equal slices of ``[t0, t0 + duration]``. ``data`` is the output of ``read_mojito_data``. .. py:function:: tdi_kernels(freq: numpy.ndarray, ltts: numpy.ndarray) -> tuple[numpy.ndarray, numpy.ndarray] The XYZ covariance per unit single-link PSD: ``K_tma, K_oms`` ``(Nf, 3, 3)``. With ``M`` the TDI mixing matrix, ``C = M Σ M†`` where the single-link covariance ``Σ`` is, in fractional-frequency units, - OMS: the identity (independent on the six links); - TMA: 2 on the diagonal, and ``exp(iωL_ji) + exp(−iωL_ij)`` between opposite links, which share their test masses. The kernels are averaged over the epochs of ``ltts`` ``(n_epochs, 6)``: the spectrum of a slowly drifting geometry is the time average. .. py:class:: TDI2NoiseModel(freq: numpy.ndarray, ltts: numpy.ndarray, knots: lisa_noise.modelled.knots.Knots, xp: Any = np) TDI-2 XYZ instrument noise covariance. ``C(f) = S_tma(f) K_tma(f) + S_oms(f) K_oms(f)``, with the two single-link PSDs log10 cubic splines. Everything but the PSDs is fixed at construction, so a call is two small matmuls and two broadcasts. :param freq: Frequencies in Hz, any grid. Beyond the ghost knots the PSDs follow the parametric instrument shape; a DC row (``f = 0``) is zero. :type freq: (Nf,) array :param ltts: Light travel times, see :func:`ltts_at_epochs`. :type ltts: (6,) or (n_epochs, 6) array :param knots: Output of :func:`~lisa_noise.modelled.knots.build_knots`. :type knots: Knots :param xp: ``numpy`` or ``jax.numpy``. :type xp: module, optional .. py:attribute:: ltts .. py:function:: build_data_model(freq: numpy.ndarray, ltts: numpy.ndarray, knots: lisa_noise.modelled.knots.Knots, xp: Any = np, *, processing: dict[str, Any] | None = None, taper: dict[str, Any] | None = None, n_samples: int | None = None, delta_t: float | None = None, method: str = 'patches', patch_tol: float = 1e-05, kernel_tol: float = 1e-10) -> Any The covariance model of the data: instrument, conditioning, taper. The keyword arguments are plain settings, so the same dictionary builds the model for a fit and is stored with the result to rebuild it. :param processing: Filter and decimation applied to the data (:func:`lisa_noise.io.read.read_processing_kwargs`); adds a :class:`~lisa_noise.modelled.response.ConditionedModel`. :type processing: dict, optional :param taper: ``window`` name and ``alpha`` of the taper applied to the data; adds a :class:`~lisa_noise.modelled.window.WindowedModel`. Needs ``n_samples`` and ``delta_t`` of the segment. :type taper: dict, optional :param method: Options of the :class:`~lisa_noise.modelled.window.WindowedModel`. :param patch_tol: Options of the :class:`~lisa_noise.modelled.window.WindowedModel`. :param kernel_tol: Options of the :class:`~lisa_noise.modelled.window.WindowedModel`. .. py:function:: describe(model: Any) -> list[str] Log lines of the wrappers around a model, outermost last.