spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
557 stars 164 forks source link

Header keyword with the pivot wavelength of the filter #7263

Open stscijgbot-jp opened 1 year ago

stscijgbot-jp commented 1 year ago

Issue JP-2557 was created on JIRA by Alicia Canipe:

We received a Help Desk ticket (INC0176898) with the following:

From Hubble imaging data, I'm used to a header keyword that contains the pivot wavelength of the filter. I cannot find such a header keyword for either NIRCam or NIRISS imaging data, for both CAL and i2d products. I'm surprised; this seems like a standard description to have in a header. I'm having to write a silly wrapper function that calls a dict of central wavelengths for each filter. It's not a difficult workaround, bit it seems clunky -- this is basic information that I would think belongs in the header. Am I looking in the wrong place?

  We can look into placing the pivot wavelength in the header information for photometric observations – Tyler suggested this information would likely have to come from a photom reference file (or another reference file). This effort will depend on the priority and utility set by the teams and stakeholders. I'm creating this ticket to track the request.

stscijgbot-jp commented 1 year ago

Comment by Anton Koekemoer on JIRA:

I'll also note that the pivot wavelengths are currently listed in the following locations in Jdox for NIRCam and NIRISS:

NIRCam: Tables 2 and 3 at: https://jwst-docs.stsci.edu/jwst-near-infrared-camera/nircam-instrumentation/nircam-filters

NIRISS: Table 1 at: https://jwst-docs.stsci.edu/jwst-near-infrared-imager-and-slitless-spectrograph/niriss-instrumentation/niriss-filters

For MIRI, there is a table listing some filter properties including "lambda_0", though it's not clear whether this is identical to the pivot wavelength as defined above for NIRCam and NIRISS: https://jwst-docs.stsci.edu/jwst-mid-infrared-instrument/miri-instrumentation/miri-filters-and-dispersers 

stscijgbot-jp commented 1 year ago

Comment by Mattia Libralato on JIRA:

Anton Koekemoer: For MIRI, the values in the table are not the pivot wavelengths. Karl Gordon can help on this

stscijgbot-jp commented 1 year ago

Comment by Alicia Canipe on JIRA:

For tracking utility: adding another request for this from Slack: Is the pivot wavelength of the filter used for an imaging observation provided somewhere in the calibrated file? In HST, it's provided in the header keyword PHOTPLAM, so I'm wondering if there is an equivalent for JWST. 

stscijgbot-jp commented 1 year ago

Comment by Howard Bushouse on JIRA:

In the very old days of some of the early HST instrument pipelines, parameters like this were computed on-the-fly by having the calibration pipeline call synphot routines to compute them, based on the instrument, detector, filter, etc. of the image being processed. Now days the photometric parameters are instead pre-computed and stored in the appropriate CRDS reference files that are loaded by the calibration pipelines and hence values like PHOTPLAM are just copied from the reference file to header keywords in the calibrated image.

A similar approach could be used for JWST, by simply adding one or more additional columns to the table of photometric parameters stored in the PHOTOM reference files. Once the pipeline has found the table row that matches the detector+filter+pupil combination of the image being processed, those extra parameters could just be read from the matching table row and copied into image header keywords (in the same way that PHOTMJSR is used now). So if the instrument teams already have pivot wavelengths computed for their filters, it should be a straightforward process to update the contents of the PHOTOM ref files, update their datamodel schemas, and update the cal code to copy the new entries.

stscijgbot-jp commented 1 year ago

Comment by Howard Bushouse on JIRA:

Is it time to bring this up as a topic for a DMS WG meeting?

stscijgbot-jp commented 1 year ago

Comment by Alicia Canipe on JIRA:

Sorry for the very delayed response. I can add this to a future DMSWG meeting agenda, but it doesn't seem to be a really high priority yet and I think I've seen a fair number of higher priority tickets. I can check on priorities from NIRISS and NIRCam and then we can figure out next steps. 

stscijgbot-jp commented 1 year ago

Comment by Howard Bushouse on JIRA:

It would be useful to have an accurate value for the filter pivot wavelength for use in the "wfss_contam" (WFSS contamination correction) step. Right now we're resorting to just estimating the central wavelength from the filter name (e.g. F330W = 3.30 microns).

stscijgbot-jp commented 1 year ago

Comment by Alicia Canipe on JIRA:

Ah, got it. Sorry, I didn't realize that would also be a use case. I'll go ahead and add it to our DMSWG agenda for discussion. 

stscijgbot-jp commented 1 year ago

Comment by Howard Bushouse on JIRA:

Alicia Canipe Did this ever get discussed by the DMS WG?  If so, can you include a link to the meeting minutes?

stscijgbot-jp commented 1 year ago

Comment by Alicia Canipe on JIRA:

Sorry Howard Bushouse, my Jira tickets and notifications clearly need some organization. Thanks for the reminder. 

DMSWG Meeting notes: https://outerspace.stsci.edu/pages/viewpage.action?spaceKey=JWSTPWG&title=2023-02-15+Meeting+notes%3A+DMSWG

So I think we still need input from the instrument reps. We're slowly rolling out a new prioritization process that will help capture the interest for this ticket and others, hopefully. I'll remind teams to chime in. 

stscijgbot-jp commented 1 year ago

Comment by Karl Gordon on JIRA:

This seems reasonable to me - speaking from the absflux view.

stscijgbot-jp commented 4 months ago

Comment by Howard Bushouse on JIRA:

In the abbreviated meeting minutes provided above by Alicia Canipe there's the statement "Instrument teams provide feedback in the ticket." The only feedback I see here so far is from Karl Gordon (thanks Karl!), and that was almost a year ago.

This value would definitely be useful in the "wfss_contam" step, which needs to know the wavelength of the filter(s) used in the direct images that are part of WFSS observations, in order to build an estimated SED of each source. Right now it's simply taking the numerical value stripped out of the filter name (e.g. 560 if FILTER=F560W) and using that as the wavelength. It's at least close, but certainly not highly accurate.

IMHO it would be very useful to get some attention drawn to this matter again and try to make some progress towards getting a pivot wavelength stored in the metadata for our products.