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

bug fix an edge case for switching MIRI apertures #843

Merged

Conversation

mperrin
Copy link
Collaborator

@mperrin mperrin commented May 10, 2024

Fix an edge case in some of the pixel scale checking code which happens when changing apertures.

Currently, can't switch from a SLIT type aperture back to a regular aperture. The following will fail:

miri = webbpsf.MIRI()
miri.set_position_from_aperture_name("MIRIM_SLIT")
miri.set_position_from_aperture_name('MIRIM_FULL')

With this PR, the above works without error.

@mperrin mperrin self-assigned this May 10, 2024
@pep8speaks
Copy link

pep8speaks commented May 10, 2024

Hello @mperrin, Thank you for updating !

Line 10:1: E402 module level import not at top of file
Line 14:1: E402 module level import not at top of file
Line 16:1: E731 do not assign a lambda expression, use a def
Line 17:1: E731 do not assign a lambda expression, use a def
Line 18:1: E731 do not assign a lambda expression, use a def
Line 20:1: E731 do not assign a lambda expression, use a def

Line 306:126: E501 line too long (148 > 125 characters)
Line 760:1: E266 too many leading '#' for block comment
Line 983:126: E501 line too long (133 > 125 characters)
Line 995:126: E501 line too long (145 > 125 characters)
Line 996:126: E501 line too long (133 > 125 characters)
Line 999:24: E271 multiple spaces after keyword
Line 1016:126: E501 line too long (134 > 125 characters)
Line 1412:126: E501 line too long (200 > 125 characters)
Line 1567:126: E501 line too long (131 > 125 characters)
Line 1802:13: E731 do not assign a lambda expression, use a def
Line 1804:13: E731 do not assign a lambda expression, use a def
Line 1823:9: E266 too many leading '#' for block comment
Line 1854:9: E266 too many leading '#' for block comment
Line 1855:9: E266 too many leading '#' for block comment
Line 1917:126: E501 line too long (127 > 125 characters)
Line 2069:126: E501 line too long (141 > 125 characters)
Line 2355:126: E501 line too long (130 > 125 characters)
Line 2399:126: E501 line too long (130 > 125 characters)
Line 2409:126: E501 line too long (141 > 125 characters)
Line 2433:126: E501 line too long (130 > 125 characters)

Comment last updated at 2024-05-12 04:02:49 UTC

@mperrin mperrin force-pushed the fix_slit_aperture_change_bug branch from bbdf324 to bcf0ec9 Compare May 12, 2024 04:02
@mperrin mperrin requested a review from obi-wan76 May 13, 2024 19:20
@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.

Look goods to me, it works without the warning/error

@obi-wan76 obi-wan76 merged commit 915c0e7 into spacetelescope:develop May 19, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants