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
astropy.io.fits.table_to_hdu unexpectedly crashes on certain units #7279
Comments
PS, there is another strange thing to note. 'nanomaggies' gets a warning as an invalid FITS unit, which is fine, it is a non-standard flux unit. However, 'nanomaggies' still gets added to the FITS binary table as the unit for that column! For example:
This is after adding the So why is 'nanomaggies' allowed to pass through, but 'dex' is not? |
OK, looks like all I need to do is replace 'dex' with 'Dex'. Still, that's kind of unexpected, and my question about 'nanomaggies' still applies. |
@weaverba137 - see #3822 for the long-standing issue related to this. A contribution would be most welcome, as clearly I am not getting to it myself... |
I will take a look. |
closing in favour of #3822 |
Consider the following snippet:
which outputs:
So basically, the unit 'dex' is causing table_to_hdu to crash on Tables that contain that unit. I accept that 'dex' may not be compatible with the FITS standard, but it is rather commonly used by astronomers, so wouldn't it be better in this case if the call to
Unit()
were bypassed by putting theUnit()
call in anelse:
block? That is:The text was updated successfully, but these errors were encountered: