Unexpected radius limit in Astroquery.mast.MastMissions.query_region
- Dominant language
- Python
- Stars
- 791
- Forks
- 451
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
Hi,
I found a potential bug in Astroquery.missions.query_region. The code is not able to find observations beyond a 0.5 deg radius, regardless of the radius stated in the input. Here I attach a reproducible example:
[ There are a few HST/ACS observations at ra=85.189696, dec=-1.942572]
```
import astropy.units as u
from astroquery.mast import MastMissions
from astropy.coordinates import SkyCoord
missions = MastMissions(mission='hst')
regionCoords = SkyCoord(ra=85.189696, dec=-1.942572, unit=('deg', 'deg'))
# Use missions.get_column_list() to get the complete list of columns and their specifications.
results = missions.query_region(regionCoords, radius=20*u.deg,
select_cols=["sci_ra", "sci_dec", "sci_ra_v1", "sci_dec_v1",
"sci_start_time", "sci_stop_time", "sci_actual_duration",
"sci_instrume", "sci_instrument_config", "sci_operating_mode",
"sci_central_wavelength", "sci_sun_alt", "sci_obs_type",
"sci_status", "ang_sep", "sci_expflag", "sci_program_id", "sci_data_set_name",
"sci_obset_id", "sci_aec"],
sort_by=['sci_targname'])
print(results)
# This prints a few results. There are ACS observations close (less than 1 deg) to ra=85.189696, dec=-1.942572,
# Now the same query but closer by 10 degres.
regionCoords = SkyCoord(ra=90.189696, dec=-1.942572, unit=('deg', 'deg'))
results = missions.query_region(regionCoords, radius=20*u.deg,
select_cols=["sci_ra", "sci_dec", "sci_ra_v1", "sci_dec_v1",
"sci_start_time", "sci_stop_time", "sci_actual_duration",
"sci_instrume", "sci_instrument_config", "sci_operating_mode",
"sci_central_wavelength", "sci_sun_alt", "sci_obs_type",
"sci_status", "ang_sep", "sci_expflag", "sci_program_id", "sci_data_set_name",
"sci_obset_id", "sci_aec"],
sort_by=['sci_targname'])
print(results)
# This does not print anything. It is away from the original target by 5 degrees, and the search_radius is 20 deg!
```
Is this a bug or a misuse of query_region?
Edit: Is this the same error that is being discussed here (https://github.com/astropy/astroquery/issues/2659#issuecomment-1424292767)?
Contributor guide
Research direction
Start at the MastMissions.query_region entry point and run the reproducible Python example from the issue with 20 degrees. Trace how the radius is handled for the two coordinates, then verify that the query returns observations within the requested radius, including the nearby HST/ACS observations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100