0 votes
190 views

I am trying to download some cutouts with the SIA service. However, when I specific a cutout of 4'x4', I obtain an image with ~2.5'x~2.5'. If I ask for a cutout of, let's say 8'x8', I get ~5'x~5'. I also tried to change the parameters intersect to {'COVERS', 'ENCLOSED', 'OVERLAPS', 'CENTER'} and still obtain the same results.

Here is the piece of code to reproduce what I am getting:

from astropy import units as u
from astropy.coordinates import Angle
from pyvo.dal import sia


DEF_ACCESS_URL = "https://datalab.noirlab.edu/sia/des_dr2" # DES SIA service URL
svc = sia.SIAService(DEF_ACCESS_URL)


ra, dec = 73.4708333, -50.3763611

# 4amin
imgTable = svc.search((ra,dec), (Angle(4 * u.arcmin), Angle(4 * u.arcmin)), intersect='CENTER', verbosity=0).to_table()
onlyImage = imgTable[(imgTable['prodtype']=='image') & \
                     ((imgTable['obs_bandpass'] == 'g DECam SDSS c0001 4720.0 1520.0'))].to_pandas()
print(onlyImage['access_url'][1])

# 8amin
imgTable = svc.search((ra,dec), (Angle(8 * u.arcmin), Angle(8 * u.arcmin)), intersect='CENTER', verbosity=0).to_table()
onlyImage = imgTable[(imgTable['prodtype']=='image') & \
                     ((imgTable['obs_bandpass'] == 'g DECam SDSS c0001 4720.0 1520.0'))].to_pandas()
print(onlyImage['access_url'][1])

And a snapshot of DS9 where I measured the images:

by lagrangiana (280 points) | 190 views

2 Answers

+1 vote
Best answer
I had a closer look at what the DS9 ruler was doing and how the cutout is being generated.  The DS9 ruler measures the  angular separation between endpoints of the region,  I was looking at the size of the cutout in the image coordinate system.  This is also how the cutout size is being generated, but in re-reading the SIA spec the intent of the SIZE values is to requests a cutout of a certain angular size.  The difference here being the cos(dec) term.

So, the cutout tool has been changed to cutout a raster based on the angular size and should now return a cutout more or less the requested size at all declinations.  Note however that cutouts may still be clipped to the image boundaries and so aren't zero-filled or anything to return a full raster.  The SIA search only guarantees the requested position is covered, not the full cutout region, so this follows the "intersect=CENTER" model.

Thanks for pointing out the issue and please let us know if you still have problems.
by datalab (21.2k points)
selected by 1719
0 votes
I ran your code but the images I get back I measure as the correct size.  Is it possible you've got something set in your DS9 that is throwing off the measurement (e.g. a Project or WCS system)?  It's interesting to note the difference is a factor of cos(dec) but I am unable to reproduce the measurement.
by datalab (21.2k points)
I am not sure if this is an issue with my DS9 because if I run the same code, but with different coordinates, lets say:

ra, dec = 11.6420833, -1.5823889

I obtain a cutout with ~4 arcmin, as expected.
Please, take a look in this scratch notebook: https://github.com/oliveirara/sia_service_debug/blob/main/SIA_Service.ipynb.

Perhaps there is a better way of measuring images with Astropy.

432 questions

448 answers

451 comments

648 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.

Categories