Skip to content

Commit 8f8f1e4

Browse files
committed
DOC: Fix broken ref
by addressing some low-hanging fruits DOC: Fix ami_analyze description formatting DOC: Fix ModelContainer ref and clean up devel_io_design formatting
1 parent 33fd00a commit 8f8f1e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+451
-460
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def setup(app):
7878
'gwcs': ('https://gwcs.readthedocs.io/en/stable/', None),
7979
'stdatamodels': ('https://stdatamodels.readthedocs.io/en/latest/', None),
8080
'stcal': ('https://stcal.readthedocs.io/en/latest/', None),
81+
'stpipe': ('https://stpipe.readthedocs.io/en/latest/', None),
8182
'drizzle': ('https://drizzlepac.readthedocs.io/en/latest/', None),
8283
'tweakwcs': ('https://tweakwcs.readthedocs.io/en/latest/', None),
8384
}

docs/jwst/ami_analyze/description.rst

Lines changed: 56 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Description
22
-----------
33

4-
:Class: `jwst.ami.AmiAnalyzeStep`
4+
:Class: `jwst.ami.ami_analyze_step.AmiAnalyzeStep`
55
:Alias: ami_analyze
66

77
The ``ami_analyze`` step is one of the AMI-specific steps in the ``ami``
@@ -20,44 +20,34 @@ the SUB80 subarray, in order to reduce execution time.
2020

2121
Arguments
2222
---------
23-
The ``ami_analyze`` step has several optional arguments. In most cases the
23+
The ``ami_analyze`` step has several optional arguments. In most cases the
2424
default arguments will be suitable but more advanced users may wish to test
2525
other options:
2626

27-
:--oversample: The oversampling factor to be used in the model fit (default=3).
28-
29-
:--rotation: Initial guess for the rotation of the PSF in the input image, in
30-
units of degrees (default=0.0).
31-
32-
:--psf_offset: List of PSF offset values to use when creating the model array
33-
(default='0.0 0.0').
34-
35-
:--rotation_search: List of start, stop, and step values that define the list of
36-
rotation search values. The default setting of '-3 3 1'
37-
results in search values of [-3, -2, -1, 0, 1, 2, 3].
38-
39-
:--bandpass: ASDF file containing suitable array to override filter/source
40-
(default=None)
41-
42-
:--usebp: If True, exclude pixels marked DO_NOT_USE from fringe fitting
43-
(default=True)
44-
45-
:--firstfew: If not None, process only the first few integrations (default=None)
46-
47-
:--chooseholes: If not None, fit only certain fringes e.g. ['B4','B5','B6','C2']
48-
(default=None)
49-
50-
:--affine2d: ASDF file containing user-defined affine parameters (default='commissioning')
51-
52-
:--run_bpfix: Run Fourier bad pixel fix on cropped data (default=True)
53-
54-
55-
Note that the `affine2d` default argument is a special case; 'commissioning' is currently the only string other than an ASDF filename that is accepted. If `None` is passed, it will perform a rotation search (least-squares fit to a PSF model) and use that for the affine transform.
27+
* ``--oversample``: The oversampling factor to be used in the model fit (default=3).
28+
* ``--rotation``: Initial guess for the rotation of the PSF in the input image, in
29+
units of degrees (default=0.0).
30+
* ``--psf_offset``: List of PSF offset values to use when creating the model array
31+
(default='0.0 0.0').
32+
* ``--rotation_search``: List of start, stop, and step values that define the list of
33+
rotation search values. The default setting of '-3 3 1'
34+
results in search values of [-3, -2, -1, 0, 1, 2, 3].
35+
* ``--bandpass``: ASDF file containing suitable array to override filter/source
36+
(default=None)
37+
* ``--usebp``: If True, exclude pixels marked DO_NOT_USE from fringe fitting
38+
(default=True)
39+
* ``--firstfew``: If not None, process only the first few integrations (default=None)
40+
* ``--chooseholes``: If not None, fit only certain fringes e.g. ['B4','B5','B6','C2']
41+
(default=None)
42+
* ``--affine2d``: ASDF file containing user-defined affine parameters (default='commissioning')
43+
* ``--run_bpfix``: Run Fourier bad pixel fix on cropped data (default=True)
44+
45+
Note that the ``affine2d`` default argument is a special case; 'commissioning' is currently the only string other than an ASDF filename that is accepted. If `None` is passed, it will perform a rotation search (least-squares fit to a PSF model) and use that for the affine transform.
5646

