Fix error raised due to naming scheme for NIRCam SW STDPSFs #2017
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The filter name and detector ID are swapped in Jay Anderson's short wavelength NIRCam STDPSFs. This is a quick bug fix to swap the order of the arguments after checking that the STDPSFs are being pulled from the STScI site and are for the NIRCam short wavelength channel.
As a test, the following code, which previously would have raised an error (
ValueError: Unknown detector F115W.
) should now work:I will note that this fix is limited to users who provide the filename via URL, not those who provide a path to a locally downloaded STDPSF file. This was an explicit condition on swapping the detector and filter values to prevent causing issues for users who are providing files with the traditional naming scheme.