mask module

Functions to do with masks and mixing matrices.

mask.generate_mask(wmap_mask_path, nside, target_fsky, mask_save_path)

Generate a Stage-IV-like mask by manipulating the WMAP temperature mask and then adding random holes until the target sky fraction is reached.

Parameters
  • wmap_mask_path (str) – Path to the WMAP temperature mask fits file.

  • nside (int) – HEALPix resolution to use.

  • target_fsky (float) – Sky fraction to achieve. Holes will be added at random to reach this value.

  • msk_save_path (str) – Path to save the final mask as a fits file.

mask.get_3x2pt_mixmats(mask_path, nside, lmin, lmax_mix, lmax_out, save_path)

Calculate all 3x2pt mixing matrices from a mask using NaMaster, and save to disk in a single file.

Parameters
  • mask_path (str) – Path to mask FITS file. If None, full sky is assumed, in which case the mixing matrices should be diagonal.

  • nside (int) – HEALPix resolution to use.

  • lmin (int) – Minimum l to include in mixing matrices.

  • lmax_mix (int) – Maximum l to include in input to mixing matrices.

  • lmax_out (int) – Maximum l to include in output from mixing matrices.

  • save_path (str) – Path to save output, as a single numpy .npz file containing all mixing matrices.

mask.plot_mask(mask_path, save_path=None)

Plot Mollweide projection of a mask, with colour bar.

Parameters
  • mask_path (str) – Path to mask FITS file.

  • save_path (str, optional) – Path to save plot to (default None). If None, plot is displayed.