MickaelRigault / ztfquery

Access ZTF data from Python
Apache License 2.0
37 stars 18 forks source link

Downloading image cutouts instead of the full image #34

Closed JTerwel closed 1 year ago

JTerwel commented 2 years ago

Usually I only need to see a small region around my object of interest. Downloading the entire image is not needed. IRSA allows one to query for a cutout, as is show near the bottom of this page.

Can an option be added to ztfquery where I can ask to only download the image cutouts? This would speed up my code considerably.

simeonreusch commented 1 year ago

Jacco, this is brilliant.

MickaelRigault commented 1 year ago

Thanks for pushing this @simeonreusch I beleive it should not be that complicated to add to the url builder

simeonreusch commented 1 year ago

Already on it. Modifying the url is trivial. What's harder is making ztfquery respect a different parent directory (if you don't do that, running forced photometry on a source in the same field will fail, as it won't be part of the cutout).

MickaelRigault commented 1 year ago

Do you want the cutout service to store data ?

simeonreusch commented 1 year ago

Of course I do. But no worries, I'm almost done

MickaelRigault commented 1 year ago

Any progress on that @simeonreusch ?

simeonreusch commented 1 year ago

Yes, it's implemented. The keyword is cutouts=True (you also need to specify radec). If one does this, one should also specify download_dir to avoid not finding objects observed with the same CCD which won't be in the cutouts.