Open BrunoSanchez opened 3 years ago
For people interested in this sprint we are meeting in DESC 26 zoom room at 2 PM EST!
Maybe this helps
def ra_dec_box_to_xy(wcs, box, ra, dec):
# build the array of XY coordinates in FoV for SNe
sncoord = [geom.SpherePoint(r, d, geom.degrees) for r, d in zip(ra, dec)]
snxy = [wcs.skyToPixel(coord) for coord in sncoord]
x = [acoord.x for acoord in snxy]
y = [acoord.y for acoord in snxy]
in_ccd = [box.contains(geom.Point2I(acoord)) for acoord in snxy]
return x, y, in_ccd
This queries could speed up your script:
cal_wcs = butler.get('deepCoadd_wcs', dataId=dataId)
c1 = cal_wcs.pixelToSky(x=cal_box.beginX, y=cal_box.beginY)
c2 = cal_wcs.pixelToSky(x=cal_box.beginX, y=cal_box.endY)
c3 = cal_wcs.pixelToSky(x=cal_box.endX, y=cal_box.beginY)
c4 = cal_wcs.pixelToSky(x=cal_box.endX, y=cal_box.endY)
ra1 = c1.getRa().asDegrees()
dec1 = c1.getDec().asDegrees()
ra2 = c2.getRa().asDegrees()
dec2 = c2.getDec().asDegrees()
ra3 = c3.getRa().asDegrees()
dec3 = c3.getDec().asDegrees()
ra4 = c4.getRa().asDegrees()
dec4 = c4.getDec().asDegrees()
get bounding box:
bbox = butler.get('deepCoadd_bbox', dataId=dataId=dataId)
another method to extract coadd infomation:DRP image processing resource estimator, extract_coadds
Sky Coordinates of DC2 in Jupyter Hub
Mapping Sky Coordinates to DC2 deepCoadd in Jupyter Hub
Contacts: @shuliu2017 @BrunoSanchez Day/Time: Synchronous, PT/EST, Wednesday Main communication channel: desc-dc2-dia GitHub repo: https://github.com/LSSTDESC/dia_improvement/blob/sprint/tutorials/DC2-sky_coordinate.ipynb
/global/cfs/cdirs/desc-sn/dia/data/shl159/sprint/DC2-sky_coordinate.ipynb
Goals and deliverable
We want to produce calexps and deepCoadds from DC2. Given a list of sky coordinates, what is the the proper method to use to find the DC2 deepCoadd/calexp images in LSST Jupyter hub? More specifically, we want to answer:
Resources and skills needed
Anyone interested in learning about DC2 dataset. It might be required to have access to Jupyter Hub at Cori NERSC.
Detailed description