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

minor bug fix to IFU mode after #770 #851

Merged
merged 1 commit into from
May 19, 2024

Conversation

mperrin
Copy link
Collaborator

@mperrin mperrin commented May 17, 2024

Minor fix: When switching to NIRSpec IFU mode, don't leave the image_mask at a slit or MSA mask (which is impossible to see with the IFU).

Specifically the default image_mask For NIRSpec is 'MSA all open', and setting nrs.mode = 'IFU' would leave nrs.image_mask == 'MSA all open' which makes no sense. This PR fixes that.

It also deletes some very-very-old and obsolete warning checks about filter names starting with IFU and saying the IFU modes are not yet implemented; this is way out of date and no longer needed (and these lines of code were never getting executed anyway).

@pep8speaks
Copy link

Hello @mperrin, Thank you for submitting the Pull Request !

Line 10:1: E402 module level import not at top of file
Line 13:1: E402 module level import not at top of file
Line 15: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 21:1: E731 do not assign a lambda expression, use a def
Line 23:1: E731 do not assign a lambda expression, use a def
Line 69:1: E302 expected 2 blank lines, found 1

Line 302:126: E501 line too long (148 > 125 characters)
Line 389:47: E114 indentation is not a multiple of four (comment)
Line 389:47: E116 unexpected indentation (comment)
Line 728:126: E501 line too long (152 > 125 characters)
Line 731:29: E201 whitespace after '('
Line 755:1: E266 too many leading '#' for block comment
Line 979:126: E501 line too long (133 > 125 characters)
Line 981:57: E225 missing whitespace around operator
Line 985:126: E501 line too long (165 > 125 characters)
Line 993:32: E201 whitespace after '('
Line 1005:126: E501 line too long (145 > 125 characters)
Line 1024:126: E501 line too long (134 > 125 characters)
Line 1042:82: E202 whitespace before ')'
Line 1083:52: E225 missing whitespace around operator
Line 1254:91: E231 missing whitespace after ','
Line 1254:126: E501 line too long (139 > 125 characters)
Line 1441:126: E501 line too long (200 > 125 characters)
Line 1597:126: E501 line too long (131 > 125 characters)
Line 1840:13: E731 do not assign a lambda expression, use a def
Line 1842:13: E731 do not assign a lambda expression, use a def
Line 1852:126: E501 line too long (165 > 125 characters)
Line 1875:9: E266 too many leading '#' for block comment
Line 1908:9: E266 too many leading '#' for block comment
Line 1909:9: E266 too many leading '#' for block comment
Line 1949:1: E302 expected 2 blank lines, found 1
Line 1953:5: E303 too many blank lines (2)
Line 1954:26: E201 whitespace after '('
Line 1968:5: E303 too many blank lines (2)
Line 2026:126: E501 line too long (127 > 125 characters)
Line 2051:126: E501 line too long (155 > 125 characters)
Line 2071:17: E126 continuation line over-indented for hanging indent
Line 2213:126: E501 line too long (141 > 125 characters)
Line 2355:36: E225 missing whitespace around operator
Line 2395:5: E303 too many blank lines (2)
Line 2414:5: E303 too many blank lines (2)
Line 2431:13: E265 block comment should start with '# '
Line 2434:13: E265 block comment should start with '# '
Line 2436:13: E265 block comment should start with '# '
Line 2437:13: E265 block comment should start with '# '
Line 2438:13: E265 block comment should start with '# '
Line 2439:9: E265 block comment should start with '# '
Line 2447:24: E225 missing whitespace around operator
Line 2451:65: E226 missing whitespace around arithmetic operator
Line 2608:126: E501 line too long (130 > 125 characters)
Line 2652:126: E501 line too long (130 > 125 characters)
Line 2662:126: E501 line too long (141 > 125 characters)
Line 2686:126: E501 line too long (130 > 125 characters)
Line 2712:31: E225 missing whitespace around operator
Line 3101:33: E116 unexpected indentation (comment)
Line 3132:33: E221 multiple spaces before operator
Line 3202:71: E231 missing whitespace after ','
Line 3203:126: E501 line too long (145 > 125 characters)
Line 3207:9: E303 too many blank lines (2)
Line 3216:5: E303 too many blank lines (2)
Line 3232:126: E501 line too long (139 > 125 characters)
Line 3247:126: E501 line too long (145 > 125 characters)
Line 3248:126: E501 line too long (137 > 125 characters)
Line 3261:126: E501 line too long (142 > 125 characters)
Line 3269:126: E501 line too long (134 > 125 characters)
Line 3272:43: E261 at least two spaces before inline comment
Line 3275:5: E303 too many blank lines (2)
Line 3306:24: E225 missing whitespace around operator
Line 3328:5: E303 too many blank lines (2)

If you have not done so, please lint your code in accordance with best practices.

@mperrin mperrin requested a review from obi-wan76 May 17, 2024 15:57
@mperrin
Copy link
Collaborator Author

mperrin commented May 17, 2024

@obi-wan76 apologies for keeping making yet more PRs, but this one at least is a tiny quick bug fix...

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.

Looks good to me, I did try it and it changed the mask to None.

@obi-wan76 obi-wan76 merged commit 4581dec 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.

3 participants