[AstroPy] How can I preserve the precision of the data in the votable file?
Susana Sanchez Exposito
Thu Mar 7 05:33:08 CST 2013
I have followed the instructions given by Tom Aldcroft as answer of my
previous mail (thanks for that!), and finally I get the xml file with
the VOTable, but I realized the number are rounded when they are
written in the xml file.
For example, if I have a table like this:
(I built this Table following the example in
"Building a new table from scratch"):
In : table
Out: <astropy.io.votable.tree.Table object at 0x32bcbd0>
In : table.array
masked_rec.array(data = [(17.257360147629999, 18.999976544568401)
mask = [(False, False) (False, False)],
fill_value = (1e+20, 1e+20),
dtype = [('precision', '<f8'), ('precision2', '<f8')])
When I build the xml file with the comand votable.to_xml, the file
contains this data:
As you can see, the numbers have been rounded, but I would like to
preserve the precision of these data. Is this possible?
Thanks again for your useful help!
Susana Sánchez Expósito
Instituto de Astrofísica de Andalucía IAA (CSIC)
Camino Bajo de Huétor, 50. Granada E-18008
Tel:(+34) 958 121 311 / (+34) 958 230 618
Fax:(+34) 958 814 530
More information about the AstroPy