5747

5848
Creating ASDF files
5949
^^^^^^^^^^^^^^^^^^^
60-
The optional arguments `bandpass` and `affine2d` must be written to `ASDF <https://asdf-standard.readthedocs.io/>`_
50+
The optional arguments ``bandpass`` and ``affine2d`` must be written to `ASDF <https://asdf-standard.readthedocs.io/>`_
6151
files to be used by the step. The step expects the contents to be stored with particular keys but the format is not currently
6252
enforced by a schema; incorrect ASDF file contents will cause the step to revert back to the defaults for each argument.
6353

@@ -78,7 +68,7 @@ Examples of how to create ASDF files containing the properly formatted informati
7868
throughput_model = datamodels.open(throughput_file)
7969
8070
filt_spec = utils.get_filt_spec(throughput_model)
81-
src_spec = SourceSpectrum.from_vega()
71+
src_spec = SourceSpectrum.from_vega()
8272
bandpass = utils.combine_src_filt(filt_spec,
8373
src_spec,
8474
trim=0.01,
@@ -100,20 +90,20 @@ Examples of how to create ASDF files containing the properly formatted informati
10090
10191
import asdf
10292
tree = {
103-
'mx': 1., # dimensionless x-magnification
104-
'my': 1., # dimensionless y-magnification
105-
'sx': 0., # dimensionless x shear
106-
'sy': 0., # dimensionless y shear
107-
'xo': 0., # x-offset in pupil space
108-
'yo': 0., # y-offset in pupil space
109-
'rotradccw': None
110-
}
93+
'mx': 1., # dimensionless x-magnification
94+
'my': 1., # dimensionless y-magnification
95+
'sx': 0., # dimensionless x shear
96+
'sy': 0., # dimensionless y shear
97+
'xo': 0., # x-offset in pupil space
98+
'yo': 0., # y-offset in pupil space
99+
'rotradccw': None
100+
}
111101
112102
affineasdf = 'affine.asdf'
113103
114104
with open(affineasdf, 'wb') as fh:
115-
af = asdf.AsdfFile(tree)
116-
af.write_to(fh)
105+
af = asdf.AsdfFile(tree)
106+
af.write_to(fh)
117107
af.close()
118108
119109
@@ -123,15 +113,19 @@ Inputs
123113

124114
3D calibrated image
125115
^^^^^^^^^^^^^^^^^^^
126-
:Data model: `~jwst.datamodels.DataModel`
116+
:Data model: `~stdatamodels.DataModel`
127117
:File suffix: _calints
128118

129119
The ``ami_analyze`` step takes a single calibrated image cube as input, which should be
130120
the "_calints" product resulting from :ref:`calwebb_image2 <calwebb_image2>` processing.
131121
Multiple exposures can be processed via use of an ASN file that is used as input
132-
to the :ref:`calwebb_ami3 <calwebb_ami3>` pipeline. **Note:** The ``ami_analyze`` step will also
133-
accept a 2D "_cal" product but errors will not be computed in the output.
134-
The ``ami_analyze`` step itself does not accept an ASN as input.
122+
to the :ref:`calwebb_ami3 <calwebb_ami3>` pipeline.
123+
124+
.. note::
125+
126+
The ``ami_analyze`` step will also
127+
accept a 2D "_cal" product but errors will not be computed in the output.
128+
The ``ami_analyze`` step itself does not accept an ASN as input.
135129

136130
Outputs
137131
-------
@@ -150,35 +144,35 @@ Interferometric observables
150144
The inteferometric observables are saved as OIFITS files, a registered FITS format
151145
for optical interferometry, containing the following list of extensions:
152146

153-
1) ``OI_ARRAY``: AMI subaperture information
154-
2) ``OI_TARGET``: target properties
155-
3) ``OI_T3``: extracted closure amplitudes, triple-product phases
156-
4) ``OI_VIS``: extracted visibility (fringe) amplitudes, phases
157-
5) ``OI_VIS2``: squared visibility (fringe) amplitudes
158-
6) ``OI_WAVELENGTH``: filter information
147+
1. ``OI_ARRAY``: AMI subaperture information
148+
2. ``OI_TARGET``: target properties
149+
3. ``OI_T3``: extracted closure amplitudes, triple-product phases
150+
4. ``OI_VIS``: extracted visibility (fringe) amplitudes, phases
151+
5. ``OI_VIS2``: squared visibility (fringe) amplitudes
152+
6. ``OI_WAVELENGTH``: filter information
159153

