smpy.utils.save_fits

smpy.utils.save_fits(data, true_boundaries, filename)[source]

Save a 2D array as a FITS file with proper WCS information.

Write mass map data to a FITS file with World Coordinate System (WCS) headers for proper astronomical coordinate handling.

Parameters:
  • data (numpy.ndarray) – 2D array containing the map data.

  • true_boundaries (dict) – Dictionary with coordinate boundaries containing ‘ra_min’, ‘ra_max’, ‘dec_min’, ‘dec_max’ keys.

  • filename (str) – Output FITS filename.

Notes

The WCS information assumes a tangent plane projection (TAN) and sets appropriate pixel scales based on the coordinate boundaries.