-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compatibility astropy #35
Comments
File ~/.local/lib/python3.9/site-packages/mpdaf/obj/data.py:412, in DataArray.getstate(self) File ~/.local/lib/python3.9/site-packages/mpdaf/obj/data.py:1070, in DataArray.get_data_hdu(self, name, savemask, convert_float32) File ~/.local/lib/python3.9/site-packages/mpdaf/tools/fits.py:170, in copy_header(srchdr, dsthdr, exclude, unit) File ~/Python/anaconda3/envs/musex/lib/python3.9/site-packages/astropy/units/core.py:791, in UnitBase.to_string(self, format, **kwargs) File ~/Python/anaconda3/envs/musex/lib/python3.9/site-packages/astropy/units/format/fits.py:111, in Fits.to_string(cls, unit, fraction) File ~/Python/anaconda3/envs/musex/lib/python3.9/site-packages/astropy/units/format/utils.py:109, in decompose_to_known_units(unit, func) File ~/Python/anaconda3/envs/musex/lib/python3.9/site-packages/astropy/units/format/utils.py:102, in decompose_to_known_units(unit, func) File ~/Python/anaconda3/envs/musex/lib/python3.9/site-packages/astropy/units/format/utils.py:106, in decompose_to_known_units(unit, func) File ~/Python/anaconda3/envs/musex/lib/python3.9/site-packages/astropy/units/format/fits.py:105, in Fits._get_unit_name(cls, unit) File ~/Python/anaconda3/envs/musex/lib/python3.9/site-packages/astropy/units/format/fits.py:80, in Fits._validate_unit(cls, unit, detailed_exception) ValueError: Unit 'mgy' not supported by the FITS standard. Did you mean MG, Mg, mG or mg? |
for unit=u.Unit('nanomaggy'), the line
fits.py:170 dsthdr['BUNIT'] = (unit.to_string('fits'), 'data unit type')
failes inside a try/except.
fix is replacing line fits.py:171 by
except:
instead of
except u.format.fits.UnitScaleError:
The text was updated successfully, but these errors were encountered: