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

WFSS traces not centered in the extraction boxes #5640

Closed
stscijgbot-jp opened this issue Jan 19, 2021 · 11 comments · Fixed by #5809
Closed

WFSS traces not centered in the extraction boxes #5640

stscijgbot-jp opened this issue Jan 19, 2021 · 11 comments · Fixed by #5809

Comments

@stscijgbot-jp
Copy link
Collaborator

stscijgbot-jp commented Jan 19, 2021

Issue JP-1863 was created on JIRA by Swara Ravindranath:

The spectral traces are offset in the extraction boxes in the cross-dispersion direction. The issue was noticed and reported in JP-1385. Tested the build 0.18.2 and the issue still exists. The offset of the spectral trace will affect the fluxes in the extract_1d step.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Tyler Pauly on JIRA:

Hi Swara Ravindranath, do you have a grp directory holding your test data so I can try to reproduce? If this is using the dataset provided by Camilla in JP-1385, no worries - I've started looking at it in the interim and can proceed with that.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Swara Ravindranath on JIRA:

Tyler Pauly    I used different datasets, but you may notice the same issue with the ones provided in JP-1385. I can put the datasets I used for the latest pipeline build test on box and send you the link. Will that work?

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Tyler Pauly on JIRA:

Swara Ravindranath That should work best, I think. I'm running into issues with the old dataset not conforming to current pipeline standards, and I'm getting some garbage results that I'd rather not have to deal with. Thanks for your help!

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Megan Sosey on JIRA:

Something additional to check: the original intent of the code was not to center the extraction boxes, but to create an extraction box around the dispersed spectrum that extended to the red and blue ends according to the cutoff wavelengths specified in the wavelengthrange reference file, and its specific to the spectral order being extracted. The box size uses the corners of the minimum bounding box around the object as specified in the catalog, those corners may not be rectangular or of equal area in the cross dispersion direction, worth checking

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Tyler Pauly on JIRA:

Swara Ravindranath I've submitted an initial PR which should be linked here. I've attached here the change seen in the extracted sources with the code fix implemented. We've noticed that the remaining error is found on sources that lie in coincident space on the sky, which may point to issues in the transforms. I've attached a detector image with annotated sources, then two spec2 extractions - one with the prior 'default' pipeline, and one with the modifications presented in the PR.

[^cal_00008_default.pdf] [^cal_00008_modification.pdf] [^image_annotated.pdf]

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Howard Bushouse on JIRA:

Reopening temporarily just to get status reset properly.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Howard Bushouse on JIRA:

Swara Ravindranath we're going to reassign this back to you, at least for now, for further testing. If additional problems are discovered we can revisit.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Swara Ravindranath on JIRA:

Howard Bushouse Tyler Pauly

Just to give an update that I have started to test this. I ran into issues with the image3 step with image combination removing some of the stellar cores. I am running the same Jupyter notebook as always for the tests, and its not clear yet what could be going wrong. Once I figure that out, I will continue with the steps to calwebb_spec2 and report here about the 2d-cutouts and extraction boxes.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Swara Ravindranath on JIRA:

Tyler Pauly Attached are 3 figures from the test using the following versions:

Versions
astropy: 4.2
pipeline: 1.1.1.dev39+g8e029b69
asdf: 2.7.3
jwst: 1.1.1.dev39+g8e029b69

I am still finding that the some traces are off-centered within the extraction boxes. For sources 3, 9, 11, 12, 13 and 18 look fine. Others are still not centered in the box.

 

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Camilla Pacifici on JIRA:

Testing on 1.4.7a1.dev11+ge6625cbd the problem seems solved. See screenshot pipeline_test_extraction_boxes.png.
Ignore the row without a trace. It was a spurious detection from image3.

!pipeline_test_extraction_boxes.png|thumbnail!

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Howard Bushouse on JIRA:

thanks Camilla Pacifici. Closing this ticket.

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