Comments (4)
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 setup_sim_to_match_file
, one could modify the filter setting code like so:
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 and (header['PUPIL'][-1] in ['N', 'M'])
isn't necessary.
from webbpsf.
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.
from webbpsf.
I added the provided fix from @JarronL 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
from webbpsf.
This was closed in PR #768
from webbpsf.
Related Issues (20)
- Testing against numpy 2.0 and scalar representation changes HOT 1
- setup_sim_to_match_data documentation improvement
- setup_sim_to_match_file gets confused by parallel SW/LW coronagraphy HOT 5
- Issue with convolution over pixel using astropy.convolution.Box2DKernel? HOT 4
- Read/load saved PSF grid? HOT 5
- MIRI cruciform detector effects not in Read the Docs HOT 2
- photutils GriddedPSFModel now supports different oversampling in each dimension HOT 1
- Improvements in MIRI LRS instrument model HOT 2
- AttributeError: 'MIRI' object has no attribute 'load_wss_opd_by_date' HOT 4
- Use consistent Time objects in trending.py
- PSF model worse for brightsky detector HOT 3
- Release 1.3 roadmap HOT 1
- NIRSpec NRS1 and NRS2 PSF creation have very different runtimes HOT 1
- setup_sim_to_match_file: F323N returns NRCA5 for NRCB5 module HOT 4
- Improvements to trending.plot_wfs_obs_delta & wfe_histogram_plot to support full filename paths HOT 1
- Visit Id naming smarts in get_visit_nrc_ta_image
- setup_sim_to_match_data for LRS TACONFIRM image should set image_mask to LRS slit HOT 1
- readthedocs build is broken; needs python version update HOT 4
- Release 1.4 roadmap HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webbpsf.