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

Improved model for MIRI cruciform artifact, part 1 #837

Merged
merged 3 commits into from May 17, 2024

Conversation

mperrin
Copy link
Collaborator

@mperrin mperrin commented May 3, 2024

Summary:

This PR implements an improved model for the cruciform artifact seen in MIRI, in particular modeling the shifts of the cruciform lines as a function of position. This is motivated by comparisons with actual MIRI ePSFs by Libralato et al. 2024.

The key changes are

  • switching from applying 2 x 1D convolution kernels to applying a single 2D convolution kernel
  • Implementing a simple linear parameterization for shifts of the X and Y bright lines, derived from measured MIRI ePSFs in F560W.

Example plots showing the outputs and comparing to data are included below.

This is intended as the first PR of at least two for improving the MIRI ePSFs (broken up for complexity and to keep the reviews more manageable / bite-sized). A next step would add in models for the 'peaks' in the cruciform, as predicted by Gaspar et al, and as observed in MIRI LRS ePSFs.

A few additional pieces

There's also a little helper function for displaying the cruciform models, which is not used in calculations but helps visualize what's going on:

Screenshot 2024-05-03 at 1 53 56 PM

As you can see in the above, this PR also adds a model for the diffuse radial halo part of the "cruciform". See Figure 12 of Gaspar et al. 2021. This is a small but nonzero portion of the cruciform physics which we previously have neglected; this portion of the model is harder to base in empirical data given SNR of available ePSFs, but it seems

Example outputs and comparisons with data

Comparisons: F560W

Comparisons: F770W

@mperrin mperrin requested a review from obi-wan76 May 3, 2024 18:08
@mperrin mperrin self-assigned this May 3, 2024
@pep8speaks
Copy link

pep8speaks commented May 3, 2024

Hello @mperrin, Thank you for updating !

Line 403:94: W292 no newline at end of file

Line 63:9: E266 too many leading '#' for block comment
Line 63:126: E501 line too long (149 > 125 characters)
Line 110:9: E722 do not use bare 'except'
Line 171:126: E501 line too long (128 > 125 characters)
Line 287:126: E501 line too long (126 > 125 characters)
Line 288:68: E231 missing whitespace after ','
Line 288:72: E231 missing whitespace after ','
Line 289:68: E231 missing whitespace after ','
Line 289:70: E231 missing whitespace after ','
Line 291:1: E302 expected 2 blank lines, found 1
Line 314:16: E226 missing whitespace around arithmetic operator
Line 315:26: E201 whitespace after '('
Line 317:5: E266 too many leading '#' for block comment
Line 317:60: W291 trailing whitespace
Line 320:15: E226 missing whitespace around arithmetic operator
Line 320:18: E226 missing whitespace around arithmetic operator
Line 334:86: W291 trailing whitespace
Line 337:37: E226 missing whitespace around arithmetic operator
Line 338:40: E226 missing whitespace around arithmetic operator
Line 340:5: E266 too many leading '#' for block comment
Line 343:19: E226 missing whitespace around arithmetic operator
Line 343:32: E226 missing whitespace around arithmetic operator
Line 344:16: E221 multiple spaces before operator
Line 344:29: E226 missing whitespace around arithmetic operator
Line 344:31: E226 missing whitespace around arithmetic operator
Line 345:20: E127 continuation line over-indented for visual indent
Line 378:50: E127 continuation line over-indented for visual indent
Line 378:106: E251 unexpected spaces around keyword / parameter equals
Line 378:108: E251 unexpected spaces around keyword / parameter equals
Line 381:5: E303 too many blank lines (2)
Line 494:9: E128 continuation line under-indented for visual indent
Line 494:27: E251 unexpected spaces around keyword / parameter equals
Line 495:19: E251 unexpected spaces around keyword / parameter equals
Line 495:21: E251 unexpected spaces around keyword / parameter equals
Line 495:51: E226 missing whitespace around arithmetic operator
Line 495:55: E202 whitespace before ')'
Line 515:85: E231 missing whitespace after ','
Line 520:33: E226 missing whitespace around arithmetic operator
Line 520:50: E226 missing whitespace around arithmetic operator
Line 522:13: E225 missing whitespace around operator
Line 522:19: E226 missing whitespace around arithmetic operator
Line 522:27: E226 missing whitespace around arithmetic operator
Line 522:36: E226 missing whitespace around arithmetic operator
Line 522:44: E226 missing whitespace around arithmetic operator
Line 525:9: E128 continuation line under-indented for visual indent
Line 525:27: E251 unexpected spaces around keyword / parameter equals
Line 533:14: E231 missing whitespace after ','
Line 533:16: E231 missing whitespace after ','
Line 536:1: W391 blank line at end of file

Comment last updated at 2024-05-17 14:57:33 UTC

@mperrin mperrin added enhancement New feature or request JWST Affects JWST models in WebbPSF labels May 3, 2024
@mperrin
Copy link
Collaborator Author

mperrin commented May 3, 2024

FYI to @merope82 and @mlibralato - here's an update to improve cruciform artifact models in webbpsf.

@mperrin mperrin added this to the Release 1.3 milestone May 16, 2024
Copy link
Collaborator

@obi-wan76 obi-wan76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I did a comparison at different wavelengths with some PSF subtraction and, even close to the center of the detector, there is a better residual at lower wavelengths.

@mperrin mperrin merged commit 0957cd7 into spacetelescope:develop May 17, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request JWST Affects JWST models in WebbPSF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants