ESO datacube reading error
Hello,
This is a bug report for mpdaf v1.2b1
When opening the attached datacube (VLT/SINFONI data) I have an error in the units provided, which are not compliant with pywcs it seems ?
Can we make a mpdaf match to handle this unit "mum" for microns ?
Thanks,
Johan
c=Cube('a1689_image_cube1.fits') [WARNING] The physical unit of the data is not loaded from the FITS header. No BUNIT in the DATA. WARNING: FITSFixedWarning: RADECSYS= 'FK5 ' / Coordinate reference frame RADECSYS is non-standard, use RADESYSa. [astropy.wcs.wcs]
ValueError Traceback (most recent call last) in () ----> 1 c=Cube('a1689_image_cube1.fits')
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpdaf/obj/cube.pyc in init(self, filename, ext, wcs, wave, ima, unit, data, var, copy, dtype, **kwargs) 135 super(Cube, self).init( 136 filename=filename, ext=ext, wcs=wcs, wave=wave, unit=unit, --> 137 data=data, var=var, copy=copy, dtype=dtype, **kwargs) 138 self.ima = {} 139 if filename is not None and ima:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpdaf/obj/data.pyc in init(self, filename, hdulist, ext, data, var, mask, unit, copy, dtype, primary_header, data_header, **kwargs) 193 crval = 'CRVAL{}'.format(wave_ext) 194 if self._has_wave and crpix in hdr and crval in hdr: --> 195 self.wave = WaveCoord(hdr) 196 197 if close_hdu:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpdaf/obj/coords.pyc in init(self, hdr, crpix, cdelt, crval, cunit, ctype, shape) 877 # Get the unit and remove it from the header so that wcslib does 878 # not convert the values. --> 879 self.unit = u.Unit(hdr.pop('CUNIT%d' % axis)) 880 self.wcs = wcs_from_header(hdr).sub([axis]) 881 if shape is not None:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/astropy-1.1.dev12485-py2.7-macosx-10.10-x86_64.egg/astropy/units/core.pyc in call(self, s, represents, format, namespace, doc, parse_strict) 1783 .format(s, format_clause, six.text_type(e))) 1784 if parse_strict == 'raise': -> 1785 raise ValueError(msg) 1786 elif parse_strict == 'warn': 1787 warnings.warn(msg, UnitsWarning)
ValueError: 'mum' did not parse as unit: At col 0, mum is not a valid unit. Did you mean Mm, Mu, mm, mu or um?