-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add Direct Image to expected file list for NIRCam #1948
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,8 +190,8 @@ def test_nircam_parser(mosviz_helper, tmp_path): | |
# Check that the correct amount of spectra got loaded in the correct order | ||
assert len(mosviz_helper.app.data_collection) == 31 | ||
assert mosviz_helper.app.data_collection['MOS Table']['Identifier'][0] == 1112 | ||
assert mosviz_helper.app.data_collection[0].label == 'GRISMR Source 1112 spec2d R' | ||
assert mosviz_helper.app.data_collection[15].label == 'GRISMR Source 1112 spec1d R' | ||
assert mosviz_helper.app.data_collection[0].label == 'F322W2 Source 1112 spec2d R' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this mean? That the parser has been loading the wrong thing for NIRCam test case all this time? 😱 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's loading the same thing, just labeling it differently. Due to differences in what goes in which header keyword between the instruments, NIRCam was trying to match up "GRISMR" from the 2D spectrum to "CLEAR" from the direct image, rather than this filter string like NIRISS does. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @camipacifici probably needs to confirm that displaying this filter rather than "GRISMR" in the table is ok. Maybe we want both. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it would be best to have both, but it can be part of a separate PR. |
||
assert mosviz_helper.app.data_collection[15].label == 'F322W2 Source 1112 spec1d R' | ||
|
||
|
||
@pytest.mark.remote_data | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add an
else
here or by the time you get here, it is either niriss or nircam and nothing else?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now those are the only two possible values,
nirspec
uses a different parser and anything else throws an error inload_data
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, maybe less confusing to change
to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to leave it as-is, since if we unify another instrument into this parser and forget to add a case for it, it will throw an error, as opposed to maybe quietly being handled incorrectly by the
else
statement.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then isn't it slightly prettier like this: