8000 JP-2294: Residual fringe documentation by jemorrison · Pull Request #6387 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-2294: Residual fringe documentation #6387

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

Merged
merged 7 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/jwst/package_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Package Index
refpix/index.rst
resample/index.rst
reset/index.rst
residual_fringe/index.rst
rscd/index.rst
saturation/index.rst
skymatch/index.rst
Expand Down
51 changes: 51 additions & 0 deletions docs/jwst/references_general/fringefreq_format.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
+-------------------+--------------+-----------+---------------+
| Table | Column | Data type | Units |
+===================+==============+===========+===============+
| RFC_FREQ_SHORT | SLICE | double | N/A |
+ +--------------+-----------+---------------+
| | FFREQ | double | cm\ :sup:`-1` |
+ +--------------+-----------+---------------+
| | DFFREQ | double | cm\ :sup:`-1` |
+ +--------------+-----------+---------------+
| | MIN_NFRIGES | int | N/A |
+ +--------------+-----------+---------------+
| | MAX_NFRINGES | int | N/A |
+ +--------------+-----------+---------------+
| | MIN_SNR | double | cm\ :sup:`-1` |
+ +--------------+-----------+---------------+
| | PGRAM_RES | double | cm\ :sup:`-1` |
+-------------------+--------------+-----------+---------------+
| FRC_FREQ_MEDIUM | SLICE | double | N/A |
+ +--------------+-----------+---------------+
| | FFREQ | double | cm\ :sup:`-1` |
+ +--------------+-----------+---------------+
| | DFFREQ | double | cm\ :sup:`-1` |
+ +--------------+-----------+---------------+
| | MIN_NFRIGES | int | N/A |
+ +--------------+-----------+---------------+
| | MAX_NFRINGES | int | N/A |
+ +--------------+-----------+---------------+
| | MIN_SNR | double | cm\ :sup:`-1` |
+ +--------------+-----------+---------------+
| | PGRAM_RES | double | cm\ :sup:`-1` |
+-------------------+--------------+-----------+---------------+
| RFC_FREQ_LONG | SLICE | double | N/A |
+ +--------------+-----------+---------------+
| | FFREQ | double | cm\ :sup:`-1` |
+ +--------------+-----------+---------------+
| | DFFREQ | double | cm\ :sup:`-1` |
+ +--------------+-----------+---------------+
| | MIN_NFRIGES | int | N/A |
+ +--------------+-----------+---------------+
| | MAX_NFRINGES | int | N/A |
+ +--------------+-----------+---------------+
| | MIN_SNR | double | cm\ :sup:`-1` |
+ +--------------+-----------+---------------+
| | PGRAM_RES | double | cm\ :sup:`-1` |
+-------------------+--------------+-----------+---------------+
| MAX_AMP | WAVELENGTH | double | micron |
+ +--------------+-----------+---------------+
| | AMPLITUDE | double | N/A |
+-------------------+--------------+-----------+---------------+


61 changes: 61 additions & 0 deletions docs/jwst/references_general/fringefreq_reffile.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.. _fringefreq_reffile:

FRINGEFREQ reference file
-------------------------

:REFTYPE: FRINGEFREQ
:Data models: `~jwst.datamodels.FringeFreqModel`

The FRINGEFREQ reference files contain parameter values used to correct MIRI MRS images
for residual fringes that remain after applying the fringe flat.

.. include:: ../references_general/fringefreq_selection.inc

.. include:: ../includes/standard_keywords.inc

Type Specific Keywords for FRINGEFREQ
+++++++++++++++++++++++++++++++++++++
In addition to the standard reference file keywords listed above,
the following keywords are *required* in FRINGEFREQ reference files,
because they are used as CRDS selectors
(see :ref:`fringefreq_selectors`):

========= ==============================
Keyword Data Model Name
========= ==============================
DETECTOR model.meta.instrument.detector
EXP_TYPE model.meta.exposure.type
========= ==============================

Reference File Format
++++++++++++++++++++++++++
The FRINGEFREQ reference files are FITS format, with 4 BINTABLE extensions.
The FITS primary data array is assumed to be empty.
The format and content of the FRINGEFREQ reference file is

=================== ======== ===========
EXTNAME XTENSION Dimensions
=================== ======== ===========
RFC_FREQ_SHORT BINTABLE TFIELDS = 7
RFC_FREQ_MEDIUM BINTABLE TFIELDS = 7
RFC_FREQ_LONG BINTABLE TFIELDS = 7
MAX_AMP BINTABLE TFIELDS = 2
=================== ======== ===========

The formats of the individual table extensions are listed below.

.. include:: ../references_general/fringefreq_format.inc

