[AstroPy] Fwd: A question about reading fits table.
Eric L. N. Jensen
ejensen1 at swarthmore.edu
Wed Mar 20 13:35:04 EDT 2019
That error is saying that one of your columns (in this case it must be UVW2) says in the column header that it contains floating-point (numerical) data, but that one of the entries in that column doesn’t contain a number, but instead contains the string ‘ ---‘ and the code doesn’t know how to convert that string into a number.
It might be the case that whatever software wrote that FITS table used that string to denote missing values in the table. You should look at the FITS-reading routine you’re using and see if there is a way to tell it how to handle missing values in the data.
Hope this helps,
> On Jan 20, 2019, at 7:55 AM, 赵赫 <astronomyhz at gmail.com> wrote:
> Dear members,
> I'm a PhD student on Diffuse Interstellar Bands (DIBs).
> I experienced a problem when I tried to get data from a fits table.
> The read in code:
> `hdu1 = fits.open()`
> `data = hdu1.data`
> A warning occurred,
> "WARNING: VerifyWarning: It is strongly recommended that column names contain only upper and lower-case ASCII letters, digits, or underscores for maximum compatibility with other software (got '---'). [astropy.io.fits.column]"
> The columns of the data is like:
> When I accessed the data with `data`, I met an error:
> This also occurred when I got the column `data['UVW2'], but I successfully accessed to the columns like 'Name' and 'RAdeg' in the data.
> I don't what causes this error and can't solve it.
> If you have some comments, please contact me.
> Best regards,
> He Zhao
> AstroPy mailing list
> AstroPy at python.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3932 bytes
Desc: not available
More information about the AstroPy