-
Notifications
You must be signed in to change notification settings - Fork 62
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
setup_sim_to_match_file: Not properly reading NIRCam F323N? #806
Comments
There are some filters (some narrowbands and one medium band) that exist in the pupil wheels and are usually paired with a wider blocking filter in the filter wheel. These filters therefore get populated in the PUPIL header keyword. In order to capture this in if inst.name=='MIRI' and header['FILTER']=='P750L':
# webbpsf doesn't model the MIRI LRS prism spectral response
print("Please note, webbpsf does not currently model the LRS spectral response. Setting filter to F770W instead.")
inst.filter='F770W'
elif (inst.name=='NIRCam') and (header['PUPIL'][0]=='F') and (header['PUPIL'][-1] in ['N', 'M']):
# Grab filter from PUPIL keyword instead
inst.filter=header['PUPIL']
else:
inst.filter=header['filter'] Edit: Although, there are no other pupil wheel elements that start with "F" so perhaps the final condition of |
Thanks @JarronL, the fix you suggested seems to work! I haven't tested it for all possible NIRCam filters, but it worked for F323N and F405N. |
This was closed in PR #768 |
Hello,
I am using webbpsf to generate PSFs for NIRCam F323N images. However, where I use the function
setup_sim_to_match_file
, it returns the F322W2 PSF instead, which is quite different.Looking at the header of the F323N images, I see that the filter keyword is specified as "F322W2" while the pupil keyword is specified as "F323N" (see below). Could it be that
setup_sim_to_match_file
isn't parsing this header info correctly?I am using webbpsf version 1.2.1.
Thanks!
The text was updated successfully, but these errors were encountered: