If I have a set of RA, Dec (e.g., a 2-column text file with RA, Dec in decimal degrees), what are good ways to perform forced-photometry at those RA, Dec positions on an image that has been astrometrically and photometrically calibrated?
I’m interested in the case of both
single image
subtracted image
I understand how forcedPhotCcd.py is supposed to work if I already have a set of sources in a coadd source catalog (CoaddSrcReferencesTask) or multi-band reference catalog (MultiBandReferencesTask). But I’m not clear on how best to easily create a minimal source catalog just based on a simple list of RA, Dec.
I think your best bet is to use lsst.meas.base.ForcedMeasurementTask directly. That isn’t a CmdLineTask, so you’ll have to write a bit of Python to use it, but it has decent reference documentation.
One big catch is that you will - as you’ve guessed - have to pass it a minimal SourceCatalog containing the positions of the objects you want to measure. You’ll also need to set up a dummy centroider to set the output shape slot from the reference catalog. Unfortunately, we usually use ForcedTransformedCentroid to do that, but it actually transforms pixel-coordinate centroids from the reference to the measurement frame (via both WCSs) rather than looking at the ra,dec coord. We probably need to add a similar plugin that uses the coord to enable ra,dec forced photometry.
I wrote a task to perform force photometry on DIA sources, which might be helpful as a starting point to insert your own source loading: forcePhotDiaSources.py. Jim’s caveat about having to create your own SourceCatalog still applies, and I think that’s probably the biggest hurdle.
This is also a use case for the #suit - we believe that users will want to be able to bring in coordinates from other surveys/catalogs and perform forced photometry on LSST single-epoch and coadded images. This has to work both at an API (Python) level and as a GUI-driven capability.
It is therefore definitely a requirement on the SuperTask design that it can accommodate “input: image, list of coordinates; output: catalog”. So at some point - maybe not in the current 6-month cycle, but soon thereafter - we should prove that out and build such a tool.
If you have footprints in some other coordinate system you can transform them. If you have ellipses for the objects, you can create footprints from those. If you have neither, creating circular footprints the size of the PSF is the best I can come up with.
I implemented forced-position photometry based on an external catalog in the context of Twinkles (obs_lsstsim). See my notes in the following GitHub repo:
*** Note this relies on a specific branch of meas_base: u/wmwv/radeccentroid to implement the ForcedRaDecCentroid plugin.***
Specifically the README:
Which currently (2017-01-30) consists of:
Twinkles single-image subtractions and forced photometry