<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">Sorry</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">I pressed "reply" and forgot to put the list address.. See m<VAR id=yui-ie-cursor></VAR>y message below.</SPAN><SPAN style="RIGHT: auto"></SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Cheers</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">Jerome</SPAN></div>
<div style="RIGHT: auto"><BR></div>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 10pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Arial>----- Mail transféré -----<BR><B><SPAN style="FONT-WEIGHT: bold">De :</SPAN></B> Jerome Caron <jerome_caron_astro@ymail.com><BR><B><SPAN style="FONT-WEIGHT: bold">À :</SPAN></B> Thomas Robitaille <thomas.robitaille@gmail.com> <BR><B><SPAN style="FONT-WEIGHT: bold">Envoyé le :</SPAN></B> Jeudi 8 Décembre 2011 11h57<BR><B><SPAN style="FONT-WEIGHT: bold">Objet :</SPAN></B> Re : Re : [AstroPy] error reading Vizier votable with atpy<BR></FONT><BR>
<DIV id=yiv723159329>
<DIV>
<DIV style="BACKGROUND-COLOR: #fff; FONT-FAMILY: arial, helvetica, sans-serif; COLOR: #000; FONT-SIZE: 10pt">
<DIV><SPAN>Dear Thomas,</SPAN></DIV>
<DIV><SPAN></SPAN> </DIV>
<DIV><SPAN>I installed version 0.9.5.3, n</SPAN><SPAN>ow it works fine with USNO-B1 !</SPAN></DIV>
<DIV><SPAN></SPAN><SPAN>But I have problems with other catalogs which were ok initially (2MASS-PSC). Do you know what is happening ? It looks like the initial field names are modified at some point, and then not recognized later.</SPAN></DIV>
<DIV><SPAN>I copy the </SPAN><SPAN>error message below.</SPAN></DIV>
<DIV><SPAN></SPAN> </DIV>
<DIV><SPAN>In the meantime I solved the issue with a different script that is using the vo module (I also post it) and that works fine for all cases.</SPAN></DIV>
<DIV><SPAN><SPAN><VAR id=yiv723159329yui-ie-cursor></VAR></SPAN></SPAN> </DIV>
<DIV><SPAN><SPAN>Cheers</SPAN></DIV>
<DIV><SPAN>Jerome</SPAN></DIV>
<DIV><SPAN></SPAN> </DIV></SPAN>
<DIV><SPAN>The error message with atpy 0.9.5.3</SPAN></DIV>
<DIV><SPAN></SPAN> </DIV>
<DIV><SPAN>numpy.dtype size changed, may indicate binary incompatibility<BR>numpy.dtype size changed, may indicate binary incompatibility<BR>out.xml:12:0: W22: The DEFINITIONS element is deprecated in VOTable 1.1.  Ignori<BR>ng<BR>out.xml:41:4: W03: Implictly generating an ID from a name '2MASS' -> '_2MASS'<BR>out.xml:41:4: W03: Implictly generating an ID from a name '2MASS' -> '_2MASS'<BR>out.xml:12:0: W22: The DEFINITIONS element is deprecated in VOTable 1.1.  Ignori<BR>ng<BR>out.xml:41:4: W03: Implictly generating an ID from a name '2MASS' -> '_2MASS'<BR>out.xml:41:4: W03: Implictly generating an ID from a name '2MASS' -> '_2MASS'<BR>Traceback (most recent call last):<BR>  File "C:\Documents and Settings\jerome caron\Desktop\vizier\test5.py", line 12<BR>, in <module><BR>    data = atpy.Table(op.name,type='vo',pedantic=False)<BR>  File "C:\Python26\lib\site-packages\atpy\basetable.py", line 167, in
 __init__<BR>    self.read(*args, **kwargs)<BR>  File "C:\Python26\lib\site-packages\atpy\basetable.py", line 213, in read<BR>    atpy._readers[table_type](self, *args, **kwargs)<BR>  File "C:\Python26\lib\site-packages\atpy\votable.py", line 106, in read<BR>    data = table.array[colname]<BR>  File "C:\Python26\lib\site-packages\numpy\core\records.py", line 455, in __get<BR>item__<BR>    obj = ndarray.__getitem__(self, indx)<BR>ValueError: field named 2MASS not found.<BR>Press any key to continue . . .</SPAN></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>The script based on vo, which works fine</DIV>
<DIV> </DIV>
<DIV># -*- coding: iso_8859_1 -*-</DIV>
<DIV>import matplotlib.pyplot as plt<BR>import urllib<BR>import numpy as np</DIV>
<DIV>fp = urllib.urlopen("<A href="http://webviz.u-strasbg.fr/viz-bin/votable/?-source=USNO-B1&-c=M45&-c.bm=600/600&B1mag=%3C13&-out.max=unlimited" rel=nofollow target=_blank>http://webviz.u-strasbg.fr/viz-bin/votable/?-source=USNO-B1&-c=M45&-c.bm=600/600&B1mag=%3C13&-out.max=unlimited</A>")<BR>op = open("out.xml", "wb")</DIV>
<DIV>while 1:<BR>    s = fp.read(8192)<BR>    if not s:<BR>        break<BR>    op.write(s)</DIV>
<DIV>fp.close()<BR>op.close()</DIV>
<DIV>from vo.table import parse_single_table<BR>votable = parse_single_table("out.xml", pedantic=False)<BR>data = votable.array</DIV>raw_input("done!")<BR><BR></DIV></DIV></DIV><BR><BR></DIV></DIV></div></body></html>