160154
For more information on the format and contents of OIFITS files, see the `OIFITS2 standard <https://doi.org/10.1051/0004-6361/201526405>`_.
161155

162156
The _ami-oi.fits file contains tables of observables averaged over all integrations of the input file. The error is taken to be the standard error of the mean, where the variance is the covariance between amplitudes and phases (e.g. fringe amplitudes and fringe phases, closure phases and triple-product amplitudes).
163157
The _amimulti-oi.fits file contains observables for each integration, and does not contain error estimates. The
164-
structure is the same as the _ami-oi.fits file, but the following data columns are 2D, with the second dimension being
158+
structure is the same as the _ami-oi.fits file, but the following data columns are 2D, with the second dimension being
165159
the number of integrations: "PISTONS", "PIST_ERR", "VISAMP", "VISAMPERR", "VISPHI", "VISPHIERR", "VIS2DATA", "VIS2ERR", "T3AMP", "T3AMPERR", "T3PHI", "T3PHIERR".
166160

167161
LG model parameters
168162
^^^^^^^^^^^^^^^^^^^
169163
:Data model: `~jwst.datamodels.AmiLgFitModel`
170164
:File suffix: _amilg.fits
171165

172-
The _amilg.fits output file contains the cropped and cleaned data, model, and residuals (data - model) as well as
166+
The _amilg.fits output file contains the cropped and cleaned data, model, and residuals (data - model) as well as
173167
the parameters of the best-fit LG model. It contains the following extensions:
174168

175-
1) ``CTRD``: a 3D image of the centered, cropped data
176-
2) ``N_CTRD``: a 3D image CTRD normalized by data peak
177-
3) ``FIT``: a 3D image of the best-fit model
178-
4) ``N_FIT``: a 3D image of FIT normalized by data peak
179-
5) ``RESID``: a 3D image of the fit residuals
180-
6) ``N_RESID``: a 3D image of RESID normalized by data peak
181-
7) ``SOLNS``: table of fringe coefficients
169+
1. ``CTRD``: a 3D image of the centered, cropped data
170+
2. ``N_CTRD``: a 3D image CTRD normalized by data peak
171+
3. ``FIT``: a 3D image of the best-fit model
172+
4. ``N_FIT``: a 3D image of FIT normalized by data peak
173+
5. ``RESID``: a 3D image of the fit residuals
174+
6. ``N_RESID``: a 3D image of RESID normalized by data peak
175+
7. ``SOLNS``: table of fringe coefficients
182176

183177
Reference Files
184178
---------------

docs/jwst/badpix_selfcal/description.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ in the :ref:`calwebb_spec2 <calwebb_spec2>` pipeline.
1919
Input details
2020
-------------
2121
The input data must be in the form of a `~jwst.datamodels.IFUImageModel` or
22-
a `~jwst.datamodels.ModelContainer` containing exactly one
22+
a `~jwst.datamodels.container.ModelContainer` containing exactly one
2323
science exposure and any number of additional exposures.
2424
A fits or association file
2525
that can be read into one of these data models is also acceptable.

docs/jwst/outlier_detection/outlier_detection_ifu.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Integral Field Unit (IFU) Data
55

66
This module serves as the interface for applying ``outlier_detection`` to IFU
77
observations, like those taken with NIRSpec and MIRI. A :ref:`Stage 3 association <asn-level3-techspecs>`,
8-
which is loaded into a :py:class:`~jwst.datamodels.ModelContainer` object,
8+
which is loaded into a :py:class:`~jwst.datamodels.container.ModelContainer` object,
99
serves as the basic format for all processing performed by this step.
1010

1111
After launch it was discovered that the bad pixels on the MIRI detectors vary with time.

docs/jwst/outlier_detection/outlier_detection_imaging.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Imaging Data
66
This module serves as the interface for applying ``outlier_detection`` to direct
77
image observations, like those taken with MIRI, NIRCam, and NIRISS.
88
A :ref:`Stage 3 association <asn-level3-techspecs>`,
9-
which is loaded into a :py:class:`~jwst.datamodels.ModelLibrary` object,
9+
which is loaded into a :py:class:`~jwst.datamodels.library.ModelLibrary` object,
1010
serves as the basic format for all processing performed by this step.
1111
This routine performs the following operations:
1212

@@ -107,10 +107,10 @@ Control over this memory model happens
107107
with the use of the ``in_memory`` parameter, which defaults to True.
108108
The full impact of setting this parameter to `False` includes:
109109

