-
-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to query_region using 'II/349/ps1" catalog #2887
Comments
Good catch, looks like we have a corrupted file on VizieR side. We're investigating to get it back in shape soon! Thanks for reporting. |
Aaaaah no! Actually it's the division in your criteria for "e_gmag". The |
Thanks @ManonMarchand, this worked. |
The vizier code has been fixed to encode QUERY_RESULT text. The correction will be available in the next version. |
Will close this once next version becomes available to its easier to track. Is it possible to link the release to this issue? @gilleslandais |
@StandinKP : just to be clear, this won't make |
Yes Yes. I got that. Thanks |
I'm closing this as it appears to be upstream and there isn't really much we'll do about this in the next astroquery release. |
from astroquery.vizier import Vizier
w = WCS(header)
[raImage, decImage] = w.all_pix2world(data.shape[0]/2, data.shape[1]/2, 1)
boxsize = 30 # arcminutes
maxmag = 18
catNum = 'II/349/ps1'
print('\nQuerying Vizier %s around RA %.4f, Dec %.4f with a radius of %.4f arcmin'%(catNum, raImage, decImage, boxsize))
try:
#You can set the filters for the individual columns (magnitude range, number of detections) inside the Vizier query
v = Vizier(columns=['*'], column_filters={"gmag":"<%.2f"%maxmag, "Nd":">6", "e_gmag":"<1.086/3"}, row_limit=-1)
Q = v.query_region(SkyCoord(ra = raImage, dec = decImage, unit = (u.deg, u.deg)), radius = str(boxsize)+'m', catalog=catNum, cache=False)
#query vizier around (ra, dec) with a radius of boxsize
print(Q[0])
except:
print('I cannnot reach the Vizier database. Is the internet working?')
Using the above code with
astropy: '6.0.0'
astroquery: '0.4.6'
The same code works for 'I/345/gaia2' and 'II/246' as well. Can anyone help with this?
The text was updated successfully, but these errors were encountered: