Demetra issues spectra as FITS files, with flux data contained in the first HDU. The wavelength data are derived from the FITS header, using the WCS convention.
The WCS is able to convert pixels to wavelengths, or wavelength to pixel, and assumes the FITS header specifies one - and only one - axis.
But the Demetra spectrum header is not FITS-compliant as it contains 2 keywords (CTYPE2 and CUNIT2) that fools the WCS when opening the file. For instance, using some Python code, here are some warnings:
Code: Select all
>>> import specutils as sp
>>> sp.Spectrum1D.read('/home/jaq/astro/dev/argia/05-spectroscopie/alcyone.fit')
WARNING: FITSFixedWarning: The WCS transformation has more axes (2) than the image it is associated with (1) [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Set MJD-OBS to 59560.788125 from DATE-OBS'. [astropy.wcs.wcs]
WARNING: UnitsWarning: 'Intensit?relative' did not parse as fits unit: At col 0, Unit 'Intensit' not supported by the FITS standard. If this is meant to be a custom unit, define it with 'u.def_unit'. To have it recognized inside a file reader or other code, enable it with 'u.add_enabled_units'. For details, see https://docs.astropy.org/en/latest/units/combining_and_defining.html [astropy.units.core]
<Spectrum1D(flux=<Quantity [1.537479 , 1.5703377, 1.603197 , ..., 0.8247515, 0.8243076,
0.8238455]>, spectral_axis=<SpectralAxis [3802.08096824, 3802.26786349, 3802.45475874, ..., 5869.14242252,
5869.32931777, 5869.51621302] Angstrom>)>
Code: Select all
CTYPE2 = 'Intensity' / Axis 2 description
CUNIT2 = 'Intensit? relative' / Axis 2 unit
For sure this is not the most important issue we have to face in the current days.
Jacques