110-
#. The input :py:class:`~jwst.datamodels.ModelLibrary` object is loaded with `on_disk=True`.
110+
#. The input :py:class:`~jwst.datamodels.library.ModelLibrary` object is loaded with `on_disk=True`.
111111
This ensures that input models are loaded into memory one at at time,
112112
and saved to a temporary file when not in use; these read-write operations are handled internally by
113-
the :py:class:`~jwst.datamodels.ModelLibrary` object.
113+
the :py:class:`~jwst.datamodels.library.ModelLibrary` object.
114114

115115
#. Computing the median image works by writing the resampled data frames to appendable files
116116
on disk that are split into sections spatially but contain the entire ``groups``

docs/jwst/outlier_detection/outlier_detection_spec.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ spectroscopic observations. The algorithm is very similar to the
88
:ref:`imaging algorithm <outlier-detection-imaging>`, and much of the same code is used.
99
Please refer to those docs for more information.
1010
A :ref:`Stage 3 association <asn-level3-techspecs>`,
11-
which is loaded into a :py:class:`~jwst.datamodels.ModelContainer` object,
12-
serves as the input and output to this step, and the :py:class:`~jwst.datamodels.ModelContainer`
13-
is converted into a :py:class:`~jwst.datamodels.ModelLibrary` object to allow sharing code
11+
which is loaded into a :py:class:`~jwst.datamodels.container.ModelContainer` object,
12+
serves as the input and output to this step, and the :py:class:`~jwst.datamodels.container.ModelContainer`
13+
is converted into a :py:class:`~jwst.datamodels.library.ModelLibrary` object to allow sharing code
1414
with the imaging mode.
1515

1616
This routine performs identical operations to the imaging mode, with the following exceptions:

docs/jwst/pipeline/calwebb_ami3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Inputs
4040
3D calibrated images
4141
^^^^^^^^^^^^^^^^^^^^
4242

43-
:Data model: `~jwst.datamodels.DataModel`
43+
:Data model: `~stdatamodels.DataModel`
4444
:File suffix: _calints
4545

4646
The inputs to ``calwebb_ami3`` need to be in the form of an ASN file that lists

docs/jwst/skymatch/description.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ step.
9595

9696
Identification of images that belong to the same "exposure" and therefore
9797
can be grouped together is based on several attributes described in
98-
`jwst.datamodels.ModelContainer`. This grouping is performed automatically
98+
`jwst.datamodels.container.ModelContainer`. This grouping is performed automatically
9999
in the ``skymatch`` step using the
100-
`jwst.datamodels.ModelContainer.models_grouped` property or
101-
:py:meth:`jwst.datamodels.ModelLibrary.group_indices`.
100+
`jwst.datamodels.container.ModelContainer.models_grouped` property or
101+
:py:meth:`jwst.datamodels.library.ModelLibrary.group_indices`.
102102

103103
However, when background across different detectors in a single "exposure"
104104
(or "group") is dominated by unpredictable background components, we no longer
@@ -107,7 +107,7 @@ it may be desirable to match image backgrounds independently. This can be
107107
achieved either by setting the ``image_model.meta.group_id`` attribute to a
108108
unique string or integer value for each image, or by adding the ``group_id``
109109
attribute to the ``members`` of the input ASN table - see
110-
`~jwst.datamodels.ModelContainer` for more details.
110+
`~jwst.datamodels.container.ModelContainer` for more details.
111111

112112
.. note::
113113
Group ID (``group_id``) is used by both ``tweakreg`` and ``skymatch`` steps

docs/jwst/stack_refs/description.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ multiple integrations within each exposure.
3232
It is assumed that the ``stack_refs`` step will be called from the
3333
:ref:`calwebb_coron3 <calwebb_coron3>` pipeline, which is given an ASN file as input,
3434
specifying one or more PSF target exposures.
35-
The actual input passed to the ``stack_refs`` step will be a `~jwst.datamodels.ModelContainer`
35+
The actual input passed to the ``stack_refs`` step will be a `~jwst.datamodels.container.ModelContainer`
3636
created by the :ref:`calwebb_coron3 <calwebb_coron3>` pipeline, containing a
3737
`~jwst.datamodels.CubeModel` data model for each PSF "_calints" exposure listed in the
3838
ASN file. See :ref:`calwebb_coron3 <calwebb_coron3>` for more details on the contents of

0 commit comments

Comments
 (0)