spacetelescope / webbpsf

James Webb Space Telescope PSF simulation tool
https://webbpsf.readthedocs.io
BSD 3-Clause "New" or "Revised" License
119 stars 63 forks source link

Improved model for MIRI cruciform artifact, part 1 #837

Closed mperrin closed 6 months ago

mperrin commented 6 months ago

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

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

pep8speaks commented 6 months ago

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 commented 6 months ago

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