class darkmappy.estimators.DarkMappyPlane(n, data=None, mask=None, ngal=None, viewer=None, wav=['db6'], levels=4, supersample=1, psi=None, constrained=True)

Frontend class which handles dark matter reconstruction.

This class currently supports the planar lensing forward model, a selection of sparsity priors, for Gaussian and Poissonian noise models.

__init__(n, data=None, mask=None, ngal=None, viewer=None, wav=['db6'], levels=4, supersample=1, psi=None, constrained=True)

Construct class to create and hold the MAP estimator

Parameters
  • n (int) – Pixel count along each axis (square image)

  • data (complex array) – Pixelised map of shear observations.

  • mask (int array) – Map of realspace masking.

  • ngal (int array) – Map of galaxy observation count.

  • wavs (list) – Wavelet dictionaries to use.

  • levels (int) – Number of levels within each wavelet dictionary.

  • supersample (float) – Amount of supersampling.

  • psi (linear operator) – Sparsifying dictionary.

  • constrained (boolean) – Constrained or unconstrained optimisation

Raises
  • ValueError – Raised if n is not positive.

  • ValueError – Raised if mask is the wrong shape.

  • ValueError – Raised if no data provided.

  • WarningLog – Raised if no galaxy number density map provided.

  • WarningLog – Raised if no masking map provided.

  • WarningLog – Raised if n is very large.

  • WarningLog – Raised if N is very large.

normalise_phi()

Power method normalisation of forward-model

run_estimator(mu=0.001, sigma=1)

Performs maximum a posteriori inference via proximal primal dual solver.

Parameters
  • mu (float) – Regularisation parameter of problem.

  • sigma (float) – Whitened noise level of problem.

class darkmappy.estimators.DarkMappySphere(L, N=1, data=None, mask=None, ngal=None, viewer=None, psi=None, constrained=True)

Frontend class which handles dark matter reconstruction.

This class currently supports the spherical lensing forward model, a selection of sparsity priors, for Gaussian and Poissonian noise models.

__init__(L, N=1, data=None, mask=None, ngal=None, viewer=None, psi=None, constrained=True)

Construct class to create and hold the MAP estimator

Parameters
  • L (int) – Spherical harmonic bandlimit.

  • N (int) – Directionality of wavelet dictionary.

  • data (complex array) – Pixelised map of shear observations.

  • mask (int array) – Map of realspace masking.

  • ngal (int array) – Map of galaxy observation count.

  • psi (linear operator) – Sparsifying dictionary.

  • constrained (boolean) – Constrained or unconstrained optimisation

Raises
  • ValueError – Raised if L is not positive.

  • ValueError – Raised if mask is the wrong shape.

  • ValueError – Raised if no data provided.

  • WarningLog – Raised if no galaxy number density map provided.

  • WarningLog – Raised if no masking map provided.

  • WarningLog – Raised if L is very large.

  • WarningLog – Raised if N is very large.

normalise_phi()

Power method normalisation of forward-model

run_estimator(mu=0.001, sigma=1)

Performs maximum a posteriori inference via proximal primal dual solver.

Parameters
  • mu (float) – Regularisation parameter of problem.

  • sigma (float) – White noise level of problem.