-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Use NaN for missing values in FITS when using Table.write #2186
Comments
I'll try to look into it |
👎 on using NaN as the default fill value for all tables. I don't think it's an appropriate value to use as a default for missing values. I think for now it should just be used for FITS since it's the only appropriate way to do this for FITS (and, as Mark Taylor pointed out, what the FITS standard prescribes). |
Ok - sounds good. @ashishdastro - you should try and implement a fix for this in |
ok |
Hi, I was trying this out, but fixing it this fails one of the tests in test_connect.py |
@shaileshahuja - for float columns, you should not set |
The default fill value in numpy.ndarray (which the BaseColumn class extends) can only be 1e20 when dtype = float64. So if the column is integer type, then it will not be 1e20 anyway. So I need to loop though the table columns, and call filled(np.nan) for each column if
Then, I create the BinTableHDU with the filled table. Is that what you want? |
@shaileshahuja - yes, that's exactly it! You might want to check what the behavior is for float32 as well. |
For float32 default value is 1.0000000200408773e+20. It is not getting converted to Nan right now. Should I manually check for this as well? |
@shaileshahuja - yes, that would be great! |
Closed by #2196 |
At least, when no other fill value is provided. Currently, it defaults to 1.e20.
The text was updated successfully, but these errors were encountered: