parse_legacy_bunit#

lsst.images.fits.parse_legacy_bunit(bunit, instrumental_unit=None)#

Handle a BUNIT value written by lsst.afw or LSST-supported instruments.

Parameters:
  • bunit (str) – BUNIT FITS header card value.

  • instrumental_unit (UnitBase | None, default: None) – The correct instrumental unit for this instrument’s post-ISR images. Should only be passed if this is a post-ISR image.

Return type:

UnitBase

Notes

This works around two problems with the FITS BUNIT headers:

  • At least according to Astropy, BUNIT=’ADU’ is not valid but ‘adu’ is.

  • Some files are written with BUNIT=’adu’ when the LSSTCam ISR’s output units are ‘electron’.

This page was last modified on .