[AstroPy] Problems reading CDS catalogue

Sergio Pascual sergio.pasra at gmail.com
Thu Mar 20 19:38:29 EDT 2014


Hi, I'm having problems reading the catalog in
http://cdsarc.u-strasbg.fr/viz-bin/Cat?J/PASP/110/863 (file
J_PASP_110_863.tar.gz)

The files inside are compressed, so I uncompress them before.

I create a reader object,  (I'm using astropy 0.3, BTW)

readme = 'ReadMe'

r = ascii.get_reader(ascii.Cds, readme=readme)

This reader works only for some specta. For example, m2v and goi works, but
the star 'o9v' doesn't work. Inserting this last star generates the
following exception

>>> r.read('o9v.dat')

/usr/lib64/python2.7/site-packages/astropy/io/ascii/core.pyc in read(self,
table)
    831
    832         # Get the table column definitions
--> 833         self.header.get_cols(self.lines)
    834
    835         cols = self.header.cols

/usr/lib64/python2.7/site-packages/astropy/io/ascii/cds.pyc in
get_cols(self, lines)
    164                     cols[-1].description += line.strip()
    165                 else:
--> 166                     raise ValueError('Line "%s" not parsable as CDS
header' % line)
    167
    168         self.names = [x.name for x in cols]

ValueError: Line "Bytes    Format  Units   Label   Explanations" not
parsable as CDS header



Any hint?

Sergio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20140321/db57652a/attachment.html>


More information about the AstroPy mailing list