[AstroPy] Problem reading VOTable produced by HLA

Michael Droettboom mdroe@stsci....
Tue Feb 26 14:22:13 CST 2013


I just got word from Rick White that this has been fixed on the HLA 
server as well.  That was fast.

Mike

On 02/26/2013 12:51 PM, Michael Droettboom wrote:
> Also see the following PR for astropy which will emit a warning and 
> truncate out-of-range integer values:
>
> https://github.com/astropy/astropy/pull/825
>
> Mike
>
> On 02/26/2013 11:08 AM, Michael Droettboom wrote:
>> Column #24 is defined as follows:
>>
>>       <FIELD ID="NReleaseDate" name="NReleaseDate" datatype="int" 
>> ucd="TIME_EPOCH">
>>
>> Here, a datatype of "int" means a 32-bit int, always, as per the 
>> VOTable spec.
>>
>> Yet the value in the first row of this column is -2208988800, which 
>> is too large to be represented in 32 bits.  This field should really 
>> be updated to be of type "long".  I'll go ahead and report this to 
>> the HLA folks.
>>
>> Unfortunately, it seems that Numpy complains about too long numbers 
>> going into a 32-bit field on a 32-bit platform, but not on a 
>> 64-platform, where it just silently truncates.  It would be nice to 
>> at least have consistent behavior across platforms there.  Again, 
>> I'll file a bug with Numpy about this to see what, if anything, that 
>> team may want to do.
>>
>> In any case, the real bug is in the file -- astropy is just correctly 
>> following directions here and only allocating as much memory as 
>> specified in the file.  It would be nice to workaround this bug in 
>> the file, but it's a tricky one -- we would have to allocate the 
>> table in one way, come across the overflow later, and then reparse 
>> the whole file using a different table structure.  None of our 
>> existing workarounds do that, so it's not the most straightforward 
>> thing to do.
>>
>> Mike
>>
>> On 02/26/2013 10:44 AM, Andy Ptak wrote:
>>> Sure...
>>> ipdb> print array_chunk
>>> [('http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=hlsp_angst_hst_acs-wfc_10915-ngc0253-wide5_f475w_v1_ref' 
>>> <http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=hlsp_angst_hst_acs-wfc_10915-ngc0253-wide5_f475w_v1_ref%27>, 
>>> 11.9123, -25.2889, 5, 'NGC0253-WIDE5', 'ACS/WFC', 'WFCENTER', 
>>> 'F475W', 4, 1482.0, '2006-09-13 06:38:18', 
>>> 'hlsp_angst_hst_acs-wfc_10915-ngc0253-wide5_f475w_v1_ref', 10915, 
>>> '10915-ngc0253-wide5', 'Dalcanton', '', '', 'ACCUM', '2012-11-02 
>>> 13:59:02', 'HLSP', 4744.35009766, 'image/fits', '1900-01-01 
>>> 00:00:00', -2208988800L, 'angst_hst_acs-wfc_10915-ngc0253-wide5 
>>> ACS/WFC F475W (hlsp) NGC0253-WIDE5', masked_array(data = [4220 4298],
>>>        mask = [False False],
>>>  fill_value = 999999)
>>> , masked_array(data = [1.38889e-05],
>>>        mask = [False],
>>>  fill_value = 1e+20)
>>> , 2, masked_array(data = [2055.6 1148.67],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [11.9123 -25.2889],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [-1.06388e-05 -8.9285e-06 -8.9285e-06 
>>> 1.06388e-05],
>>>        mask = [False False False False],
>>>  fill_value = 1e+20)
>>> , 'hlsp_angst_hst_acs-wfc_10915-ngc0253-wide5_f475w_v1_ref', 
>>> 'Polygon J2000    11.947768   -25.282758   11.905331 -25.237036   
>>> 11.855680   -25.274704   11.898112 -25.320439'), 
>>> ('http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=hlsp_ghosts_hst_acs_ngc0253-field01_f606w_v1_drz' 
>>> <http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=hlsp_ghosts_hst_acs_ngc0253-field01_f606w_v1_drz%27>, 
>>> 11.9017, -25.2787, 5, 'NGC0253-WIDE5', 'ACS/WFC', 'WFCENTER', 
>>> 'F606W', 4, 1508.0, '2006-09-13 09:42:19', 
>>> 'hlsp_ghosts_hst_acs_ngc0253-field01_f606w_v1_drz', 10915, 
>>> 'ngc0253-field01', 'Dalcanton', '', '', 'ACCUM', '2012-11-02 
>>> 14:01:51', 'HLSP', 5917.68017578, 'image/fits', '1900-01-01 
>>> 00:00:00', -2208988800L, 'ghosts_hst_acs_ngc0253-field01 ACS/WFC 
>>> F606W (hlsp) NGC0253-WIDE5', masked_array(data = [4220 4299],
>>>        mask = [False False],
>>>  fill_value = 999999)
>>> , masked_array(data = [1.38892e-05],
>>>        mask = [False],
>>>  fill_value = 1e+20)
>>> , 2, masked_array(data = [2110.0 2149.5],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [11.9017 -25.2787],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [-1.06397e-05 -8.9279e-06 -8.9279e-06 
>>> 1.06397e-05],
>>>        mask = [False False False False],
>>>  fill_value = 1e+20)
>>> , 'hlsp_ghosts_hst_acs_ngc0253-field01_f606w_v1_drz', 'Polygon J2000 
>>>    11.947776   -25.282766   11.905328 -25.237033   11.855676   
>>> -25.274701   11.898119 -25.320449'), 
>>> ('http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=hlsp_ghosts_hst_acs_ngc0253-field01_f814w_v1_drz' 
>>> <http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=hlsp_ghosts_hst_acs_ngc0253-field01_f814w_v1_drz%27>, 
>>> 11.9017, -25.2787, 5, 'NGC0253-WIDE5', 'ACS/WFC', 'WFCENTER', 
>>> 'F814W', 4, 1534.0, '2006-09-13 11:18:39', 
>>> 'hlsp_ghosts_hst_acs_ngc0253-field01_f814w_v1_drz', 10915, 
>>> 'ngc0253-field01', 'Dalcanton', '', '', 'ACCUM', '2012-11-02 
>>> 14:01:51', 'HLSP', 8059.75976562, 'image/fits', '1900-01-01 
>>> 00:00:00', -2208988800L, 'ghosts_hst_acs_ngc0253-field01 ACS/WFC 
>>> F814W (hlsp) NGC0253-WIDE5', masked_array(data = [4220 4298],
>>>        mask = [False False],
>>>  fill_value = 999999)
>>> , masked_array(data = [1.38892e-05],
>>>        mask = [False],
>>>  fill_value = 1e+20)
>>> , 2, masked_array(data = [2110.0 2149.0],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [11.9017 -25.2787],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [-1.06397e-05 -8.9279e-06 -8.9279e-06 
>>> 1.06397e-05],
>>>        mask = [False False False False],
>>>  fill_value = 1e+20)
>>> , 'hlsp_ghosts_hst_acs_ngc0253-field01_f814w_v1_drz', 'Polygon J2000 
>>>    11.947772   -25.282761   11.905333 -25.237039   11.855682   
>>> -25.274707   11.898114 -25.320444'), 
>>> ('http://hla.stsci.edu/cgi-bin/fitscut.cgi?red=hlsp_ghosts_hst_acs_ngc0253-field01_f814w_v1_drz&amp;blue=hlsp_ghosts_hst_acs_ngc0253-field01_f606w_v1_drz&amp;size=ALL&amp;format=fits' 
>>> <http://hla.stsci.edu/cgi-bin/fitscut.cgi?red=hlsp_ghosts_hst_acs_ngc0253-field01_f814w_v1_drz&amp;blue=hlsp_ghosts_hst_acs_ngc0253-field01_f606w_v1_drz&amp;size=ALL&amp;format=fits%27>, 
>>> 11.9017, -25.2787, 4, 'NGC0253-WIDE5', 'ACS/WFC', 'WFCENTER', 
>>> 'F814W/F606W', 8, 3042.0, '2006-09-13 09:42:19', 
>>> 'hlsp_ghosts_hst_acs_ngc0253-field01_f814w_f606w_v1_drz', 10915, 
>>> 'ngc0253-field01', 'Dalcanton', '', '', 'ACCUM', '2012-11-02 
>>> 14:01:51', 'HLSP', 6989.0, 'image/fits', '1900-01-01 00:00:00', 
>>> -2208988800L, 'ghosts_hst_acs_ngc0253-field01 ACS/WFC F814W/F606W 
>>> (color) NGC0253-WIDE5', masked_array(data = [4220 4298],
>>>        mask = [False False],
>>>  fill_value = 999999)
>>> , masked_array(data = [1.38892e-05],
>>>        mask = [False],
>>>  fill_value = 1e+20)
>>> , 2, masked_array(data = [2110.0 2149.0],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [11.9017 -25.2787],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [-1.06397e-05 -8.9279e-06 -8.9279e-06 
>>> 1.06397e-05],
>>>        mask = [False False False False],
>>>  fill_value = 1e+20)
>>> , 
>>> 'hlsp_ghosts_hst_acs_ngc0253-field01_f814w_v1_drz,hlsp_ghosts_hst_acs_ngc0253-field01_f606w_v1_drz', 
>>> 'Polygon J2000    11.947772   -25.282761   11.905333 -25.237039   
>>> 11.855682   -25.274707   11.898114 -25.320444'), 
>>> ('http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=HST_10915_98_ACS_WFC_F475W' 
>>> <http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=HST_10915_98_ACS_WFC_F475W%27>, 
>>> 11.901736, -25.279734, 2, 'NGC0253-WIDE5', 'ACS/WFC', 'WFCENTER', 
>>> 'F475W', 2, 1482.0, '2006-09-13 06:38:18', 
>>> 'HST_10915_98_ACS_WFC_F475W', 10915, '98', 'Dalcanton', '', 
>>> 'Loaded', 'ACCUM', '2008-01-17 03:05:31', 'HLA', 4744.36, 
>>> 'image/fits', '2006-09-14 00:47:14', 1158194834, '10915_98 ACS/WFC 
>>> F475W (combined) NGC0253-WIDE5', masked_array(data = [6100 6100],
>>>        mask = [False False],
>>>  fill_value = 999999)
>>> , masked_array(data = [1.38889e-05],
>>>        mask = [False],
>>>  fill_value = 1e+20)
>>> , 2, masked_array(data = [3050.0 3050.0],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [11.901736 -25.279734],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [-1.38889e-05 0.0 0.0 1.38889e-05],
>>>        mask = [False False False False],
>>>  fill_value = 1e+20)
>>> , 'HST_10915_98_ACS_WFC_F475W', 'Polygon J2000 11.87717390 
>>> -25.29535800 11.89640629 -25.28200592 11.87697850 -25.29587050 
>>> 11.87759056 -25.29648032 11.89825680 -25.31706610 11.89831934 
>>> -25.31702147 11.89893180 -25.31763140 11.94817110 -25.28247540 
>>> 11.92689000 -25.26128670 11.92682706 -25.26133165 11.92621490 
>>> -25.26072200 11.92600258 -25.26087365 11.90560880 -25.24086630 
>>> 11.90555076 -25.24090663 11.90493420 -25.24030160 11.85576560 
>>> -25.27444230 11.85638210 -25.27504754 11.87649930 -25.29479280 
>>> 11.87655706 -25.29475271'), 
>>> ('http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=HST_10915_98_ACS_WFC_F606W' 
>>> <http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=HST_10915_98_ACS_WFC_F606W%27>, 
>>> 11.901736, -25.279734, 2, 'NGC0253-WIDE5', 'ACS/WFC', 'WFCENTER', 
>>> 'F606W', 2, 1508.0, '2006-09-13 09:42:19', 
>>> 'HST_10915_98_ACS_WFC_F606W', 10915, '98', 'Dalcanton', '', 
>>> 'Loaded', 'ACCUM', '2008-01-17 03:05:31', 'HLA', 5917.68, 
>>> 'image/fits', '2006-09-14 10:03:41', 1158228221, '10915_98 ACS/WFC 
>>> F606W (combined) NGC0253-WIDE5', masked_array(data = [6100 6100],
>>>        mask = [False False],
>>>  fill_value = 999999)
>>> , masked_array(data = [1.38889e-05],
>>>        mask = [False],
>>>  fill_value = 1e+20)
>>> , 2, masked_array(data = [3050.0 3050.0],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [11.901736 -25.279734],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [-1.38889e-05 0.0 0.0 1.38889e-05],
>>>        mask = [False False False False],
>>>  fill_value = 1e+20)
>>> , 'HST_10915_98_ACS_WFC_F606W', 'Polygon J2000 11.92689010 
>>> -25.26128690 11.92682692 -25.26133202 11.92621490 -25.26072250 
>>> 11.92600228 -25.26087437 11.90560890 -25.24086820 11.90555051 
>>> -25.24090876 11.90493430 -25.24030410 11.85576720 -25.27444250 
>>> 11.85638324 -25.27504727 11.87650030 -25.29479150 11.87655775 
>>> -25.29475163 11.87717450 -25.29535680 11.89645734 -25.28197019 
>>> 11.87697940 -25.29587070 11.87759135 -25.29648042 11.89825680 
>>> -25.31706560 11.89831905 -25.31702118 11.89893170 -25.31763130 
>>> 11.94817060 -25.28247510'), 
>>> ('http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=HST_10915_98_ACS_WFC_F814W' 
>>> <http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=HST_10915_98_ACS_WFC_F814W%27>, 
>>> 11.901736, -25.279734, 2, 'NGC0253-WIDE5', 'ACS/WFC', 'WFCENTER', 
>>> 'F814W', 2, 1534.0, '2006-09-13 11:18:39', 
>>> 'HST_10915_98_ACS_WFC_F814W', 10915, '98', 'Dalcanton', '', 
>>> 'Loaded', 'ACCUM', '2008-01-17 03:05:31', 'HLA', 8059.76, 
>>> 'image/fits', '2006-09-14 16:27:26', 1158251246, '10915_98 ACS/WFC 
>>> F814W (combined) NGC0253-WIDE5', masked_array(data = [6100 6100],
>>>        mask = [False False],
>>>  fill_value = 999999)
>>> , masked_array(data = [1.38889e-05],
>>>        mask = [False],
>>>  fill_value = 1e+20)
>>> , 2, masked_array(data = [3050.0 3050.0],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [11.901736 -25.279734],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [-1.38889e-05 0.0 0.0 1.38889e-05],
>>>        mask = [False False False False],
>>>  fill_value = 1e+20)
>>> , 'HST_10915_98_ACS_WFC_F814W', 'Polygon J2000 11.90555223 
>>> -25.24091185 11.90493480 -25.24030600 11.85576830 -25.27444290 
>>> 11.87650110 -25.29479130 11.87655960 -25.29475070 11.87717680 
>>> -25.29535630 11.89640118 -25.28201069 11.87698000 -25.29587030 
>>> 11.89825710 -25.31706440 11.89832033 -25.31701928 11.89893250 
>>> -25.31762890 11.94810647 -25.28252025 11.94816870 -25.28247580 
>>> 11.92688930 -25.26128920 11.92682707 -25.26133365 11.92621460 
>>> -25.26072370 11.92600121 -25.26087611 11.90560960 -25.24087200'), 
>>> ('http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=HST_10915_98_ACS_WFC_total' 
>>> <http://hla.stsci.edu/cgi-bin/getdata.cgi?dataset=HST_10915_98_ACS_WFC_total%27>, 
>>> 11.901736, -25.279734, 2, 'NGC0253-WIDE5', 'ACS/WFC', 'WFCENTER', 
>>> 'detection', 6, 4524.0, '2006-09-13 06:38:18', 
>>> 'HST_10915_98_ACS_WFC_total', 10915, '98', 'Dalcanton', '', 
>>> 'Loaded', 'ACCUM', '2008-01-17 03:05:31', 'HLA', None, 'image/fits', 
>>> '2006-09-14 16:27:26', 1158251246, '10915_98 ACS/WFC detection 
>>> (combined) NGC0253-WIDE5', masked_array(data = [6100 6100],
>>>        mask = [False False],
>>>  fill_value = 999999)
>>> , masked_array(data = [1.38889e-05],
>>>        mask = [False],
>>>  fill_value = 1e+20)
>>> , 2, masked_array(data = [3050.0 3050.0],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [11.901736 -25.279734],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [-1.38889e-05 0.0 0.0 1.38889e-05],
>>>        mask = [False False False False],
>>>  fill_value = 1e+20)
>>> , 'HST_10915_98_ACS_WFC_total', 'Polygon J2000 11.90560880 
>>> -25.24086630 11.90555076 -25.24090663 11.90493420 -25.24030160 
>>> 11.85576560 -25.27444230 11.85638210 -25.27504754 11.87649930 
>>> -25.29479280 11.87655706 -25.29475271 11.87717390 -25.29535800 
>>> 11.87717661 -25.29535612 11.89634395 -25.28205042 11.87697850 
>>> -25.29587050 11.87759056 -25.29648032 11.89825680 -25.31706610 
>>> 11.89831934 -25.31702147 11.89893180 -25.31763140 11.94817110 
>>> -25.28247540 11.92689000 -25.26128670 11.92682706 -25.26133165 
>>> 11.92621490 -25.26072200 11.92600258 -25.26087365'), 
>>> ('http://hla.stsci.edu/cgi-bin/fitscut.cgi?red=HST_10915_98_ACS_WFC_F814W&amp;green=HST_10915_98_ACS_WFC_F606W&amp;blue=HST_10915_98_ACS_WFC_F475W&amp;size=ALL&amp;format=fits' 
>>> <http://hla.stsci.edu/cgi-bin/fitscut.cgi?red=HST_10915_98_ACS_WFC_F814W&amp;green=HST_10915_98_ACS_WFC_F606W&amp;blue=HST_10915_98_ACS_WFC_F475W&amp;size=ALL&amp;format=fits%27>, 
>>> 11.901736, -25.279734, 4, 'NGC0253-WIDE5', 'ACS/WFC', 'WFCENTER', 
>>> 'F814W/F606W/F475W', 6, 4524.0, '2006-09-13 06:38:18', 
>>> 'HST_10915_98_ACS_WFC_F814W_F606W_F475W', 10915, '98', 'Dalcanton', 
>>> '', 'Loaded', 'ACCUM', '2008-01-17 03:05:31', 'HLA', 6241.0, 
>>> 'image/fits', '2006-09-14 16:27:26', 1158251246, '10915_98 ACS/WFC 
>>> F814W/F606W/F475W (color) NGC0253-WIDE5', masked_array(data = [6100 
>>> 6100],
>>>        mask = [False False],
>>>  fill_value = 999999)
>>> , masked_array(data = [1.38889e-05],
>>>        mask = [False],
>>>  fill_value = 1e+20)
>>> , 2, masked_array(data = [3050.0 3050.0],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [11.901736 -25.279734],
>>>        mask = [False False],
>>>  fill_value = 1e+20)
>>> , masked_array(data = [-1.38889e-05 0.0 0.0 1.38889e-05],
>>>        mask = [False False False False],
>>>  fill_value = 1e+20)
>>> , 
>>> 'HST_10915_98_ACS_WFC_F814W,HST_10915_98_ACS_WFC_F606W,HST_10915_98_ACS_WFC_F475W', 
>>> 'Polygon J2000 11.90555223 -25.24091185 11.90493480 -25.24030600 
>>> 11.85576830 -25.27444290 11.87650110 -25.29479130 11.87655960 
>>> -25.29475070 11.87717680 -25.29535630 11.89640118 -25.28201069 
>>> 11.87698000 -25.29587030 11.89825710 -25.31706440 11.89832033 
>>> -25.31701928 11.89893250 -25.31762890 11.94810647 -25.28252025 
>>> 11.94816870 -25.28247580 11.92688930 -25.26128920 11.92682707 
>>> -25.26133365 11.92621460 -25.26072370 11.92600121 -25.26087611 
>>> 11.90560960 -25.24087200')]
>>>
>>> On Feb 26, 2013, at 10:20 AM, Michael Droettboom <mdroe@stsci.edu 
>>> <mailto:mdroe@stsci.edu>> wrote:
>>>
>>>> On 02/26/2013 09:51 AM, Andy Ptak wrote:
>>>>> Hello,
>>>>> I am trying out reading VOTables using and am having trouble. 
>>>>>  Specifically reading tables returned by the Hubble Legacy 
>>>>> Archive.  The query was:
>>>>> http://hla.stsci.edu/cgi-bin/hlaSIAP.cgi?inst=ACS&pos=11.888333,-25.288056&size=0.001389
>>>>> which I attached.
>>>>>
>>>>> I am using astropy installed by pip on the enthought distribution 
>>>>> on a mac, so its version 0.2 and numpy got upgraded to 1.7.0 (if 
>>>>> that matters).
>>>>> First, is there a way to have a votable imported directly from 
>>>>> query without saving it to a  physical file first?  Maybe its best 
>>>>> practice to save VO queries to a file to trace errors, in case the 
>>>>> votable is very large, etc. but when you know you are getting 
>>>>> something back that is small and (as in this case) you mainly want 
>>>>> a list of fields for further work, saving the full votable seams 
>>>>> like an unnecessary extra step.
>>>>
>>>> You can pass an http url to astropy.io.votable.parse, e.g.:
>>>>
>>>> In [2]: from astropy.io import votable
>>>>
>>>> In [3]: 
>>>> votable.parse("http://hla.stsci.edu/cgi-bin/hlaSIAP.cgi?inst=ACS&pos=11.888333,-25.288056&size=0.001389")
>>>>
>>>>>
>>>>> The errors I am getting are below.  I got similar errors when 
>>>>> using a different votable call I found on the HLA website 
>>>>> (basically the same except using acsSIAP.cgi?strict=1
>>>>> Is this a problem with the Votable being returned by stsci, a bug 
>>>>> or am I doing something wrong?
>>>>
>>>> Interestingly, I'm not able to reproduce the exception here.  (This 
>>>> is on Linux, with Python 2.7, astropy 0.2 and numpy 1.7.0).
>>>>
>>>> Would you mind tinkering around in the debugger for me? Turn on the 
>>>> IPython debugger with "%pdb", reproduce the crash, and then go up 
>>>> two levels and print out "array_chunk"?  I'm curious if there's 
>>>> some messed up values getting in there.
>>>>
>>>> Thanks,
>>>> Mike
>>>>
>>>>>
>>>>> Thanks,
>>>>> Andy Ptak
>>>>>
>>>>>
>>>>>
>>>>> In [4]: from astropy.io.votable import parse
>>>>> In [6]: votable = parse("test1.xml")
>>>>> WARNING: W42: test1.xml:3:0: W42: No XML namespace specified 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W03: test1.xml:7:4: W03: Implictly generating an ID from 
>>>>> a name 'INPUT:POS' -> 'INPUT_POS' [astropy.io.votable.exceptions]
>>>>> WARNING: W03: test1.xml:8:4: W03: Implictly generating an ID from 
>>>>> a name 'INPUT:SIZE' -> 'INPUT_SIZE' [astropy.io.votable.exceptions]
>>>>> WARNING: W03: test1.xml:9:4: W03: Implictly generating an ID from 
>>>>> a name 'INPUT:FORMAT' -> 'INPUT_FORMAT' 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W03: test1.xml:10:4: W03: Implictly generating an ID from 
>>>>> a name 'INPUT:imagetype' -> 'INPUT_imagetype' 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W03: test1.xml:11:4: W03: Implictly generating an ID from 
>>>>> a name 'INPUT:inst' -> 'INPUT_inst' [astropy.io.votable.exceptions]
>>>>> WARNING: W03: test1.xml:12:4: W03: Implictly generating an ID from 
>>>>> a name 'INPUT:hrcmatch' -> 'INPUT_hrcmatch' 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W03: test1.xml:13:4: W03: Implictly generating an ID from 
>>>>> a name 'INPUT:zoom' -> 'INPUT_zoom' [astropy.io.votable.exceptions]
>>>>> WARNING: W03: test1.xml:14:4: W03: Implictly generating an ID from 
>>>>> a name 'INPUT:autoscale' -> 'INPUT_autoscale' 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W03: test1.xml:15:4: W03: Implictly generating an ID from 
>>>>> a name 'INPUT:asinh' -> 'INPUT_asinh' [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:16:4: W06: Invalid UCD 
>>>>> 'VOX:STC_CoordRefFrame': UCD has invalid character ':' in 
>>>>> 'VOX:STC_CoordRefFrame' [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:17:4: W06: Invalid UCD 
>>>>> 'VOX:WCS_CoordProjection': UCD has invalid character ':' in 
>>>>> 'VOX:WCS_CoordProjection' [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:19:6: W06: Invalid UCD 
>>>>> 'VOX:Image_AccessReference': UCD has invalid character ':' in 
>>>>> 'VOX:Image_AccessReference' [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:82:6: W06: Invalid UCD 'VOX:Image_Format': 
>>>>> UCD has invalid character ':' in 'VOX:Image_Format' 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:91:6: W06: Invalid UCD 'VOX:Image_Title': 
>>>>> UCD has invalid character ':' in 'VOX:Image_Title' 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:94:6: W06: Invalid UCD 'VOX:Image_Naxis': 
>>>>> UCD has invalid character ':' in 'VOX:Image_Naxis' 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:97:6: W06: Invalid UCD 'VOX:Image_Scale': 
>>>>> UCD has invalid character ':' in 'VOX:Image_Scale' 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:100:6: W06: Invalid UCD 'VOX:Image_Naxes': 
>>>>> UCD has invalid character ':' in 'VOX:Image_Naxes' 
>>>>> [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:103:6: W06: Invalid UCD 
>>>>> 'VOX:WCS_CoordRefPixel': UCD has invalid character ':' in 
>>>>> 'VOX:WCS_CoordRefPixel' [astropy.io.votable.exceptions]
>>>>> WARNING: W06: test1.xml:106:6: W06: Invalid UCD 
>>>>> 'VOX:WCS_CoordRefValue': UCD has invalid character ':' in 
>>>>> 'VOX:WCS_CoordRefValue' (suppressing further warnings of this 
>>>>> type...) [astropy.io.votable.exceptions]
>>>>> ERROR: OverflowError: Python int too large to convert to C long 
>>>>> [numpy.ma.core]
>>>>> ---------------------------------------------------------------------------
>>>>> OverflowError Traceback (most recent call last)
>>>>> /Volumes/Apps_and_Docs/aptak/Dropbox/HLA/<ipython-input-6-61a1dc44cf49> 
>>>>> in <module>()
>>>>> ----> 1 votable = parse("test1.xml")
>>>>>
>>>>> /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/astropy/io/votable/table.pyc 
>>>>> in parse(source, columns, invalid, pedantic, chunk_size, 
>>>>> table_number, table_id, filename, _debug_python_based_parser)
>>>>>     114 _debug_python_based_parser=_debug_python_based_parser) as 
>>>>> iterator:
>>>>>     115         return tree.VOTableFile(
>>>>> --> 116             config=config, pos=(1, 1)).parse(iterator, config)
>>>>>     117
>>>>>     118
>>>>>
>>>>> /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/astropy/io/votable/tree.pyc 
>>>>> in parse(self, iterator, config)
>>>>>    3084             if start:
>>>>>    3085 tag_mapping.get(tag, self._add_unknown_tag)(
>>>>> -> 3086                     iterator, tag, data, config, pos)
>>>>>    3087             elif tag == 'DESCRIPTION':
>>>>>    3088                 if self.description is not None:
>>>>>
>>>>> /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/astropy/io/votable/tree.pyc 
>>>>> in _add_resource(self, iterator, tag, data, config, pos)
>>>>>    3015         resource = Resource(config=config, pos=pos, **data)
>>>>>    3016 self.resources.append(resource)
>>>>> -> 3017         resource.parse(self, iterator, config)
>>>>>    3018
>>>>>    3019     def _add_coosys(self, iterator, tag, data, config, pos):
>>>>>
>>>>> /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/astropy/io/votable/tree.pyc 
>>>>> in parse(self, votable, iterator, config)
>>>>>    2871             if start:
>>>>>    2872 tag_mapping.get(tag, self._add_unknown_tag)(
>>>>> -> 2873                     iterator, tag, data, config, pos)
>>>>>    2874             elif tag == 'DESCRIPTION':
>>>>>    2875                 if self.description is not None:
>>>>>
>>>>> /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/astropy/io/votable/tree.pyc 
>>>>> in _add_table(self, iterator, tag, data, config, pos)
>>>>>    2828         table = Table(self._votable, config=config, 
>>>>> pos=pos, **data)
>>>>>    2829         self.tables.append(table)
>>>>> -> 2830         table.parse(iterator, config)
>>>>>    2831
>>>>>    2832     def _add_info(self, iterator, tag, data, config, pos):
>>>>>
>>>>> /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/astropy/io/votable/tree.pyc 
>>>>> in parse(self, iterator, config)
>>>>>    2212 'TABLEDATA', data.iterkeys(), config, pos)
>>>>>    2213                         self.array = self._parse_tabledata(
>>>>> -> 2214 iterator, colnumbers, fields, config)
>>>>>    2215                         break
>>>>>    2216                     elif tag == 'BINARY':
>>>>>
>>>>> /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/astropy/io/votable/tree.pyc 
>>>>> in _parse_tabledata(self, iterator, colnumbers, fields, config)
>>>>>    2357
>>>>>    2358         array = _resize(array, alloc_rows)
>>>>> -> 2359         array[numrows:] = array_chunk
>>>>>    2360         if alloc_rows != 0:
>>>>>    2361             array.mask[numrows:] = mask_chunk
>>>>>
>>>>> /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/numpy/ma/core.pyc 
>>>>> in __setslice__(self, i, j, value)
>>>>>    3067
>>>>>    3068         """
>>>>> -> 3069 self.__setitem__(slice(i, j), value)
>>>>>    3070
>>>>>    3071
>>>>>
>>>>> /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/numpy/ma/core.pyc 
>>>>> in __setitem__(self, indx, value)
>>>>>    3031                 _mask = ndarray.__getattribute__(self, 
>>>>> '_mask')
>>>>>    3032             # Set the data, then the mask
>>>>>
>>>>> -> 3033 ndarray.__setitem__(_data, indx, dval)
>>>>>    3034 ndarray.__setitem__(_mask, indx, mval)
>>>>>    3035         elif hasattr(indx, 'dtype') and (indx.dtype == 
>>>>> MaskType):
>>>>>
>>>>> OverflowError: Python int too large to convert to C long
>>>>
>>>
>>
>>
>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy@scipy.org
>> http://mail.scipy.org/mailman/listinfo/astropy
>
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy@scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/astropy/attachments/20130226/187e1c68/attachment-0001.html 


More information about the AstroPy mailing list