astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
705 stars 397 forks source link

Gaia.query_object_async doesn't use the specified box width (with an example) #2738

Closed Sfosch closed 1 year ago

Sfosch commented 1 year ago

Hi!

I use the Gaia.query_object_async function in order to obtain the characteristics of all the sources in the field of view of my instrument. I use the RA/DEC of the FOV's center, the box width and height. I know the dimensions of my FOV: Width= 60arcmin and Height=45arcmin.

The problem is that the Gaia.query_object_async function does not seem to use the width I specified.

The code :

from astropy.coordinates import SkyCoord
import astropy.units as u
from astroquery.gaia import Gaia

coord_center=SkyCoord(277.42178939, 85.22189605, unit=(u.degree, u.degree), frame='icrs',obstime='J2016')  #RA/DEC of the FOV center
width=60
height=45
result = Gaia.query_object_async(coordinate=coord_center, width=u.Quantity(width,u.arcmin), height=u.Quantity(height,u.arcmin))

Then I use the coordinates of all the sources obtained in the query result in order to plot the position of each source on my image. Here is the result using width=60 arcmin: FOV_60arcmin

The result gives the sources in about 1/10 of the query's width.

Here is the result using width=600 arcmin FOV_600arcmin

This is 10 times the width of my images, the FOV is not correctly sampled.

The height is not a problem and works fine but not the width.

Actually, on some field of view the width works fine, on some other like this one the width doesn't work well.

Here is another field of view but for which the width of 60arcmin worked well: FOV_60arcmin_WASP180 We see very few stars because each star is marked with a red cross.

I don't understand what is the problem in my query for the first example.

Can I have some help please? :)

Thanks! Clear skies,

Sacha

bsipocz commented 1 year ago

Have you tried to change the default ROW_LIMIT? Examples are in the docs: https://astroquery.readthedocs.io/en/latest/gaia/gaia.html#examples

Sfosch commented 1 year ago

Hi, Yes, I always use Gaia.ROW_LIMIT=-1. It's a detail I forgot to mention, sorry!

eerovaher commented 1 year ago

Does the Gaia archive web interface produce the same output?

Sfosch commented 1 year ago

Sorry for my delay of answer.

Thank you for the tip! I tried and it gave me the right result but not the same as my issue. The box in the web interface uses the minimum and maximum RA and DEC, not the center of the box, width and height of the FOV as in the python function.

Sfosch commented 1 year ago

Okay I found out my mistake.

Actually, I wanted to use the field of view of my camera, i.e. 60 arcmin of width as an interval of Right Ascension. It can not work like this. Because the box's width is a Right Ascension value and not an angle on the plane of the sky. The sky is a sphere. The relation 1° = 0h04m00sec in RA is true only along the celestial equator. At 85° of Dec, 1° on the sky is actually ~00h50m00sec in RA. That's why I had to increase the width value up to ~10 times my 60arcmin (it was actually 12times).

Now I know.

I close the issue! Thanks!