Measurements
Measurement operators operate on some image X to predict observations Y. Adjoints operate on measurements to return some image.
Note
We use the terms image and pixels in this documentation because the code was originally written for 2D imaging problems. In general, pixels should be taken to mean parameters in the space in which the measurement operator gets applied.
- class measurements.Measurement(ndata, npix)
Base class.
- Parameters
ndata (int) – number of observed data points
npix (int) – number of pixels in image
- forward(X)
Forward modelling from image to observations. Implemented by user in custom child class.
- Parameters
X – image
- Returns
observations
- adjoint(Y)
Adjoint modelling from observations to image. Not necessarily the inverse of
self.forward()
. Implemented by user in custom child class.- Parameters
Y – observations
- Returns
image
- class measurements.Identity(ndata, npix)
Identity measurement operator i.e. what goes in comes out.
- class measurements.PathIntegral(path_matrix)
Path integration using a matrix that describes a set of paths.
Todo
Since this is just a matrix multiplication, can be renamed to something more generic.
- Parameters
path_matrix – \(N_{\mathrm{paths}}\times N_{\mathrm{pix}}\) matrix describing a set of paths.
- class measurements.WeakLensingHarmonic(L, mask=None, ngal=None)
Weak Gravitational Lensing spherical Forward model in spherical harmonic space
- forward(klm)
Spherical weak lensing measurement operator
Args:
klm (complex array): Convergence signal in harmonic space
- adjoint(glm)
Spherical weak lensing adjoint measurement operator
Args:
glm (complex array): Shear Observations in harmonic space
- sks_estimate(glm)
Computes spherical Kaiser-Squires estimator (for first estimate)
Args:
glm (complex array): Shear Observations in harmonic space
- compute_harmonic_kernel()
Compuptes harmonic space kernel mapping.
- harmonic_mapping(flm)
Applys harmonic space mapping.
- Args:
flm (complex array): harmonic coefficients.
- harmonic_inverse_mapping(flm)
Applys harmonic space inverse mapping.
- Args:
flm (complex array): harmonic coefficients.
- class measurements.WeakLensing(L, mask=None, ngal=None)
Weak Gravitational Lensing spherical Forward model in pixel space
- forward(kappa)
Spherical weak lensing measurement operator
Args:
kappa (complex array): Convergence signal
- adjoint(gamma)
Spherical weak lensing adjoint measurement operator
Args:
glm (complex array): Shear Observations in harmonic space
- mask_forward(f)
Applies given mask to a field.
Args:
f (complex array): Realspace Signal
Raises:
ValueError: Raised if signal is nan ValueError: Raised if signal is of incorrect shape.
- mask_adjoint(x)
Applies given mask adjoint to observations
Args:
x (complex array): Set of observations.
Raises:
ValueError: Raised if signal is nan
- ngal_to_inv_cov(ngal)
Converts galaxy number density map to data covariance.
Assumes no correlation between pixels.
- Args:
ngal (real array): pixel space map of number of observations per pixel.
- cov_weight(x)
Applies covariance weighting to observations.
Assumes no correlation between pixels.
- Args:
x (array): pixel space map to be inverse covariance weighted.