GeminiDRSoftware / DRAGONS

Data Reduction for Astronomy from Gemini Observatory North and South
Other
27 stars 16 forks source link

Improve GSAOI reduction/absolute astrometry #423

Open chris-simpson opened 1 year ago

chris-simpson commented 1 year ago

The best way to do absolute astrometry for GSAOI is (probably) to align the individual images to themselves and ignore an external REFCAT until near the end and then add this absolute astrometric alignment to all of the input images. Effectively this would mean moving addReferenceCatalog() and determineAstrometricSolution() later in the recipe and having a significant rewrite of the latter primitive.

Having done adjustWCSToReference() there are two ways forward:

  1. Produce a final stack in a stream, run detectSources() on this stack, and compute an alignment/distortion map from that, which can be applied to each input. This is memory intensive.
  2. Simply combine the individual OBJCATs (since we use the KDTreeFitter, we might not even need to merge multiple detections of the same source in the different inputs but can leave them as multiple entries, which would make this much simpler).

I guess what we want is to take the universal set of OBJCAT (RA, DEC) coords and the REFCAT coords and convert them both to (x, y) using the reference image's WCS, and then compute the mapping between these pixel coords and add that into the gWCS pipeline of all inputs. The reference should have a WCS like

pixels -> static -T> world

while the other inputs have

pixels -> static -> variable -T> world

and the transform marked "-T>" should be identical in all inputs after adjustWCSToReference() I think. If not, more thought is required. Then we replace "-T> world" with "-> aligned -T> world". I think "-T>" is just a standard imaging projection.