This page archives Slack comments from the focused discussion on image alilgnment during the Improving JWST Data Products Workshop (IJDPW).

see also the dedicated splinter here



Harry Ferguson

@Armin Rest Is JHAT using the same approach as tweakwcs to update the gwcs in the datamodel?  I think for tweakwcs, the correction is implemented as an additional step in the gWCS pipeline, rather than modifying any of the parameters of the existing wcs.

Armin Rest

Yes, we use tweakwcs. We had a hacked version for a while that allowed us to pass matched pairs of x,y and RA,Dec (@Justin Pierel did the hack), but I think now it can be done without a hack


Zhen-Kai Gao

Just sharing some experiences. Recently we encountered a WCS misalignment problem in NIRCam F277W and F444W (maybe also F356W and F410M) "jw01837004020". The offset is about 15 arcsec in Dec, which is really large for TweakReg to do absolute WCS alignment by default. A solution we have worked out is to run TweakReg with default parameters on a dither set (because they seem to share a common WCS information) and see if there is a warning message saying something like "Not enough matches". If this warning appears, we increase `abs_searchrad` from 6" to 50" to allow for a larger range in the pair matching. The absolute reference catalog used here is LegacySurveys DR 9 as suggested by GRIZLI (Brammer). However, I still have no idea how this 15" offset came about. I hope that a future pipeline will be able to automatically detect and resolve such images with large offsets. (


Tony Sohn

Hi @Zhen-Kai Gao, thanks for sharing this with us. I'm a staff scientist at STScI working on pointing-related issues for JWST. I can confirm that the images from program 1837 obs 4 visit 2 are offset from the commanded pointing by around 15 arcsec, mostly in the Dec direction (see first image attached below - green circles are Gaia DR2 source locations based on the WCS, and red arrows point to the observed locations of Gaia stars for two cases). This is by far the largest offset I have seen so far!I've taken a look at the guiding data and confirmed that the guider locked onto a star ~15 arcsec away (see Commanded GS vs. Observed GS in the second image attached). The WCS is populated based on the sky coordinates of the guide star and its observed position within the FGS detector. In this case, the telescope/guider "thought" it was guiding on the commanded GS, and therefore the guiding was flagged as successful (which is fair since the fine-guiding itself didn't have any problem). The unguided pointing of JWST can be offset by up to 10-15 arcsec, so we're truly seeing one of the most extreme cases here. This observation was taken on Jan 2023, and there have been additional measures for guiding implemented after that date to prevent some cases like these. The focal plane alignment of SIs and FGS are also being improved over time, which will also remedy these issues.As for the pipeline, I believe there is currently no easy way to automatically identify offsets as large as this one. However, if you do encounter such WCS mismatches in the future, please don't hesitate to contact the help desk.


Sarah Kendrew

To add to @Tony Sohn’s comments - the FGS team can produce quite detailed analyses of the guide star acquisition process for a particular program if the data show WCS issues. these usually come in a nice set of powerpoint slides. so if you have questions or you can see a problem in your data, if you contact the Helpdesk for the particular instrument, we can then get that additional information from FGS to share with you. (I have personally learnt a LOT from users’ WCS problem reports and subsequent conversations with FGS, so do send in your questions.


Zhen-Kai Gao

Thank you for the detailed explanations. I will contact the Helpdesk once I found a new problem in the data.
I have another question about TweakReg. Does the relative alignment part take into account the distortion of each image?

Tony Sohn

yes




  • No labels