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

New error in imaging level 3 in pipeline 1.15.0: tweakreg parameter changes are needed for NIRISS. #8641

Closed stscijgbot-jp closed 3 weeks ago

stscijgbot-jp commented 2 months ago

Issue JP-3688 was created on JIRA by Kevin Volk:

When re-running some imaging reductions in level 3 in pipeline build 11.0 (1.15.0) that were previously fine for pipeline build 10.2 (1.14.0) or before a new error message is seen in the log file:

stpipe.Image3Pipeline.tweakreg - ERROR - Parameter 'separation' must be larger than 'tolerance' by at least a factor of sqrt(2) to avoid source confusion.

In response to this error the tweakreg step is skipped in the processing. It was not immediately obvious in the level 3 "i2d" file that resulted from this test because the data set used is four images with small dithers between the exposures, so even without corrections between the four images the WCS values produced a reasonable resampled image. In a more complex case it is likely that a very poor level 3 resampled image will be produced when tweakreg is skipped. One can see this in the output fits header S_TWKREG value, which is SKIPPED now rather than COMPLETE. But I do not routinely check these keywords unless the output level 3 products seem to have an issue.

In the current NIRISS tweakreg parameter files the tolerance parameter is set at 1.0 and the same value is used for the separation parameter. This has been the case for a long time. In the past there has not seemed to be any issue with this. The pipeline documentation currently says that the separation value has to be larger than sqrt(2) times the tolerance value, but that was presumably not the case some years ago when the first set of tweakreg parameters was defined for NIRISS imaging. As far as I know the tolerance and separation values have not been updated since the first attempt to define the NIRISS tweakreg parameters well before launch. Setting the separation parameter to a value of 1.5 removes the issue, and everything runs as expected.

This seems to be more a case of failure to communicate to the NIRISS team that the code has been changed to flag this situation as an error, so that we could respond and see that the parameter files are updated. As things stand now, the tweakreg step will always be skipped in the automated processing for NIRISS imaging. This is not an issue with the pipeline code as such, just a parameter file issue.

stscijgbot-jp commented 1 month ago

Comment by Rachel Plesha on JIRA:

New tweakreg parameter reference files were delivered July 25 as part of jwst_1255.pmap

David Law is there anything else that needs to be done with this ticket?

stscijgbot-jp commented 1 month ago

Comment by David Law on JIRA:

Rachel Plesha If you're satisfied that the new param ref file fixes this error then we can close this ticket.

stscijgbot-jp commented 3 weeks ago

Comment by Rachel Plesha on JIRA:

The NIRISS team is satisfied with the resolution of delivering the new tweakreg parameter reference files, delivered July 25 as part of jwst_1255.pmap