spacetelescope / jwst

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

Move NIRSpec FS point source position assignment out of wavecorr #8536

Closed stscijgbot-jp closed 4 months ago

stscijgbot-jp commented 5 months ago

Issue JP-3648 was created on JIRA by Christian Hayes:

For NIRSpec fixed slit observations of point sources, the point source position in the slit is added during the wavecorr step (see wavecorr.get_source_xpos), but is also used in later steps (pathloss, extract1d).  If users skip the wavecorr step the source_xpos and source_ypos will default to 0 for the later steps.  

Assigning the source position does not depend on any the processing in the wavecorr step and it would be better to add the source position earlier in the spec2 pipeline (perhaps during assign_wcs?) so that it can be propagated forward even if the wavecorr step is skipped.

stscijgbot-jp commented 5 months ago

Comment by Howard Bushouse on JIRA:

I agree that if we want to move this out of wavecorr, the most logical place to put it is in the assign_wcs step, where all of the Slit instances are created and populated to begin with. That should also guarantee that the position values are always populated, because if someone were to skip assign_wcs, they can't do ANY other processing downstream (so it will always be applied).

stscijgbot-jp commented 5 months ago

Comment by Ned Molter on JIRA:

Based on some discussion with the pipeline team, I will try an initial implementation that populates these source positions in assign_wcs, and then re-sets the extended source positions to zero inside the srctype step.

stscijgbot-jp commented 4 months ago

Comment by Howard Bushouse on JIRA:

Fixed by #8569

stscijgbot-jp commented 4 months ago

Comment by Christian Hayes on JIRA:

I tested the changes and they look good to me.  Closing the ticket.