[AstroPy] Tr : problem with vo.table library and VOtable file from Vizier

Michael Droettboom mdroe at stsci.edu
Mon May 7 10:25:38 EDT 2012


Indeed, this is a bug that exhibits only when the number of rows in the 
table is exactly equal to 256.

I've attached a patch that fixes the bug that is now in SVN.

As a workaround until the next release, you can either install the SVN 
version from source, or pass "chunk_size=1" to the parse_single_table or 
parse functions (with a loss of performance).

Mike

On 05/04/2012 06:04 PM, Jerome Caron wrote:
> Sorry I forgot something in the code.. But the problem is still there..
> from vo.table import parse_single_table
> cat = parse_single_table("vizier.xml", pedantic=False)
> data = cat.array
> print data['RAJ2000']    #print alpha --> 512 lines
> print data['DEJ2000']    #print delta --> 512 lines
>
> ----- Mail transféré -----
> *De :* Jerome Caron <jerome_caron_astro at ymail.com>
> *À :* "astropy at scipy.org" <astropy at scipy.org>
> *Envoyé le :* Vendredi 4 mai 2012 23h58
> *Objet :* [AstroPy] problem with vo.table library and VOtable file 
> from Vizier
>
> Dear list
> I cannot correctly open a VOtable created by Vizier with the vo.table 
> library.
> The concerned xml file can be found here:
> http://www.aspylib.com/bazar/vizier.xml
> What happens is that, by chance, there are exactly 256 stars in the 
> file (it's a field in Auriga, about 2deg*2deg with stars up to 
> magnitude 11).
> The following instructions in python return an array with 512 rows. 
> The first 256 rows are occupied by the stars, and the next 256 rows 
> contain only zeros. But the Python code should return a 256 rows array 
> with only the stars ! I am not sure if something is wrong in the file 
> or if that's a bug in the python module ?
> Any help would be greatly appreciated... :-)
> Many thanks
> Jerome Caron
> from vo.table import parse_single_table
> cat = parse_single_table("vizier.xml")
> data = cat.array
> print data['RAJ2000']    #print alpha --> 512 lines
> print data['DEJ2000']    #print delta --> 512 lines
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org <mailto:AstroPy at scipy.org>
> http://mail.scipy.org/mailman/listinfo/astropy
>
>
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20120507/744b6e67/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 256rows.diff
Type: text/x-patch
Size: 977 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/astropy/attachments/20120507/744b6e67/attachment.bin>


More information about the AstroPy mailing list