Skip to content

Commit

Permalink
Merge branch 'main' into JP-3749
Browse files Browse the repository at this point in the history
  • Loading branch information
emolter authored Oct 2, 2024
2 parents 6dbaa01 + b47cac8 commit 9abfbeb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions changes/8851.outlier_detection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update documentation to clarify the interaction between pipeline-level and step-level `--in_memory` flags.
2 changes: 2 additions & 0 deletions docs/jwst/outlier_detection/arguments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ that control the behavior of the processing:
Specifies whether or not to load and create all images that are used during
processing into memory. If ``False``, input files are loaded from disk when
needed and all intermediate files are stored on disk, rather than in memory.
This flag is superseded by the pipeline-level ``--in-memory`` flag, and thus
has no effect when running the full level 3 pipeline.

Step Arguments for IFU data
===========================
Expand Down
6 changes: 5 additions & 1 deletion docs/jwst/outlier_detection/outlier_detection_imaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ during processing includes:
Those sections are then read in one at a time to compute the median image.

These changes result in a minimum amount of memory usage during processing at the obvious
expense of reading and writing the products from disk.
expense of reading and writing the products from disk. Note that if a ModelLibrary object
is input to the step, the memory behavior of the step is read from the ``on_disk`` status
of the ModelLibrary object, and the ``in_memory`` parameter of the step is ignored.
When running ``calwebb_image3``, the ``in_memory`` flag should therefore be set at the pipeline level,
e.g., ``strun calwebb_image3 asn.json --in-memory=True``; the step-specific flag will be ignored.

.. automodapi:: jwst.outlier_detection.imaging
1 change: 0 additions & 1 deletion jwst/outlier_detection/imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def detect_outliers(
kernel=kernel,
fillval=fillval,
good_bits=good_bits,
in_memory=in_memory,
allowed_memory=allowed_memory,
)
median_data, median_wcs = median_with_resampling(input_models,
Expand Down
2 changes: 1 addition & 1 deletion jwst/outlier_detection/outlier_detection_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class OutlierDetectionStep(Step):
good_bits = string(default="~DO_NOT_USE") # DQ flags to allow
search_output_file = boolean(default=False)
allowed_memory = float(default=None) # Fraction of memory to use for the combined image
in_memory = boolean(default=False)
in_memory = boolean(default=False) # ignored if run within the pipeline; set at pipeline level instead
"""

def process(self, input_data):
Expand Down
1 change: 0 additions & 1 deletion jwst/outlier_detection/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def detect_outliers(
kernel=kernel,
fillval=fillval,
good_bits=good_bits,
in_memory=in_memory,
)

median_data, median_wcs = median_with_resampling(
Expand Down

0 comments on commit 9abfbeb

Please sign in to comment.