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

Fix error raised due to naming scheme for NIRCam SW STDPSFs #2017

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

avapolzin
Copy link

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:

from photutils.psf import GriddedPSFModel
url = 'https://www.stsci.edu/~jayander/JWST1PASS/LIB/PSFs/STDPSFs/NIRCam/SWC/F115W/STDPSF_F115W_NRCA2.fits'
det = 2
model = GriddedPSFModel.read(filename = url, detector_id = det, format= 'stdpsf')

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.

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.
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.

1 participant