[AstroPy] Dependence on field order in astroquery

Adam Ginsburg adam.g.ginsburg at gmail.com
Wed Jul 1 11:31:03 EDT 2020


Hi Julien,
     Thanks for raising this issue and giving a complete minimum working
example.  It would be better posted as an issue on our issue tracker:
https://github.com/astropy/astroquery/issues

That said, I can't reproduce the problem - I get good results with either
order.  I suspect you may have a cached query that was bad.  You can try
clearing the cache with:
https://docs.astropy.org/en/stable/api/astropy.utils.data.clear_download_cache.html

or by removing files in
~/.astropy/cache/astroquery/Vizier/
(which is the default cache directory)

On Wed, Jul 1, 2020 at 11:22 AM <julien.montillaud at univ-fcomte.fr> wrote:

> Hi,
>
>    I am using astroquery to query Gaia data as follows:
>
> from astroquery.vizier import Vizier
> import astropy.coordinates as coord
> import astropy.units as u
>
> v1 = Vizier(columns=['phot_g_mean_mag', 'parallax', 'a_g_val',
> 'phot_bp_mean_mag', 'phot_rp_mean_mag'])
> v1.ROW_LIMIT = -1
>
> c_l, c_b = 298.1, -0.1
> query_angle = 0.25
> raw_los2 = v1.query_region(coord.SkyCoord(l=c_l, b=c_b, unit=(u.deg,
> u.deg), frame="galactic"), radius=query_angle*u.deg, catalog="I/345/gaia2")
> print(raw_los2)
>
> With this code, I get:
> > TableList with 1 tables:
> >    '0:I/345/gaia2' with 5 column(s) and 69866 row(s)
>
> But if I invert the bp and rp bands in the "v1 = ..." line, I get this:
> > Empty TableList
>
> Of course I could just use the order that works, but it depends on the
> line of sight, so in a loop, sometimes it works, sometimes it does not, and
> I did not figure out the underlying logic.
>
> Am I doing something wrong or is there something weird here?
>
>
> Thanks !
> Julien
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>


-- 
Adam Ginsburg
Assistant Professor, Department of Astronomy
University of Florida, Gainesville
http://www.adamgginsburg.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20200701/2a895662/attachment.html>


More information about the AstroPy mailing list