update_photom_keywords

romanisim.util.update_photom_keywords(im, gain=None)

Add photometry calibration keywords to image metadata.

This fills out the im.meta[‘photometry’] keywords:

  • conversion_megajanskys (MJy/sr corresponding to 1 DN / s / pix)

  • conversion_microjanskys (uJy/sq. arcsec corresponding to 1 DN / s / pix)

  • corresponding uncertainties (0 in appropriate units)

  • pixelarea_steradians (area of central pixel in steradians)

  • pixelarea_arcsecsq (area of central pixel in square arcseconds)

The values are derived from the bandpasses of the filters and and the WCS of the image.

Parameters:
imroman_datamodels.ImageModel

Image whose metadata should be updated with photometry keywords

gainfloat or np.ndarray, optional

Gain in electron/DN (scalar or image)