Giter Club home page Giter Club logo

Comments (4)

JarronL avatar JarronL commented on August 16, 2024

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.

mwhosek avatar mwhosek commented on August 16, 2024

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.

mperrin avatar mperrin commented on August 16, 2024

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.

mperrin avatar mperrin commented on August 16, 2024

This was closed in PR #768

from webbpsf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.