Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad resample_spec results for MIRI LRS fixed-slit nodded exposures #8485

Closed
stscijgbot-jp opened this issue May 14, 2024 · 12 comments · Fixed by #8511
Closed

Bad resample_spec results for MIRI LRS fixed-slit nodded exposures #8485

stscijgbot-jp opened this issue May 14, 2024 · 12 comments · Fixed by #8511

Comments

@stscijgbot-jp
Copy link
Collaborator

stscijgbot-jp commented May 14, 2024

Issue JP-3624 was created on JIRA by Howard Bushouse:

Help Desk ticket INC0200735 (https://stsci.service-now.com/nav_to.do?uri=incident.do?sys_id=21db911a834e8ad05d629da6feaad3fa)) reported an issue with the resample_spec results for obs 5 in program 3786, which is a standard MIRI LRS fixed-slit nodded pair of exposures. Obs 11 in the same program is setup identically and the results for that are fine. The problem appears to be related to the way the output WCS grid is setup for the combined output image from resample_spec, such that the two input (cal) images are being combined on top of one another, without the dither/nod being taken into account. A quick look at the WCS information in the exposures for both obs 5 and 11 shows they are very similar, with all the expected ~1.9 arcsec differences in pointing between the 2 exposures in each observation. So the question is why the 2 exposures from obs 11 are being combined properly, with appropriate shifting/alignment due to the dither offset, while obs 5 is not.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Howard Bushouse on JIRA:

I'm attaching a screen grab of the two resampled/combined images created for obs 5 (on the left) and obs 11 (on the right). The combined image for obs 11 shows the combined positive spectral trace in the middle of the combined image, with the 2 negative traces (from background subtraction) flanking on either side.

The combined image for obs 5, on the other hand, shows that the two pairs of positive and negative traces from the input cal images have been aligned right on top of one another, without taking the dither/nod into account. This also results in a much narrower combined image. !Screenshot 2024-05-14 at 10.28.00 AM.png!

@stscijgbot-jp
Copy link
Collaborator Author

Comment by David Law on JIRA:

Howard Bushouse Is this problem just with the latest pipeline version or older versions too?  Wondering whether our recent LRS WCS changes might be at fault, or if this is something different.  Also tagging Greg Sloan to be aware.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Mihai Cara on JIRA:

I am sorry I may have missed this but what are these recent changes?

@stscijgbot-jp
Copy link
Collaborator Author

Comment by David Law on JIRA:

Build 11.0 includes a change to how the tilt in the LRS spectral trace is dealt with ([https://github.com//pull/8411),] but this wouldn't affect anything processed with released pipeline versions.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Howard Bushouse on JIRA:

David Law The problem happens with both jwst 1.14.0 (B10.2) and the latest B11 dev version.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by David Law on JIRA:

Howard Bushouse Thanks- sounds like it isn't the new code then.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Mihai Cara on JIRA:

Howard Bushouse For obs 11 there are two files missing that are present in the ASN:

{
    "expname": "jw03786011001_02101_00001_mirimage_cal.fits",
    "exptype": "target_acquisition",
},
{
    "expname": "jw03786011001_04101_00001_mirimage_cal.fits",
    "exptype": "target_acquisition",
},```
Could you, please, add those files to the data directory?

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Howard Bushouse on JIRA:

Mihai Cara You don't need those 2 target acquisition images in order to run the pipeline. The Stage 3 pipeline only tries to load "science" and "background" members, not target_acq.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Mihai Cara on JIRA:

Ah, it was ModelContainer that was crashing trying to load all these files. My bad. Sorry.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Mihai Cara on JIRA:

I added comparisons of before/after for obs 5 and 11. The red cross marks indicate the location of the target (from model's meta.target.ra or dec) in the resampled image computed using resampled image's WCS's inverse transform. For obs 5 the improvement is easily visible from the image. For obs 11, images look similar to the eye but one can see an improvement in the position of the target in the resampled image computed from target's world coordinates and the inverse WCS transformation. Within the trace, the numerical differences are about 2-5% but can be much larger in the background regions. I think this is caused by a different resample grid computation using a new computed position of the slit and I think it is expected.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Howard Bushouse on JIRA:

Mihai Cara New results look great!

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Howard Bushouse on JIRA:

Fixed by #8511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant