webbpsf icon indicating copy to clipboard operation
webbpsf copied to clipboard

setup_sim_to_match_file: F323N returns NRCA5 for NRCB5 module

Open mwhosek opened this issue 3 months ago • 3 comments

Hello,

I'm finding that when I try to use setup_sim_to_match_file on an F323N NRCB5 module that the setup_sim_to_match_file function returns the NRCA5 webbpsf grid. When I do:

inst = webbpsf.instrument('NIRCAM')
inst.filter='F323N'

Then `inst.filter' is set to NRCA5 and does not seem to get updated to NRCB5 before the WebbPSF grid is generated. I did not have this issue with the B-module for short-wavelength filters, so I'm not sure what is happening.

Thanks! Matt

mwhosek avatar Mar 15 '24 16:03 mwhosek

@mwhosek can you share the file name that you are using to setup the simulation? We may need to add more rules to the etup_sim_to_match_file function. I'll take a look at it. Thanks!

obi-wan76 avatar Mar 18 '24 00:03 obi-wan76

@obi-wan76 sure! The particular file I am looking at is a cal file from program GO-1939:

jw01939001001_02101_00007_nrcblong_cal.fits

It should be publicly available, but let me know if access is a problem. There is nothing special about image 7 in this F323N image in the set, it just happened to be what I was testing on. This is the same image where I ran into issue #806 previously.

Thanks for your help!

mwhosek avatar Mar 18 '24 16:03 mwhosek

I added the provided fix from @JarronL in #806 to the existing PR branch #768. Confirmed that for the input file jw01939001001_02101_00007_nrcblong_cal.fits, the code in that PR branch gets both the filter name and detector name correct to

Filter: F323N
Detector: NRCB5

mperrin avatar Mar 22 '24 15:03 mperrin

PR #768 has been merge into dev, this solved this issue.

obi-wan76 avatar Apr 24 '24 12:04 obi-wan76