In the lines referenced below, NAXIS1 represents the width of the image and NAXIS2 represents the height. We can get these dimensions from the jp2 metadata (via glymur.Jp2k) instead of getting them from the fits header (self._data).
|
image['NAXIS1'] = self._data['NAXIS1'] if 'NAXIS1' in self._data else 'NULL' |
|
image['NAXIS2'] = self._data['NAXIS2'] if 'NAXIS2' in self._data else 'NULL' |