Table ignores FITS fill value
See original GitHub issueIs this a bug or a feature?
>>> import astropy
>>> from astropy.io import fits
>>> from astropy.table import Table
>>> astropy.__version__
'1.3.dev16038'
>>> with fits.open('mytable.fits') as pf:
... hdr = pf[1].header
... dat = pf[1].data
... tab = Table.read(pf[1], format='fits')
>>> hdr
XTENSION= 'BINTABLE' / binary table extension
BITPIX = 8 / array data type
NAXIS = 2 / number of array dimensions
NAXIS1 = 12 / length of dimension 1
NAXIS2 = 2 / length of dimension 2
PCOUNT = 0 / number of group parameters
GCOUNT = 1 / number of groups
TFIELDS = 2 / number of table fields
TTYPE1 = 'a '
TFORM1 = 'J '
TTYPE2 = 'b '
TFORM2 = 'K '
TUNIT1 = 'm '
TNULL1 = 999999
TUNIT2 = 's '
TNULL2 = 999999
>>> dat # Has fill value
FITS_rec([(1, 3), (999999, 4)],
dtype=(numpy.record, [('a', '>i4'), ('b', '>i8')]))
>>> tab # No fill value
<Table masked=True length=2>
a b
m s
int32 int64
----- -----
1 3
-- 4
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Table overflowing outside of div
You can prevent tables from expanding beyond their parent div by using table-layout:fixed . The CSS below will make your tables expand to...
Read more >table-layout - CSS: Cascading Style Sheets - MDN Web Docs
The table-layout CSS property sets the algorithm used to lay out cells, rows, and columns.
Read more >Fixed Table Layouts | CSS-Tricks
Things get a lot sturdier and more predictable with property/value in place. The layout is fixed based on the first row. Set the...
Read more >Table Layouts - W3C
In the separated borders model ('border-collapse' is 'separate'), if the value of their 'empty-cells' property is 'hide' these "empty" cells are transparent ...
Read more >Table Layout - Tailwind CSS
Use table-auto to allow the table to automatically size columns to fit the contents of the cell. Song, Artist, Year. The Sliding Mr....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I haven’t complained since 2016, so I will just close this. I think from the answers, it is pretty clear that this is a feature and not a bug. 😄
@pllim - With the other fill_value/TNULL issues, I found this one. The behavior seems correct to me, what do you mean by “why it is not filled by default” ? The read table is masked, so the masked value is hidden but it’s value is 999999.