[AstroPy] Fwd: A question about reading fits table.

Simon Conseil simon at sconseil.fr
Wed Mar 20 17:34:22 EDT 2019


It seems that your file has columns with missing values, but does not
contain the TNULL keywords that are needed to represent the missing
values. If you can share the file or at least the header, it would help
to get a better idea.


On 20/01 13:55, 赵赫 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[1].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:
> [image: err1.PNG]
> When I accessed the data with `data[0]`, I met an error:
> [image: Capture.PNG]
> [image: Capture.PNG]
> 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
> https://mail.python.org/mailman/listinfo/astropy

More information about the AstroPy mailing list