These reference files contain tables for each MIRI band giving the
fringe frequencies and other parameters for each band to fit and remove residual fringes.


The reference table descriptions:

- **RFC_FREQ_SHORT** table contains the fringe frequences and parameters for the SHORT band.
- **RFC_FREQ_MEDIUM** table contains the fringe frequences and parameters for the MEDIUM band.
- **RFC_FREQ_LONG** table contains the fringe frequences and parameters for the LONG band.
- **MAX_AMP** table contains a wavelength dependent maximum amplitude which is use for feature identification and fit rejection.



13 changes: 13 additions & 0 deletions docs/jwst/references_general/fringefreq_selection.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _fringefreq_selectors:

Reference Selection Keywords for FRINGEFREQ
+++++++++++++++++++++++++++++++++++++++++++
CRDS selects appropriate FRINGEFREQ reference file based on the following keywords.
FRINGEFREQ is not applicable for instruments not in the table.

========== ================================================
Instrument Keywords
========== ================================================
MIRI INSTRUME, EXP_TYPE, DETECTOR, DATE-OBS, TIME-OBS
========== ================================================

6 changes: 6 additions & 0 deletions docs/jwst/residual_fringe/arguments.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _resid_fringe_arguments:

Step Arguments
==============

The residual fringe step has no step-specific arguments.
14 changes: 14 additions & 0 deletions docs/jwst/residual_fringe/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _residual_fringe_step:

===============
Residual Fringe
===============

.. toctree::
:maxdepth: 2

main.rst
arguments.rst
reference_files.rst

.. automodapi:: jwst.residual_fringe.residual_fringe_step
55 changes: 55 additions & 0 deletions docs/jwst/residual_fringe/main.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Description
===========

The JWST pipeline contains two steps devoted to the removal of fringes on MIRI MRS images.
The first correction is applied in the ``fringe_step`` in the :ref:`calwebb_spec2 <calwebb_spec2>` pipeline
and consists in dividing
detector-level data by a fringe-flat and is described in the :ref:`fringe <fringe_step>` step.
Applying the fringe flat should eliminate fringes from spectra of spatially extended sources, however
residual fringes can remain. For spatially unresolved (point) sources or extended sources with structure,
applying the fringe flat will undoubtedly leave residual fringes since these produce different fringe patterns
on the detector than accounted for by the fringe flat. The second step for fringe removal is the
``residual_fringe_step``. At this time this step can only be run offline; it is not part of the default pipeline.
After thorough testing and possible updates after commissioning,
it will be determined if this step should be run as part of :ref:`calwebb_spec3 <calwebb_spec3>` pipeline.
To run this offline it is best if it is applied after the ``mrs_imatch_step``, but before the ``cube_build_step``.



The ``residual_fringe`` step can accept several different forms of input data, including:

- a single file containing a 2-D IFU image

- a data model (IFUImageModel) containing a 2-D IFU image

- an association table (in json format) containing a list of input files

- a model container with several 2-D IFU data models


Assumptions
-----------
This step only works on MIRI MRS data.
It is assumed that the calwebb_spec2 pipeline has been run on the data. In addition, the detection of residual fringes
are better determined if the ``mrs_imatch`` step has also been applied to the data.



Fringe Background Information
-----------------------------
As is typical for spectrometers, the MIRI MRS detectors are affected by fringes. These are periodic gain modulations caused by
standing waves between parallel surfaces in the optical path, acting as a slow-finesse Fabry-Pérot etalons. In the MRS,
the principal fringe sources are the detector layers. A detailed detailed discussion on these fringe components
can be found in Argyriou, I., Wells, M., Glasse, A., et al. 2020, A&A, 641, A150 and
Wells, M., Pel, J.-W., Glasse, A., et al. 2015, PASP, 127, 646.


The primary MRS fringe, observed in all MRS bands, is caused by the etalons between the anti-reflection coating
and lower layers, encompassing the detector substrate and the infrared-active layer. Since the thickness of the substrate
is not the same in the SW and LW detectors, the fringe frequency will differ in the two detectors. Up to 16 microns, this
fringe is produced by the anti-reflection coating and pixel metalization etalons, whereas above 16 microns it is
produced by the anti-reflection coating and bottom contact etalon, resulting in a different fringe frequency.
The information in the fringe frequency
reference file is used to determine, for each MRS band, the frequencies to fit to this main fringe component.
The residual fringes are corrected for by fitting and removing sinusoidal gain to the detector level data.

8 changes: 8 additions & 0 deletions docs/jwst/residual_fringe/reference_files.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Reference Files
===============

The ``residual_fringe`` step uses the FRINGEFREQ reference file.


.. include:: ../references_general/fringefreq_reffile.inc

0