jwstflow 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jwstflow-0.2.1 → jwstflow-0.2.2}/PKG-INFO +41 -4
- {jwstflow-0.2.1 → jwstflow-0.2.2}/README.md +40 -3
- jwstflow-0.2.2/pyproject.toml +104 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/pyproject.toml.orig +35 -16
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/__init__.py +9 -4
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/cli.py +17 -12
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/config/loader.py +25 -5
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/config/presets/miri_imaging.yaml +2 -2
- jwstflow-0.2.2/src/jwstflow/config/presets/nircam_imaging.yaml +53 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/config/presets/nirspec_mos.yaml +1 -1
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/config/schema.py +5 -3
- jwstflow-0.2.2/src/jwstflow/cubes/__init__.py +71 -0
- jwstflow-0.2.2/src/jwstflow/cubes/clusters/__init__.py +102 -0
- jwstflow-0.2.2/src/jwstflow/cubes/clusters/compare.py +54 -0
- jwstflow-0.2.2/src/jwstflow/cubes/clusters/detector.py +67 -0
- jwstflow-0.2.2/src/jwstflow/cubes/clusters/product.py +99 -0
- jwstflow-0.2.2/src/jwstflow/cubes/clusters/regions.py +132 -0
- jwstflow-0.2.2/src/jwstflow/cubes/clusters/steps.py +298 -0
- jwstflow-0.2.2/src/jwstflow/cubes/detector.py +109 -0
- jwstflow-0.2.2/src/jwstflow/cubes/gaps/__init__.py +112 -0
- jwstflow-0.2.2/src/jwstflow/cubes/gaps/compare.py +79 -0
- jwstflow-0.2.2/src/jwstflow/cubes/gaps/coverage.py +146 -0
- jwstflow-0.2.2/src/jwstflow/cubes/gaps/edges.py +123 -0
- jwstflow-0.2.2/src/jwstflow/cubes/gaps/groups.py +54 -0
- jwstflow-0.2.2/src/jwstflow/cubes/gaps/product.py +85 -0
- jwstflow-0.2.2/src/jwstflow/cubes/gaps/steps.py +254 -0
- jwstflow-0.2.2/src/jwstflow/cubes/instrument.py +18 -0
- {jwstflow-0.2.1/src/jwstflow → jwstflow-0.2.2/src/jwstflow/cubes}/masks.py +18 -122
- jwstflow-0.2.2/src/jwstflow/cubes/morphology.py +42 -0
- jwstflow-0.2.2/src/jwstflow/cubes/psf/__init__.py +132 -0
- jwstflow-0.2.2/src/jwstflow/cubes/psf/engines.py +203 -0
- jwstflow-0.2.2/src/jwstflow/cubes/psf/grid.py +70 -0
- jwstflow-0.2.2/src/jwstflow/cubes/psf/instrument.py +187 -0
- jwstflow-0.2.2/src/jwstflow/cubes/psf/neighbour.py +747 -0
- jwstflow-0.2.2/src/jwstflow/cubes/psf/product.py +387 -0
- jwstflow-0.2.2/src/jwstflow/cubes/psf/steps.py +718 -0
- jwstflow-0.2.2/src/jwstflow/cubes/psf/subtraction.py +145 -0
- jwstflow-0.2.2/src/jwstflow/cubes/stitching/__init__.py +166 -0
- jwstflow-0.2.2/src/jwstflow/cubes/stitching/grid.py +278 -0
- jwstflow-0.2.2/src/jwstflow/cubes/stitching/matched.py +77 -0
- jwstflow-0.2.2/src/jwstflow/cubes/stitching/measure.py +328 -0
- jwstflow-0.2.2/src/jwstflow/cubes/stitching/product.py +168 -0
- jwstflow-0.2.2/src/jwstflow/cubes/stitching/regrid.py +271 -0
- jwstflow-0.2.2/src/jwstflow/cubes/stitching/segments.py +112 -0
- jwstflow-0.2.2/src/jwstflow/cubes/stitching/steps.py +510 -0
- jwstflow-0.2.2/src/jwstflow/cubes/wcs.py +131 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/data/discovery.py +11 -2
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/data/download.py +25 -2
- jwstflow-0.2.1/src/jwstflow/contrib/nirspec.py → jwstflow-0.2.2/src/jwstflow/data/msa.py +2 -2
- {jwstflow-0.2.1/src/jwstflow → jwstflow-0.2.2/src/jwstflow/engine}/associations.py +23 -8
- {jwstflow-0.2.1/src/jwstflow → jwstflow-0.2.2/src/jwstflow/engine}/crds.py +1 -1
- {jwstflow-0.2.1/src/jwstflow → jwstflow-0.2.2/src/jwstflow/engine}/dagviz.py +3 -3
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/engine/executor.py +20 -2
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/engine/runner.py +20 -20
- jwstflow-0.2.2/src/jwstflow/images/__init__.py +22 -0
- jwstflow-0.2.2/src/jwstflow/images/astrometry/__init__.py +102 -0
- jwstflow-0.2.2/src/jwstflow/images/astrometry/catalogs.py +201 -0
- jwstflow-0.2.2/src/jwstflow/images/astrometry/gaia.py +202 -0
- jwstflow-0.2.2/src/jwstflow/images/astrometry/match.py +187 -0
- jwstflow-0.2.2/src/jwstflow/images/astrometry/product.py +87 -0
- jwstflow-0.2.2/src/jwstflow/images/astrometry/steps.py +270 -0
- jwstflow-0.2.2/src/jwstflow/images/filters.py +167 -0
- jwstflow-0.2.2/src/jwstflow/images/io.py +164 -0
- jwstflow-0.2.2/src/jwstflow/qa/__init__.py +43 -0
- jwstflow-0.2.2/src/jwstflow/qa/annotation.py +176 -0
- jwstflow-0.2.2/src/jwstflow/qa/frames.py +528 -0
- jwstflow-0.2.2/src/jwstflow/qa/io.py +219 -0
- jwstflow-0.2.2/src/jwstflow/qa/labels.py +198 -0
- jwstflow-0.2.2/src/jwstflow/qa/layout.py +721 -0
- jwstflow-0.2.2/src/jwstflow/qa/lines.py +280 -0
- jwstflow-0.2.2/src/jwstflow/qa/placement.py +132 -0
- jwstflow-0.2.2/src/jwstflow/qa/plots.py +181 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/__init__.py +55 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/archival.py +173 -0
- {jwstflow-0.2.1/src/jwstflow/contrib → jwstflow-0.2.2/src/jwstflow/qa/steps}/clusters.py +28 -29
- jwstflow-0.2.2/src/jwstflow/qa/steps/cube_stitch.py +270 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/cubes.py +206 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/gaps.py +84 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/images.py +500 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/mast_compare.py +353 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/psf.py +263 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/spectra.py +326 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/stitch.py +370 -0
- jwstflow-0.2.2/src/jwstflow/qa/steps/summary.py +52 -0
- jwstflow-0.2.2/src/jwstflow/qa/style.py +371 -0
- jwstflow-0.2.2/src/jwstflow/qa/units.py +36 -0
- jwstflow-0.2.2/src/jwstflow/refdata/filters/jwst_imaging_filters.ecsv +71 -0
- jwstflow-0.2.2/src/jwstflow/refdata/filters/jwst_imaging_throughputs.ecsv +10815 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/refdata/spectral_features/gas_lines.ecsv +51 -50
- jwstflow-0.2.2/src/jwstflow/refdata/spectral_features/gas_lines_extended.ecsv +192 -0
- jwstflow-0.2.2/src/jwstflow/refdata/spectral_features/photospheric_lines.ecsv +88 -0
- jwstflow-0.2.2/src/jwstflow/scaffold/__init__.py +14 -0
- jwstflow-0.2.1/src/jwstflow/scaffold.py → jwstflow-0.2.2/src/jwstflow/scaffold/package.py +30 -18
- jwstflow-0.2.2/src/jwstflow/scaffold/step.py +82 -0
- jwstflow-0.2.2/src/jwstflow/spectra/__init__.py +39 -0
- jwstflow-0.2.2/src/jwstflow/spectra/archival.py +169 -0
- {jwstflow-0.2.1/src/jwstflow → jwstflow-0.2.2/src/jwstflow/spectra}/features.py +17 -10
- jwstflow-0.2.2/src/jwstflow/spectra/lines.py +353 -0
- jwstflow-0.2.2/src/jwstflow/spectra/overlaps.py +281 -0
- jwstflow-0.2.2/src/jwstflow/spectra/stitching.py +423 -0
- jwstflow-0.2.1/src/jwstflow/spectra.py → jwstflow-0.2.2/src/jwstflow/spectra/x1d.py +1 -16
- jwstflow-0.2.2/src/jwstflow/steps/__init__.py +106 -0
- jwstflow-0.2.2/src/jwstflow/steps/adapters.py +158 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/steps/descriptions.py +62 -5
- jwstflow-0.2.2/src/jwstflow/steps/interface.py +356 -0
- {jwstflow-0.2.1/src/jwstflow → jwstflow-0.2.2/src/jwstflow/steps}/naming.py +7 -2
- jwstflow-0.2.2/src/jwstflow/steps/plugins.py +126 -0
- jwstflow-0.2.2/src/jwstflow/steps/registry.py +247 -0
- jwstflow-0.2.2/src/jwstflow/testing/__init__.py +29 -0
- jwstflow-0.2.2/src/jwstflow/testing/audit.py +93 -0
- jwstflow-0.2.2/src/jwstflow/testing/mock/__init__.py +127 -0
- jwstflow-0.2.2/src/jwstflow/testing/mock/detector.py +92 -0
- jwstflow-0.2.2/src/jwstflow/testing/mock/instruments.py +26 -0
- jwstflow-0.2.2/src/jwstflow/testing/mock/observations.py +332 -0
- jwstflow-0.2.2/src/jwstflow/testing/mock/scene.py +159 -0
- jwstflow-0.2.2/src/jwstflow/testing/mock/stubs.py +556 -0
- jwstflow-0.2.2/src/jwstflow/testing/mock/workflow.py +63 -0
- jwstflow-0.2.2/src/jwstflow/testing/run.py +41 -0
- jwstflow-0.2.2/src/jwstflow/testing/synthetic.py +126 -0
- jwstflow-0.2.1/pyproject.toml +0 -88
- jwstflow-0.2.1/src/jwstflow/clusters.py +0 -724
- jwstflow-0.2.1/src/jwstflow/contrib/__init__.py +0 -1
- jwstflow-0.2.1/src/jwstflow/contrib/mast_compare.py +0 -200
- jwstflow-0.2.1/src/jwstflow/contrib/psf.py +0 -239
- jwstflow-0.2.1/src/jwstflow/contrib/qa.py +0 -690
- jwstflow-0.2.1/src/jwstflow/psf.py +0 -769
- jwstflow-0.2.1/src/jwstflow/qafig.py +0 -391
- jwstflow-0.2.1/src/jwstflow/steps/__init__.py +0 -46
- jwstflow-0.2.1/src/jwstflow/steps/base.py +0 -845
- jwstflow-0.2.1/src/jwstflow/stitching.py +0 -382
- jwstflow-0.2.1/src/jwstflow/testing/__init__.py +0 -290
- jwstflow-0.2.1/src/jwstflow/testing/mock.py +0 -1164
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/config/__init__.py +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/config/presets/miri_lrs.yaml +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/config/presets/miri_mrs.yaml +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/config/presets/nirspec_fs.yaml +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/config/presets/nirspec_ifu.yaml +0 -0
- {jwstflow-0.2.1/src/jwstflow → jwstflow-0.2.2/src/jwstflow/config}/project.py +0 -0
- {jwstflow-0.2.1/src/jwstflow → jwstflow-0.2.2/src/jwstflow/cubes}/apcorr.py +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/data/__init__.py +0 -0
- {jwstflow-0.2.1/src/jwstflow → jwstflow-0.2.2/src/jwstflow/data}/targets.py +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/engine/__init__.py +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/engine/graph.py +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/engine/state.py +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/py.typed +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/refdata/spectral_features/ice_bands.ecsv +0 -0
- {jwstflow-0.2.1 → jwstflow-0.2.2}/src/jwstflow/refdata/spectral_features/pah_bands.ecsv +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: jwstflow
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Lightweight YAML-driven orchestrator for the official JWST calibration pipeline (NIRSpec + MIRI).
|
|
5
5
|
Keywords: jwst,nirspec,miri,pipeline,stpipe,astronomy
|
|
6
6
|
Author: Lukas Welzel
|
|
@@ -37,7 +37,7 @@ Description-Content-Type: text/markdown
|
|
|
37
37
|
<p align="center">
|
|
38
38
|
<a href="https://github.com/spacetelescope/jwst"><img alt="jwst" src="https://img.shields.io/badge/jwst-3.x-blue"></a>
|
|
39
39
|
<img alt="python" src="https://img.shields.io/badge/python-%E2%89%A53.12-blue">
|
|
40
|
-
<img alt="tests" src="https://img.shields.io/badge/tests-
|
|
40
|
+
<img alt="tests" src="https://img.shields.io/badge/tests-300%20passing-brightgreen">
|
|
41
41
|
<img alt="status" src="https://img.shields.io/badge/status-alpha-orange">
|
|
42
42
|
</p>
|
|
43
43
|
|
|
@@ -129,8 +129,8 @@ stages:
|
|
|
129
129
|
Outputs land in `reductions/<target>/<run>/` split by calibration level
|
|
130
130
|
(`stage1/ ... stage4/`, `qa/`), raw data is shared per target, and stage
|
|
131
131
|
names come from the steps themselves so every run looks the same everywhere.
|
|
132
|
-
Start from a preset (`extends: preset:nirspec_ifu`; also `
|
|
133
|
-
`miri_mrs`, `miri_imaging`) and override only what your data needs.
|
|
132
|
+
Start from a preset (`extends: preset:nirspec_ifu`; also `nirspec_fs`,
|
|
133
|
+
`nirspec_mos`, `miri_mrs`, `miri_lrs`, `miri_imaging`, `nircam_imaging`) and override only what your data needs.
|
|
134
134
|
|
|
135
135
|
### The rest of the interface
|
|
136
136
|
|
|
@@ -179,6 +179,43 @@ official products); `jwstflow new-step` scaffolds a step with a passing test
|
|
|
179
179
|
and `jwstflow.testing` runs steps on synthetic data without CRDS or real
|
|
180
180
|
observations.
|
|
181
181
|
|
|
182
|
+
## Coverage
|
|
183
|
+
|
|
184
|
+
By default, jwstflow calibrates nothing itself: every calibration step is the `jwst` pipeline's, so in
|
|
185
|
+
principle it can do anything that `jwst` contains. What it adds around the steps (finding and
|
|
186
|
+
downloading the exposures, building the associations, naming the products, the QA) is where
|
|
187
|
+
a mode is either supported by construction or has been tested by the developers. The table keeps the two
|
|
188
|
+
apart:
|
|
189
|
+
|
|
190
|
+
- **technical**: what the orchestration supports by construction. Pipelines have aliases
|
|
191
|
+
(`detector1`, `image2`, `spec2`, `image3`, `spec3`, `tso3`, `coron3`, `dark`) and any other
|
|
192
|
+
`jwst` pipeline or step runs by its dotted path (e.g. `jwst.pipeline:Ami3Pipeline`);
|
|
193
|
+
downloads take NIRSpec, MIRI, NIRCam and NIRISS; associations are built per exposure or
|
|
194
|
+
grouped by header keywords, with member rules for `background`, `imprint`, `psf`,
|
|
195
|
+
`target_acquisition`, `selfcal` and `sourcecat` exposures; a preset where one exists;
|
|
196
|
+
- **verified**: reduced end to end on real data, the products compared with MAST's
|
|
197
|
+
(`mast_compare`), in [jwstflow-reducer](https://github.com/lwelzel/jwstflow-reducer).
|
|
198
|
+
|
|
199
|
+
| Instrument | Mode | Verified | Technical |
|
|
200
|
+
|---|---|---|---|
|
|
201
|
+
| NIRSpec | IFU | yes | preset `nirspec_ifu` |
|
|
202
|
+
| NIRSpec | fixed slit | -- | preset `nirspec_fs` |
|
|
203
|
+
| NIRSpec | MOS | -- | preset `nirspec_mos` (with the MSA metadata) |
|
|
204
|
+
| NIRSpec | BOTS (time series) | -- | `detector1` -> `spec2` -> `tso3`; no preset |
|
|
205
|
+
| MIRI | MRS | yes | preset `miri_mrs` |
|
|
206
|
+
| MIRI | imaging | yes | preset `miri_imaging` |
|
|
207
|
+
| MIRI | LRS | -- | preset `miri_lrs` (slit); slitless time series via `tso3` |
|
|
208
|
+
| MIRI | coronagraphy | -- | `coron3` with `psf` members |
|
|
209
|
+
| NIRCam | imaging | yes (full frame and subarrays) | preset `nircam_imaging` |
|
|
210
|
+
| NIRCam | coronagraphy | -- | `coron3` with `psf` members |
|
|
211
|
+
| NIRCam | grism and imaging time series | -- | `tso3` |
|
|
212
|
+
| NIRCam | WFSS | -- | no: `spec2` needs direct-image and segmentation-map members that the associations do not build |
|
|
213
|
+
| NIRISS | imaging | -- | `image2` -> `image3` |
|
|
214
|
+
| NIRISS | SOSS | -- | `spec2` -> `tso3` |
|
|
215
|
+
| NIRISS | AMI | -- | `jwst.pipeline:Ami3Pipeline` by its dotted path, with `psf` members |
|
|
216
|
+
| NIRISS | WFSS | -- | no (as for NIRCam) |
|
|
217
|
+
| FGS | -- | -- | no (not a download instrument) |
|
|
218
|
+
|
|
182
219
|
## Citing
|
|
183
220
|
|
|
184
221
|
There is no jwstflow publication yet. If jwstflow contributed to your
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<a href="https://github.com/spacetelescope/jwst"><img alt="jwst" src="https://img.shields.io/badge/jwst-3.x-blue"></a>
|
|
5
5
|
<img alt="python" src="https://img.shields.io/badge/python-%E2%89%A53.12-blue">
|
|
6
|
-
<img alt="tests" src="https://img.shields.io/badge/tests-
|
|
6
|
+
<img alt="tests" src="https://img.shields.io/badge/tests-300%20passing-brightgreen">
|
|
7
7
|
<img alt="status" src="https://img.shields.io/badge/status-alpha-orange">
|
|
8
8
|
</p>
|
|
9
9
|
|
|
@@ -95,8 +95,8 @@ stages:
|
|
|
95
95
|
Outputs land in `reductions/<target>/<run>/` split by calibration level
|
|
96
96
|
(`stage1/ ... stage4/`, `qa/`), raw data is shared per target, and stage
|
|
97
97
|
names come from the steps themselves so every run looks the same everywhere.
|
|
98
|
-
Start from a preset (`extends: preset:nirspec_ifu`; also `
|
|
99
|
-
`miri_mrs`, `miri_imaging`) and override only what your data needs.
|
|
98
|
+
Start from a preset (`extends: preset:nirspec_ifu`; also `nirspec_fs`,
|
|
99
|
+
`nirspec_mos`, `miri_mrs`, `miri_lrs`, `miri_imaging`, `nircam_imaging`) and override only what your data needs.
|
|
100
100
|
|
|
101
101
|
### The rest of the interface
|
|
102
102
|
|
|
@@ -145,6 +145,43 @@ official products); `jwstflow new-step` scaffolds a step with a passing test
|
|
|
145
145
|
and `jwstflow.testing` runs steps on synthetic data without CRDS or real
|
|
146
146
|
observations.
|
|
147
147
|
|
|
148
|
+
## Coverage
|
|
149
|
+
|
|
150
|
+
By default, jwstflow calibrates nothing itself: every calibration step is the `jwst` pipeline's, so in
|
|
151
|
+
principle it can do anything that `jwst` contains. What it adds around the steps (finding and
|
|
152
|
+
downloading the exposures, building the associations, naming the products, the QA) is where
|
|
153
|
+
a mode is either supported by construction or has been tested by the developers. The table keeps the two
|
|
154
|
+
apart:
|
|
155
|
+
|
|
156
|
+
- **technical**: what the orchestration supports by construction. Pipelines have aliases
|
|
157
|
+
(`detector1`, `image2`, `spec2`, `image3`, `spec3`, `tso3`, `coron3`, `dark`) and any other
|
|
158
|
+
`jwst` pipeline or step runs by its dotted path (e.g. `jwst.pipeline:Ami3Pipeline`);
|
|
159
|
+
downloads take NIRSpec, MIRI, NIRCam and NIRISS; associations are built per exposure or
|
|
160
|
+
grouped by header keywords, with member rules for `background`, `imprint`, `psf`,
|
|
161
|
+
`target_acquisition`, `selfcal` and `sourcecat` exposures; a preset where one exists;
|
|
162
|
+
- **verified**: reduced end to end on real data, the products compared with MAST's
|
|
163
|
+
(`mast_compare`), in [jwstflow-reducer](https://github.com/lwelzel/jwstflow-reducer).
|
|
164
|
+
|
|
165
|
+
| Instrument | Mode | Verified | Technical |
|
|
166
|
+
|---|---|---|---|
|
|
167
|
+
| NIRSpec | IFU | yes | preset `nirspec_ifu` |
|
|
168
|
+
| NIRSpec | fixed slit | -- | preset `nirspec_fs` |
|
|
169
|
+
| NIRSpec | MOS | -- | preset `nirspec_mos` (with the MSA metadata) |
|
|
170
|
+
| NIRSpec | BOTS (time series) | -- | `detector1` -> `spec2` -> `tso3`; no preset |
|
|
171
|
+
| MIRI | MRS | yes | preset `miri_mrs` |
|
|
172
|
+
| MIRI | imaging | yes | preset `miri_imaging` |
|
|
173
|
+
| MIRI | LRS | -- | preset `miri_lrs` (slit); slitless time series via `tso3` |
|
|
174
|
+
| MIRI | coronagraphy | -- | `coron3` with `psf` members |
|
|
175
|
+
| NIRCam | imaging | yes (full frame and subarrays) | preset `nircam_imaging` |
|
|
176
|
+
| NIRCam | coronagraphy | -- | `coron3` with `psf` members |
|
|
177
|
+
| NIRCam | grism and imaging time series | -- | `tso3` |
|
|
178
|
+
| NIRCam | WFSS | -- | no: `spec2` needs direct-image and segmentation-map members that the associations do not build |
|
|
179
|
+
| NIRISS | imaging | -- | `image2` -> `image3` |
|
|
180
|
+
| NIRISS | SOSS | -- | `spec2` -> `tso3` |
|
|
181
|
+
| NIRISS | AMI | -- | `jwst.pipeline:Ami3Pipeline` by its dotted path, with `psf` members |
|
|
182
|
+
| NIRISS | WFSS | -- | no (as for NIRCam) |
|
|
183
|
+
| FGS | -- | -- | no (not a download instrument) |
|
|
184
|
+
|
|
148
185
|
## Citing
|
|
149
186
|
|
|
150
187
|
There is no jwstflow publication yet. If jwstflow contributed to your
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "jwstflow"
|
|
3
|
+
version = "0.2.2"
|
|
4
|
+
description = "Lightweight YAML-driven orchestrator for the official JWST calibration pipeline (NIRSpec + MIRI)."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
keywords = [
|
|
8
|
+
"jwst",
|
|
9
|
+
"nirspec",
|
|
10
|
+
"miri",
|
|
11
|
+
"pipeline",
|
|
12
|
+
"stpipe",
|
|
13
|
+
"astronomy",
|
|
14
|
+
]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Intended Audience :: Science/Research",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Topic :: Scientific/Engineering :: Astronomy",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"astropy>=8.0.1",
|
|
23
|
+
"astroquery>=0.4.11",
|
|
24
|
+
"cmasher>=1.9.2",
|
|
25
|
+
"dask>=2026.8.0",
|
|
26
|
+
"distributed>=2026.8.0",
|
|
27
|
+
"jwst>=3.0.0",
|
|
28
|
+
"matplotlib>=3.11.1",
|
|
29
|
+
"numpy>=2.5.2",
|
|
30
|
+
"pandas>=3.0.5",
|
|
31
|
+
"pydantic>=2.13.4",
|
|
32
|
+
"python-dotenv>=1.2.3",
|
|
33
|
+
"pyyaml>=6.0.3",
|
|
34
|
+
"rich>=15.0.0",
|
|
35
|
+
"scipy>=1.18.1",
|
|
36
|
+
"typer>=0.27.1",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[[project.authors]]
|
|
40
|
+
name = "Lukas Welzel"
|
|
41
|
+
email = "welzel@strw.leidenuniv.nl"
|
|
42
|
+
|
|
43
|
+
[project.optional-dependencies]
|
|
44
|
+
psf = ["stpsf>=2.0"]
|
|
45
|
+
|
|
46
|
+
[project.urls]
|
|
47
|
+
Homepage = "https://github.com/lwelzel/jwstflow"
|
|
48
|
+
Repository = "https://github.com/lwelzel/jwstflow"
|
|
49
|
+
Issues = "https://github.com/lwelzel/jwstflow/issues"
|
|
50
|
+
|
|
51
|
+
[project.scripts]
|
|
52
|
+
jwstflow = "jwstflow.cli:app"
|
|
53
|
+
|
|
54
|
+
[project.entry-points."jwstflow.steps"]
|
|
55
|
+
stitch_segments = "jwstflow.spectra.stitching:StitchSegments"
|
|
56
|
+
psf_cube = "jwstflow.cubes.psf.steps:PsfCube"
|
|
57
|
+
subtract_psf_neighbour = "jwstflow.cubes.psf.steps:SubtractPsfNeighbour"
|
|
58
|
+
flag_spaxel_clusters = "jwstflow.cubes.clusters.steps:FlagSpaxelClusters"
|
|
59
|
+
propagate_cluster_flags = "jwstflow.cubes.clusters.steps:PropagateClusterFlags"
|
|
60
|
+
flag_gap_outliers = "jwstflow.cubes.gaps.steps:FlagGapOutliers"
|
|
61
|
+
image_astrometry = "jwstflow.images.astrometry.steps:ImageAstrometry"
|
|
62
|
+
stitch_cubes = "jwstflow.cubes.stitching.steps:StitchCubes"
|
|
63
|
+
cube_build_matched = "jwstflow.cubes.stitching.matched:CubeBuildMatched"
|
|
64
|
+
fix_msa_metafile = "jwstflow.data.msa:fix_msa_metafile"
|
|
65
|
+
plot_spectrum = "jwstflow.qa.steps.spectra:PlotSpectrum"
|
|
66
|
+
plot_spectrum_apertures = "jwstflow.qa.steps.spectra:PlotSpectrumApertures"
|
|
67
|
+
plot_archival = "jwstflow.qa.steps.archival:PlotArchival"
|
|
68
|
+
plot_snr = "jwstflow.qa.steps.spectra:PlotSnr"
|
|
69
|
+
plot_spectrum_stages = "jwstflow.qa.steps.spectra:PlotSpectrumStages"
|
|
70
|
+
plot_stitch = "jwstflow.qa.steps.stitch:PlotStitch"
|
|
71
|
+
plot_stitch_overlaps = "jwstflow.qa.steps.stitch:PlotStitchOverlaps"
|
|
72
|
+
plot_stitch_background = "jwstflow.qa.steps.stitch:PlotStitchBackground"
|
|
73
|
+
quicklook_image = "jwstflow.qa.steps.images:QuicklookImage"
|
|
74
|
+
qa_image_summary = "jwstflow.qa.steps.images:QaImageSummary"
|
|
75
|
+
qa_image_astrometry = "jwstflow.qa.steps.images:QaImageAstrometry"
|
|
76
|
+
qa_cube_summary = "jwstflow.qa.steps.cubes:QaCubeSummary"
|
|
77
|
+
qa_cube_slices = "jwstflow.qa.steps.cubes:QaCubeSlices"
|
|
78
|
+
qa_psf_cube = "jwstflow.qa.steps.psf:QaPsfCube"
|
|
79
|
+
qa_psf_neighbour = "jwstflow.qa.steps.psf:QaPsfNeighbour"
|
|
80
|
+
qa_spaxel_clusters = "jwstflow.qa.steps.clusters:QaSpaxelClusters"
|
|
81
|
+
qa_gap_coverage = "jwstflow.qa.steps.gaps:QaGapCoverage"
|
|
82
|
+
qa_cube_stitch = "jwstflow.qa.steps.cube_stitch:QaCubeStitch"
|
|
83
|
+
mast_compare = "jwstflow.qa.steps.mast_compare:MastCompare"
|
|
84
|
+
header_summary = "jwstflow.qa.steps.summary:HeaderSummary"
|
|
85
|
+
|
|
86
|
+
[build-system]
|
|
87
|
+
requires = ["uv_build>=0.12.1,<0.13.0"]
|
|
88
|
+
build-backend = "uv_build"
|
|
89
|
+
|
|
90
|
+
[tool.uv]
|
|
91
|
+
link-mode = "copy"
|
|
92
|
+
|
|
93
|
+
[tool.pytest.ini_options]
|
|
94
|
+
testpaths = [
|
|
95
|
+
"tests",
|
|
96
|
+
"examples",
|
|
97
|
+
]
|
|
98
|
+
markers = ["integration: complete mock-observation workflow through the engine (seconds, offline; deselect with -m 'not integration')"]
|
|
99
|
+
|
|
100
|
+
[dependency-groups]
|
|
101
|
+
dev = [
|
|
102
|
+
"pytest>=9.1.1",
|
|
103
|
+
"ruff>=0.16.4",
|
|
104
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "jwstflow"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2"
|
|
4
4
|
description = "Lightweight YAML-driven orchestrator for the official JWST calibration pipeline (NIRSpec + MIRI)."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -53,22 +53,41 @@ Issues = "https://github.com/lwelzel/jwstflow/issues"
|
|
|
53
53
|
[project.scripts]
|
|
54
54
|
jwstflow = "jwstflow.cli:app"
|
|
55
55
|
|
|
56
|
-
#
|
|
56
|
+
# jwstflow's own steps, by name: this is the one list. Each entry names the module that *defines* the
|
|
57
|
+
# step (that file is hashed into the task ids and read for `jwstflow steps`).
|
|
57
58
|
[project.entry-points."jwstflow.steps"]
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
59
|
+
# data steps: each lives with the feature it implements
|
|
60
|
+
stitch_segments = "jwstflow.spectra.stitching:StitchSegments"
|
|
61
|
+
psf_cube = "jwstflow.cubes.psf.steps:PsfCube"
|
|
62
|
+
subtract_psf_neighbour = "jwstflow.cubes.psf.steps:SubtractPsfNeighbour"
|
|
63
|
+
flag_spaxel_clusters = "jwstflow.cubes.clusters.steps:FlagSpaxelClusters"
|
|
64
|
+
propagate_cluster_flags = "jwstflow.cubes.clusters.steps:PropagateClusterFlags"
|
|
65
|
+
flag_gap_outliers = "jwstflow.cubes.gaps.steps:FlagGapOutliers"
|
|
66
|
+
image_astrometry = "jwstflow.images.astrometry.steps:ImageAstrometry"
|
|
67
|
+
stitch_cubes = "jwstflow.cubes.stitching.steps:StitchCubes"
|
|
68
|
+
cube_build_matched = "jwstflow.cubes.stitching.matched:CubeBuildMatched"
|
|
69
|
+
fix_msa_metafile = "jwstflow.data.msa:fix_msa_metafile"
|
|
70
|
+
# QA steps: jwstflow.qa.steps
|
|
71
|
+
plot_spectrum = "jwstflow.qa.steps.spectra:PlotSpectrum"
|
|
72
|
+
plot_spectrum_apertures = "jwstflow.qa.steps.spectra:PlotSpectrumApertures"
|
|
73
|
+
plot_archival = "jwstflow.qa.steps.archival:PlotArchival"
|
|
74
|
+
plot_snr = "jwstflow.qa.steps.spectra:PlotSnr"
|
|
75
|
+
plot_spectrum_stages = "jwstflow.qa.steps.spectra:PlotSpectrumStages"
|
|
76
|
+
plot_stitch = "jwstflow.qa.steps.stitch:PlotStitch"
|
|
77
|
+
plot_stitch_overlaps = "jwstflow.qa.steps.stitch:PlotStitchOverlaps"
|
|
78
|
+
plot_stitch_background = "jwstflow.qa.steps.stitch:PlotStitchBackground"
|
|
79
|
+
quicklook_image = "jwstflow.qa.steps.images:QuicklookImage"
|
|
80
|
+
qa_image_summary = "jwstflow.qa.steps.images:QaImageSummary"
|
|
81
|
+
qa_image_astrometry = "jwstflow.qa.steps.images:QaImageAstrometry"
|
|
82
|
+
qa_cube_summary = "jwstflow.qa.steps.cubes:QaCubeSummary"
|
|
83
|
+
qa_cube_slices = "jwstflow.qa.steps.cubes:QaCubeSlices"
|
|
84
|
+
qa_psf_cube = "jwstflow.qa.steps.psf:QaPsfCube"
|
|
85
|
+
qa_psf_neighbour = "jwstflow.qa.steps.psf:QaPsfNeighbour"
|
|
86
|
+
qa_spaxel_clusters = "jwstflow.qa.steps.clusters:QaSpaxelClusters"
|
|
87
|
+
qa_gap_coverage = "jwstflow.qa.steps.gaps:QaGapCoverage"
|
|
88
|
+
qa_cube_stitch = "jwstflow.qa.steps.cube_stitch:QaCubeStitch"
|
|
89
|
+
mast_compare = "jwstflow.qa.steps.mast_compare:MastCompare"
|
|
90
|
+
header_summary = "jwstflow.qa.steps.summary:HeaderSummary"
|
|
72
91
|
|
|
73
92
|
[build-system]
|
|
74
93
|
requires = ["uv_build>=0.12.1,<0.13.0"]
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"""jwstflow: a lightweight, YAML-driven orchestrator for the JWST calibration pipeline."""
|
|
2
2
|
|
|
3
|
-
from . import
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
|
|
5
|
+
from . import qa
|
|
4
6
|
from .config import Config, ConfigError, config_from_dict, load_config
|
|
5
7
|
from .engine.runner import Runner, run_config
|
|
6
|
-
from .steps
|
|
8
|
+
from .steps import RunContext, Step, StepParams, register_step
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
try:
|
|
11
|
+
__version__ = version("jwstflow")
|
|
12
|
+
except PackageNotFoundError: # a bare source checkout on PYTHONPATH, not an install
|
|
13
|
+
__version__ = "0+unknown"
|
|
9
14
|
|
|
10
15
|
__all__ = [
|
|
11
16
|
"Config",
|
|
@@ -17,7 +22,7 @@ __all__ = [
|
|
|
17
22
|
"__version__",
|
|
18
23
|
"config_from_dict",
|
|
19
24
|
"load_config",
|
|
20
|
-
"
|
|
25
|
+
"qa",
|
|
21
26
|
"register_step",
|
|
22
27
|
"run_config",
|
|
23
28
|
]
|
|
@@ -21,7 +21,7 @@ from .config import Config, ConfigError, list_presets, load_config, preset_path
|
|
|
21
21
|
from .engine.graph import select_stages
|
|
22
22
|
from .engine.runner import Runner
|
|
23
23
|
from .engine.state import StateStore
|
|
24
|
-
from .steps
|
|
24
|
+
from .steps import activate_plugins, describe_target, registered_steps
|
|
25
25
|
|
|
26
26
|
app = typer.Typer(
|
|
27
27
|
help="Lightweight YAML-driven orchestrator for the JWST calibration pipeline.",
|
|
@@ -61,11 +61,15 @@ def _load(config: Path, overrides: list[str] | None) -> Config:
|
|
|
61
61
|
raise typer.Exit(2) from None
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
@app.callback()
|
|
65
|
-
def _main(
|
|
64
|
+
@app.callback(invoke_without_command=True)
|
|
65
|
+
def _main(ctx: typer.Context,
|
|
66
|
+
version: Annotated[bool, typer.Option("--version", help="Show version and exit.")] = False) -> None:
|
|
66
67
|
if version:
|
|
67
68
|
console.print(f"jwstflow {__version__}")
|
|
68
69
|
raise typer.Exit()
|
|
70
|
+
if ctx.invoked_subcommand is None: # options but no command
|
|
71
|
+
console.print(ctx.get_help())
|
|
72
|
+
raise typer.Exit(2)
|
|
69
73
|
|
|
70
74
|
|
|
71
75
|
# ---------------------------------------------------------------------------
|
|
@@ -232,7 +236,7 @@ def asn(config: ConfigArg, stage: Annotated[str, typer.Argument(help="Stage with
|
|
|
232
236
|
if st.association is None:
|
|
233
237
|
err.print(f"[red]stage {stage!r} has no association section[/red]")
|
|
234
238
|
raise typer.Exit(2)
|
|
235
|
-
from .associations import summarize
|
|
239
|
+
from .engine.associations import summarize
|
|
236
240
|
|
|
237
241
|
tasks = runner.plan_stage(st)
|
|
238
242
|
for t in tasks:
|
|
@@ -300,8 +304,8 @@ def graph(
|
|
|
300
304
|
set_: Annotated[list[str] | None, typer.Option("--set", help="Override config values (key=value).")] = None,
|
|
301
305
|
) -> None:
|
|
302
306
|
"""Render the workflow DAG (data patterns -> steps -> products) without running anything."""
|
|
303
|
-
from .dagviz import render
|
|
304
|
-
from .steps
|
|
307
|
+
from .engine.dagviz import render
|
|
308
|
+
from .steps import LEVEL_DIRS
|
|
305
309
|
|
|
306
310
|
setup_logging("WARNING")
|
|
307
311
|
cfg = _load(config, set_)
|
|
@@ -365,10 +369,10 @@ def new_step(
|
|
|
365
369
|
suffix: Annotated[str | None, typer.Option("--suffix", help="Product suffix written (lowercase alphanumeric)")] = None,
|
|
366
370
|
) -> None:
|
|
367
371
|
"""Scaffold a custom step (documented class + a passing test) following the step contract."""
|
|
368
|
-
from .
|
|
372
|
+
from .scaffold import scaffold_step
|
|
369
373
|
|
|
370
374
|
lvl: int | str = int(level) if level.isdigit() else level
|
|
371
|
-
for f in
|
|
375
|
+
for f in scaffold_step(class_name, directory, level=lvl, inputs=inputs, suffix=suffix):
|
|
372
376
|
console.print(f"wrote {f}")
|
|
373
377
|
console.print(f"next: edit the run() method, then `python -m pytest {directory}` and `jwstflow check-step {directory}/<module>.py:{class_name}`")
|
|
374
378
|
|
|
@@ -381,8 +385,9 @@ def new_package(
|
|
|
381
385
|
private: Annotated[bool, typer.Option("--private", help="Proprietary flavour: restrictive LICENSE, 'Private :: Do Not Upload' classifier, private-repo instructions")] = False,
|
|
382
386
|
git: Annotated[bool, typer.Option("--git/--no-git", help="Initialise a git repository with an initial commit")] = True,
|
|
383
387
|
) -> None:
|
|
384
|
-
"""Scaffold a contributed step package: pyproject with `jwstflow.steps` entry points, src layout
|
|
385
|
-
step stubs, a passing declaration test, README (with a
|
|
388
|
+
"""Scaffold a contributed step package: pyproject with `jwstflow.steps` entry points, src layout
|
|
389
|
+
(`steps/` with one module per step), step stubs, a passing declaration test, README (with a
|
|
390
|
+
publish-to-GitHub walkthrough), CI and git.
|
|
386
391
|
Only scaffolding is generated -- each step's run() awaits your science."""
|
|
387
392
|
from .scaffold import scaffold_package
|
|
388
393
|
|
|
@@ -400,7 +405,7 @@ def new_package(
|
|
|
400
405
|
f"\nnext:\n"
|
|
401
406
|
f" cd {root}\n"
|
|
402
407
|
f" uv sync && uv run python -m pytest # green before any science exists\n"
|
|
403
|
-
f" edit src/{name.replace('-', '_')}/steps
|
|
408
|
+
f" edit src/{name.replace('-', '_')}/steps/<step>.py # one module per step: implement its run()\n"
|
|
404
409
|
f" README.md walks through publishing to GitHub ({'private' if private else 'public'})"
|
|
405
410
|
)
|
|
406
411
|
|
|
@@ -419,7 +424,7 @@ def steps(
|
|
|
419
424
|
from rich.padding import Padding
|
|
420
425
|
from rich.text import Text
|
|
421
426
|
|
|
422
|
-
from .steps
|
|
427
|
+
from .steps import step_description
|
|
423
428
|
|
|
424
429
|
known = registered_steps()
|
|
425
430
|
if name is not None:
|
|
@@ -31,7 +31,7 @@ from typing import Any
|
|
|
31
31
|
import yaml
|
|
32
32
|
from pydantic import ValidationError
|
|
33
33
|
|
|
34
|
-
from ..steps
|
|
34
|
+
from ..steps import activate_plugins, step_identity
|
|
35
35
|
from .schema import RAW_STAGE, Config, slugify
|
|
36
36
|
|
|
37
37
|
EXTENDS_KEY = "extends"
|
|
@@ -259,8 +259,28 @@ def _as_list(value: Any) -> list[Any]:
|
|
|
259
259
|
return list(value) if isinstance(value, (list, tuple)) else [value]
|
|
260
260
|
|
|
261
261
|
|
|
262
|
+
def _env_in_path(value: Any) -> Any:
|
|
263
|
+
"""``${env:VAR}`` / ``${env:VAR,default}`` in a path field resolved before the path is anchored
|
|
264
|
+
(``root``, ``workspace`` and ``download.dest`` are fixed before the rest is interpolated)."""
|
|
265
|
+
if not isinstance(value, str) or "${env:" not in value:
|
|
266
|
+
return value
|
|
267
|
+
|
|
268
|
+
def one(m: re.Match[str]) -> str:
|
|
269
|
+
ref = m.group(1)
|
|
270
|
+
if not ref.startswith("env:"):
|
|
271
|
+
raise ConfigError(f"only ${{env:...}} can be used in a path that is fixed before interpolation: ${{{ref}}}")
|
|
272
|
+
name, comma, default = ref[4:].partition(",")
|
|
273
|
+
if name in os.environ:
|
|
274
|
+
return os.environ[name]
|
|
275
|
+
if comma:
|
|
276
|
+
return default
|
|
277
|
+
raise ConfigError(f"environment variable {name!r} is not set (used as ${{{ref}}})")
|
|
278
|
+
|
|
279
|
+
return _INTERP.sub(one, value)
|
|
280
|
+
|
|
281
|
+
|
|
262
282
|
def _absolute(value: Any, base_dir: Path | None) -> str:
|
|
263
|
-
path = Path(str(value)).expanduser()
|
|
283
|
+
path = Path(str(_env_in_path(value))).expanduser()
|
|
264
284
|
if base_dir is not None and not path.is_absolute():
|
|
265
285
|
path = base_dir / path
|
|
266
286
|
return str(path.resolve())
|
|
@@ -286,7 +306,7 @@ def load_env_files(
|
|
|
286
306
|
"""
|
|
287
307
|
from dotenv import dotenv_values
|
|
288
308
|
|
|
289
|
-
from
|
|
309
|
+
from .project import candidate_env_files
|
|
290
310
|
|
|
291
311
|
candidates: list[tuple[Path, str]] = candidate_env_files(base_dir)
|
|
292
312
|
explicit_paths: list[tuple[Path, str]] = []
|
|
@@ -339,7 +359,7 @@ def _derive_stage_identity(stages: list[Any]) -> None:
|
|
|
339
359
|
|
|
340
360
|
def config_from_dict(data: dict[str, Any], *, base_dir: Path | None = None) -> Config:
|
|
341
361
|
"""Validate an already-composed dict (e.g. from OmegaConf/Hydra)."""
|
|
342
|
-
from
|
|
362
|
+
from .project import find_project_root
|
|
343
363
|
|
|
344
364
|
data = dict(data)
|
|
345
365
|
project_root = find_project_root(base_dir or Path.cwd())
|
|
@@ -386,7 +406,7 @@ def _check_step_parameters(cfg: Config) -> None:
|
|
|
386
406
|
a jwstflow Step that declares one (jwst steps validate their own parameters when they run)."""
|
|
387
407
|
import inspect
|
|
388
408
|
|
|
389
|
-
from ..steps
|
|
409
|
+
from ..steps import BUILTIN_ALIASES, Step, resolve_target
|
|
390
410
|
|
|
391
411
|
for stage in cfg.stages:
|
|
392
412
|
if stage.step in BUILTIN_ALIASES:
|
|
@@ -35,8 +35,8 @@ stages:
|
|
|
35
35
|
association:
|
|
36
36
|
mode: group
|
|
37
37
|
level: 3
|
|
38
|
-
group_by: [PROGRAM, OBSERVTN, FILTER]
|
|
39
|
-
product_name: "jw{PROGRAM}-o{OBSERVTN}_{TARGID}_miri_{
|
|
38
|
+
group_by: [PROGRAM, OBSERVTN, FILTER, SUBARRAY]
|
|
39
|
+
product_name: "jw{PROGRAM}-o{OBSERVTN}_{TARGID}_miri_{OPTELEM}{SUBARRAY_SUFFIX}" # f770w, f770w-brightsky
|
|
40
40
|
parameters:
|
|
41
41
|
steps:
|
|
42
42
|
tweakreg: {skip: false}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# yaml-language-server: $schema=jwstflow.schema.json
|
|
2
|
+
# NIRCam imaging: uncal -> detector1 -> image2 -> image3 (one mosaic per filter + pupil) -> quick-looks
|
|
3
|
+
# Start from it with: jwstflow init nircam_imaging --extend -o my_run.yaml
|
|
4
|
+
version: 1
|
|
5
|
+
run: nircam_imaging
|
|
6
|
+
# target: set in your workflow (extends: preset:...); results go to <workspace>/<target>/nircam_imaging/
|
|
7
|
+
|
|
8
|
+
crds: {path: "${env:CRDS_PATH,~/crds_cache}", context: null}
|
|
9
|
+
parallel: {backend: process, workers: 4}
|
|
10
|
+
|
|
11
|
+
download:
|
|
12
|
+
program: 1234
|
|
13
|
+
instrument: NIRCAM
|
|
14
|
+
modes: [IMAGE]
|
|
15
|
+
products: [UNCAL]
|
|
16
|
+
|
|
17
|
+
stages:
|
|
18
|
+
- step: detector1
|
|
19
|
+
inputs:
|
|
20
|
+
- {stage: raw, pattern: "*_uncal.fits", filters: {EXP_TYPE: [NRC_IMAGE]}}
|
|
21
|
+
parameters:
|
|
22
|
+
steps:
|
|
23
|
+
jump: {expand_large_events: true} # snowball flagging
|
|
24
|
+
clean_flicker_noise: {skip: true} # set false for 1/f cleaning (masks the sources itself): it lowers
|
|
25
|
+
# the noise of full-frame mosaics 2-3x at the same flux, but in a
|
|
26
|
+
# subarray filled by a bright star's PSF it takes 1-5 % of the light
|
|
27
|
+
# (filter SUBARRAY: FULL and run subarrays in a variant without it)
|
|
28
|
+
|
|
29
|
+
- step: image2
|
|
30
|
+
inputs:
|
|
31
|
+
- {stage: calwebb_detector1, pattern: "*_rate.fits"}
|
|
32
|
+
association:
|
|
33
|
+
mode: per_exposure
|
|
34
|
+
level: 2
|
|
35
|
+
|
|
36
|
+
- step: image3
|
|
37
|
+
inputs:
|
|
38
|
+
- {stage: calwebb_image2, pattern: "*_cal.fits"}
|
|
39
|
+
association:
|
|
40
|
+
mode: group
|
|
41
|
+
level: 3
|
|
42
|
+
group_by: [PROGRAM, OBSERVTN, FILTER, PUPIL, SUBARRAY] # short- and long-wavelength channels, both modules
|
|
43
|
+
product_name: "jw{PROGRAM}-o{OBSERVTN}_{TARGID}_nircam_{OPTELEM}{SUBARRAY_SUFFIX}" # clear-f200w, f405n-f444w-sub640
|
|
44
|
+
parameters:
|
|
45
|
+
steps:
|
|
46
|
+
tweakreg: {skip: false}
|
|
47
|
+
skymatch: {skymethod: match}
|
|
48
|
+
source_catalog: {snr_threshold: 5}
|
|
49
|
+
|
|
50
|
+
- step: quicklook_image
|
|
51
|
+
inputs:
|
|
52
|
+
- {stage: calwebb_image3, pattern: "*_i2d.fits"}
|
|
53
|
+
tags: [qa]
|
|
@@ -23,7 +23,7 @@ stages:
|
|
|
23
23
|
jump: {expand_large_events: true}
|
|
24
24
|
|
|
25
25
|
# spec2 opens the file named in MSAMETFL; make that an absolute path into the target's raw directory
|
|
26
|
-
- step:
|
|
26
|
+
- step: fix_msa_metafile
|
|
27
27
|
inputs:
|
|
28
28
|
- {stage: calwebb_detector1, pattern: "*_rate.fits"}
|
|
29
29
|
parameters: {search: raw}
|
|
@@ -28,7 +28,7 @@ from pydantic import (
|
|
|
28
28
|
)
|
|
29
29
|
|
|
30
30
|
# Name of the pseudo-stage that refers to downloaded/raw input data.
|
|
31
|
-
from ..steps
|
|
31
|
+
from ..steps import LEVEL_DIRS # noqa: E402
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
def slugify(text: str) -> str:
|
|
@@ -145,7 +145,7 @@ class CheckpointConfig(_Base):
|
|
|
145
145
|
# Data acquisition
|
|
146
146
|
# ----------------------------------------------------------------------------
|
|
147
147
|
|
|
148
|
-
Instrument = Literal["NIRSPEC", "MIRI"]
|
|
148
|
+
Instrument = Literal["NIRSPEC", "MIRI", "NIRCAM", "NIRISS"]
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
class DownloadConfig(_Base):
|
|
@@ -311,7 +311,9 @@ class AssociationConfig(_Base):
|
|
|
311
311
|
"level-3 convention jw<PPPPP>-o<OOO>_<tTTT>_<instrument>: {TARGID} is the MAST target id "
|
|
312
312
|
"recorded at download time (falls back to a slug of TARGPROP), {INSTRUME} is lower-cased "
|
|
313
313
|
"and cube_build appends the band / grating-filter itself. {OPTELEM} expands to "
|
|
314
|
-
"'g395h-f290lp' / 'ch1-short' when a product name needs it (NIRSpec IFU: use _{GRATING})
|
|
314
|
+
"'g395h-f290lp' / 'ch1-short' when a product name needs it (NIRSpec IFU: use _{GRATING}), "
|
|
315
|
+
"and for imagers to filter and pupil as DMS names them ('clear-f200w', 'f405n-f444w', 'f770w'); "
|
|
316
|
+
"{SUBARRAY_SUFFIX} is DMS's subarray part, '-brightsky' / '-sub640', empty for the full array.",
|
|
315
317
|
)
|
|
316
318
|
relative_paths: bool = Field(
|
|
317
319
|
default=False,
|