Package: darkmappy
DarkMappy: mapping the dark universedarkmappyis a lightweight python package which implements the hybrid Bayesian dark-matter reconstruction techniques
outlined on the plane inPrice et al. 2019, and on the celestial sphere inPrice et al. 2021. For comparison (and as initilaisiation for our iterations) the spherical Kaiser-Squires estimator of the convergence is implemented (seeWallis et al. 2021). These techniques are based onmaximum a posterioriestimation which, by construction, support principled uncertainty quantification, seePereyra 2016. Further examples of such uncertainty quantification techniques developed for the weak lensing setting can be found in related articlesPrice et al. 2019aandPrice et al. 2019b.INSTALLATIONdarkmappycan be installed through PyPi by runningpipinstalldarkmappyor alternatively from source by running the followinggitclonehttps://github.com/astro-informatics/DarkMappy.gitcdDarkMappybashbuild_darkmappy.shfollowing which the test suite can be executed by runningpytest--blackdarkmappy/testsBASIC USAGEFor planar reconstructions across the flat-sky the estimator can be run by the following, note that images must be square.importnumpyasnpimportdarkmappy.estimatorsasdm# LOAD YOUR DATAdata=np.load(<path_to_shear_data>)ngal=np.load(<path_to_ngal_per_pixel_map>)mask=np.load(<path_to_observation_mask>)# BUILD THE ESTIMATORdm_estimator=dm.DarkMappyPlane(n=n,# Dimension of imagedata=data,# Observed shear fieldmask=mask,# Observational maskngal=ngal,# Map of number density of observations per pixelwav=[<select_wavelets>],# see https://tinyurl.com/mrxeat3tlevels=level,# Wavelet levelssupersample=supersample)# Super-resolution factor (typically <~2)# RUN THE ESTIMATORconvergence,diagnostics=dm_estimator.run_estimator()For spherical reconstructions across the full-sky the estimator can be run by the following, note images must be of dimension L by 2L-1, seeMcEwen & Wiaux 2011.importnumpyasnpimportdarkmappy.estimatorsasdm# LOAD YOUR DATAdata=np.load(<path_to_shear_data>)ngal=np.load(<path_to_ngal_per_pixel_map>)mask=np.load(<path_to_observation_mask>)# BUILD THE ESTIMATORdm_estimator=dm.DarkMapperSphere(L=L,# Angular BandlimitN=N,# Azimuthal Bandlimit (wavelet directionality)data=data,# Observational shear datamask=mask,# Observation maskngal=ngal)# Map of number density of observations per pixel# RUN THE ESTIMATORconvergence,diagnostics=dm_estimator.run_estimator()CONTRIBUTORSMatthew A. Price,Jason D. McEwen& ContributorsATTRIBUTIONA BibTeX entry fordarkmappyis:@article{price:2021:spherical,
        title = {Sparse Bayesian mass-mapping with uncertainties: Full sky observations on the celestial sphere},
       author = {M.~A.~Price and J.~D.~McEwen and L.~Pratley and T.~D.~Kitching},
      journal = {Monthly Notices of the Royal Astronomical Society},
         year = 2021,
        month = jan,
       volume = {500},
       number = {4},
        pages = {5436-5452},
          doi = {10.1093/mnras/staa3563},
    publisher = {Oxford University Press}
}@article{price:2021:hypothesis,
        title = {Sparse Bayesian mass mapping with uncertainties: hypothesis testing of structure},
       author = {M.~A.~Price and J.~D.~McEwen and X.~Cai and T.~D.~Kitching and C.~G.~R.~Wallis and {LSST Dark Energy Science Collaboration}},
      journal = {Monthly Notices of the Royal Astronomical Society},
         year = 2021,
        month = jul,
       volume = {506},
       number = {3},
        pages = {3678--3690},
          doi = {10.1093/mnras/stab1983},
    publisher = {Oxford University Press}
}If, at any point, the direction inverse functionality (i.e. spherical Kaiser-Squires) please cite@article{wallis:2021:massmappy,
        title = {Mapping dark matter on the celestial sphere with weak gravitational lensing},
       author = {C.~G.~R.~Wallis and M.~A.~Price and J.~D.~McEwen and T.~D.~Kitching and B.~Leistedt and A.~Plouviez},
      journal = {Monthly Notices of the Royal Astronomical Society},
         year = 2021,
        month = Nov,
       volume = {509},
       number = {3},
        pages = {4480-4497},
          doi = {10.1093/mnras/stab3235},
    publisher = {Oxford University Press}
}Finally, if uncertainty quantification techniques which rely on the approximate level-set threshold (derived byPereyra 2016) are performed please consider citing relating articles appropriately.LICENSEdarkmappyis released under the GPL-3 license (seeLICENSE.txt).DarkMappy
Copyright (C) 2022 Matthew A. Price, Jason D. McEwen & contributors

This program is released under the GPL-3 license (see LICENSE.txt).

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.