spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
561 stars 167 forks source link

Make source_catalog output compatible with tweakreg #8639

Open stscijgbot-jp opened 2 months ago

stscijgbot-jp commented 2 months ago

Issue JP-3686 was created on JIRA by Sarah Kendrew:

A common use case for astrometric alignment, especially for fields that are sparse in stars so aligning to Gaia doesn't work well, is to use the output catalog of one filter image as absolute reference catalog to align the other filters. Especially when the field coverage between filters is very similar, this works well. However the output of the source_catalog step puts the sky coordinates of the sources in a field called "sky_centroid", which contains SkyCoord objects (i.e. 2 comma-separated values for RA and Dec); the tweakreg step requires dedicated columns 'RA' and 'DEC' when a custom catalog is passed for the abs_refcat parameter. This means that for this common approach to astrometric alignment, the user always has to read in the catalog file, and convert the sky_centroid column to 2 separate RA and DEC columns. This is trivial, but it's an annoying extra step. 

It would be really nice if these steps could be joined up better, either by replacing the sky_centroid field in the source catalog by 2 separate RA and DEC columns, or by making the tweakreg step have the ability to read in SkyCoord objects. 

Perhaps there is a good reason why this isn't possible, or advised - please explain if that is the case!