firecrown.data_types
This module deals with data types.
This module contains data types definitions.
Classes
Class defining the data for a two-point measurement. |
|
Wrapper for a np.ndarray that represents some observed data values. |
|
Wrapper for an np.ndarray that represents a prediction by some theory. |
Functions
|
Return a bare np.ndarray with the difference between data and theory. |
Module Contents
- class firecrown.data_types.TwoPointMeasurement[source]
Bases:
firecrown.utils.YAMLSerializable
Class defining the data for a two-point measurement.
The class used to store the data for a two-point function measured on a sphere.
This includes the measured two-point function, their indices in the covariance matrix and the name of the covariance matrix. The corresponding metadata is also stored.
- data: numpy.typing.NDArray[numpy.float64]
- indices: numpy.typing.NDArray[numpy.int64]
- covariance_name: str
- class firecrown.data_types.DataVector[source]
Bases:
numpy.typing.NDArray[numpy.float64]
Wrapper for a np.ndarray that represents some observed data values.
- classmethod create(vals)[source]
Create a DataVector that wraps a copy of the given array vals.
- Parameters:
vals (numpy.typing.NDArray[numpy.float64]) – the array to be copied and wrapped
- Returns:
a new DataVector
- Return type:
- class firecrown.data_types.TheoryVector[source]
Bases:
numpy.typing.NDArray[numpy.float64]
Wrapper for an np.ndarray that represents a prediction by some theory.
- classmethod create(vals)[source]
Create a TheoryVector that wraps a copy of the given array vals.
- Parameters:
vals (numpy.typing.NDArray[numpy.float64]) – the array to be copied and wrapped
- Returns:
a new TheoryVector
- Return type:
- firecrown.data_types.residuals(data, theory)[source]
Return a bare np.ndarray with the difference between data and theory.
This is to be preferred to using arithmetic on the vectors directly.
- Parameters:
data (DataVector)
theory (TheoryVector)
- Return type:
numpy.typing.NDArray[numpy.float64]