diff --git a/1542.mosaic_pipeline.rst b/1542.mosaic_pipeline.rst deleted file mode 100644 index 2fc68647d..000000000 --- a/1542.mosaic_pipeline.rst +++ /dev/null @@ -1 +0,0 @@ -Change the default suffix for mosaic products from _i2d to _coadd diff --git a/changes/1593.exposure_pipeline.rst b/changes/1593.exposure_pipeline.rst new file mode 100644 index 000000000..4cd0f7a0f --- /dev/null +++ b/changes/1593.exposure_pipeline.rst @@ -0,0 +1 @@ +Fix description of arguments in docs and add description of fully saturated input processing. diff --git a/changes/1593.resample.rst b/changes/1593.resample.rst new file mode 100644 index 000000000..4aed162eb --- /dev/null +++ b/changes/1593.resample.rst @@ -0,0 +1 @@ +Remove unused arguments from step specification. diff --git a/changes/1593.saturation.rst b/changes/1593.saturation.rst new file mode 100644 index 000000000..8ff7766a6 --- /dev/null +++ b/changes/1593.saturation.rst @@ -0,0 +1 @@ +Add saturation step docs to package index. diff --git a/docs/roman/package_index.rst b/docs/roman/package_index.rst index 34a31b3fd..fc849a1d7 100644 --- a/docs/roman/package_index.rst +++ b/docs/roman/package_index.rst @@ -14,6 +14,7 @@ references_general/index.rst refpix/index.rst resample/index.rst + saturation/index.rst skymatch/index.rst source_catalog/index.rst stpipe/index.rst diff --git a/docs/roman/pipeline/exposure_pipeline.rst b/docs/roman/pipeline/exposure_pipeline.rst index 30f81d863..a48c26774 100644 --- a/docs/roman/pipeline/exposure_pipeline.rst +++ b/docs/roman/pipeline/exposure_pipeline.rst @@ -39,18 +39,7 @@ table below. Arguments --------- -The ``exposure`` pipeline has an optional argument:: - - --use_ramp_jump_detection boolean default=True - -When set to ``True``, the pipeline will perform jump detection as a part of the ramp -fitting step. The data at this stage of the pipeline are still in the form of the original -3D ramps ( ngroups x ncols x nrows ) and have had all of the detector-level -correction steps applied to it, up to but not including the detection and flagging of -Cosmic-Ray (CR) hits within each ramp (integration). For this case the jump detection -module in :ref:`ramp_fitting ` will update the dq array with the CR hits (jumps) that -are identified in the step. - +The ``exposure`` pipeline has no arguments Inputs ------ @@ -78,6 +67,16 @@ extensions. When such a file is loaded into the pipeline, it is immediately converted into a `~romancal.datamodels.RampModel`, and has all additional data arrays for errors and Data Quality flags created and initialized. +When the ``ExposurePipeline`` processes a fully saturated input (all pixels flagged as saturated). +The corresponding output image will: + +- contain all 0 data arrays +- contain all 0 variance arrays +- not be processed by steps beyond saturation + +A single fully saturated input will also cause :ref:`tweakreg ` to be skipped +for all input images. + Outputs ------- diff --git a/docs/roman/references_general/references_general.rst b/docs/roman/references_general/references_general.rst index de4261a53..746b5ffdf 100644 --- a/docs/roman/references_general/references_general.rst +++ b/docs/roman/references_general/references_general.rst @@ -51,8 +51,6 @@ documentation on each reference file. +---------------------------------------------+--------------------------------------------------+ | :ref:`flatfield ` | :ref:`FLAT ` | +---------------------------------------------+--------------------------------------------------+ -| :ref:`GAIN ` | :ref:`ramp_fitting ` | -+---------------------------------------------+--------------------------------------------------+ | :ref:`linearity ` | :ref:`LINEARITY ` | +---------------------------------------------+--------------------------------------------------+ | :ref:`photom ` | :ref:`PHOTOM ` | @@ -74,6 +72,8 @@ documentation on each reference file. +--------------------------------------------------+---------------------------------------------+ | :ref:`FLAT ` | :ref:`flatfield ` | +--------------------------------------------------+---------------------------------------------+ +| :ref:`GAIN ` | :ref:`ramp_fitting ` | ++--------------------------------------------------+---------------------------------------------+ | :ref:`LINEARITY ` | :ref:`linearity ` | +--------------------------------------------------+---------------------------------------------+ | :ref:`MASK ` | :ref:`dq_init ` | diff --git a/docs/roman/resample/arguments.rst b/docs/roman/resample/arguments.rst index b72bb630a..4c0e0a759 100644 --- a/docs/roman/resample/arguments.rst +++ b/docs/roman/resample/arguments.rst @@ -82,24 +82,6 @@ image. If `weight_type=exptime`, the scaling value will be set equal to the exposure time found in the image header. -``--single`` (bool, default=False) - If set to `True`, resample each input image into a separate output. If - `False` (the default), each input is resampled additively (with weights) to - a common output - -``--blendheaders`` (bool, default=True) - Blend metadata from all input images into the resampled output image. - -``--allowed_memory`` (float, default=None) - Specifies the fractional amount of free memory to allow when creating the - resampled image. If ``None``, the environment variable - ``DMODEL_ALLOWED_MEMORY`` is used. If not defined, no check is made. If the - resampled image would be larger than specified, an ``OutputTooLargeError`` - exception will be generated. - - For example, if set to ``0.5``, only resampled images that use less than - half the available memory can be created. - ``--in_memory`` (bool, default=True) If set to `False`, write output datamodel to disk. diff --git a/docs/roman/stpipe/config_asdf.rst b/docs/roman/stpipe/config_asdf.rst index 923d517b9..b6fb79c1f 100644 --- a/docs/roman/stpipe/config_asdf.rst +++ b/docs/roman/stpipe/config_asdf.rst @@ -70,7 +70,6 @@ entries for clarity: output_use_model: false post_hooks: [] pre_hooks: [] - save_calibrated_ramp: false save_results: true search_output_file: true skip: false diff --git a/docs/roman/stpipe/user_pipeline.rst b/docs/roman/stpipe/user_pipeline.rst index 5c7dde510..619ae15d7 100644 --- a/docs/roman/stpipe/user_pipeline.rst +++ b/docs/roman/stpipe/user_pipeline.rst @@ -63,7 +63,6 @@ class: output_use_model: false post_hooks: [] pre_hooks: [] - save_calibrated_ramp: false save_results: true search_output_file: true skip: false diff --git a/romancal/pipeline/exposure_pipeline.py b/romancal/pipeline/exposure_pipeline.py index 11b19351f..d71460ca2 100644 --- a/romancal/pipeline/exposure_pipeline.py +++ b/romancal/pipeline/exposure_pipeline.py @@ -46,7 +46,6 @@ class ExposurePipeline(RomanPipeline): class_alias = "roman_elp" spec = """ - save_calibrated_ramp = boolean(default=False) save_results = boolean(default=False) suffix = string(default="cal") """ diff --git a/romancal/resample/resample.py b/romancal/resample/resample.py index 48749ebea..c359f1593 100644 --- a/romancal/resample/resample.py +++ b/romancal/resample/resample.py @@ -48,7 +48,6 @@ def __init__( input_models, output=None, single=False, - blendheaders=True, pixfrac=1.0, kernel="square", fillval="INDEF", @@ -90,7 +89,6 @@ def __init__( self.output_filename = output self.pscale_ratio = pscale_ratio self.single = single - self.blendheaders = blendheaders self.pixfrac = pixfrac self.kernel = kernel self.fillval = fillval @@ -143,23 +141,6 @@ def __init__( log.debug(f"Output mosaic size: {self.output_wcs.array_shape}") - # NOTE: should we enable memory allocation? - - # can_allocate, required_memory = datamodels.util.check_memory_allocation( - # self.output_wcs.array_shape, - # kwargs['allowed_memory'], - # datamodels.ImageModel - # ) - # if not can_allocate: - # raise OutputTooLargeError( - # f'Combined ImageModel size {self.output_wcs.array_shape} ' - # f'requires {bytes2human(required_memory)}. ' - # f'Model cannot be instantiated.' - # ) - - # NOTE: wait for William to fix bug in datamodels' init and then - # use datamodels.ImageModel(shape=(nx, ny)) instead of mk_datamodel() - # n_images sets the number of context image planes. # This should be 1 to start (not the default of 2). self.blank_output = maker_utils.mk_datamodel( @@ -341,9 +322,6 @@ def resample_many_to_one(self): ) is not None: output_model.meta.asn.table_name = asn_table_name - if self.blendheaders: - log.info("Skipping blendheaders for now.") - # Initialize the output with the wcs driz = gwcs_drizzle.GWCSDrizzle( output_model, diff --git a/romancal/resample/resample_step.py b/romancal/resample/resample_step.py index 8796a52ff..32c418b06 100644 --- a/romancal/resample/resample_step.py +++ b/romancal/resample/resample_step.py @@ -66,9 +66,6 @@ class ResampleStep(RomanStep): pixel_scale_ratio = float(default=1.0) # Ratio of input to output pixel scale pixel_scale = float(default=None) # Absolute pixel scale in arcsec output_wcs = string(default='') # Custom output WCS. - single = boolean(default=False) - blendheaders = boolean(default=True) - allowed_memory = float(default=None) # Fraction of memory to use for the combined image. in_memory = boolean(default=True) good_bits = string(default='~DO_NOT_USE+NON_SCIENCE') # The good bits to use for building the resampling mask. """ @@ -80,7 +77,6 @@ def process(self, input): input_models = ModelLibrary([input]) # set output filename from meta.filename found in the first datamodel output = input.meta.filename - self.blendheaders = False elif isinstance(input, str): # either a single asdf filename or an association filename try: @@ -118,7 +114,6 @@ def process(self, input): self.wht_type = self.weight_type self.log.info("Setting drizzle's default parameters...") kwargs = self.set_drizzle_defaults() - kwargs["allowed_memory"] = self.allowed_memory # Issue a warning about the use of exptime weighting if self.wht_type == "exptime": diff --git a/romancal/resample/tests/test_resample.py b/romancal/resample/tests/test_resample.py index 306e5c8ef..bd782c607 100644 --- a/romancal/resample/tests/test_resample.py +++ b/romancal/resample/tests/test_resample.py @@ -290,8 +290,6 @@ def test_resampledata_init(exposure_1): """Test that ResampleData can set initial values.""" input_models = ModelLibrary(exposure_1) output = "output.asdf" - single = False - blendheaders = False pixfrac = 0.8 kernel = "turbo" fillval = 0.0 @@ -304,8 +302,6 @@ def test_resampledata_init(exposure_1): resample_data = ResampleData( input_models, output=output, - single=single, - blendheaders=blendheaders, pixfrac=pixfrac, kernel=kernel, fillval=fillval, @@ -320,8 +316,6 @@ def test_resampledata_init(exposure_1): assert resample_data.input_models == input_models assert resample_data.output_filename == output assert resample_data.pscale_ratio == pscale_ratio - assert resample_data.single == single - assert resample_data.blendheaders == blendheaders assert resample_data.pixfrac == pixfrac assert resample_data.kernel == kernel assert resample_data.fillval == fillval @@ -341,8 +335,6 @@ def test_resampledata_init_default(exposure_1): assert resample_data.input_models == input_models assert resample_data.output_filename is None assert resample_data.pscale_ratio == 1.0 - assert not resample_data.single - assert resample_data.blendheaders assert resample_data.pixfrac == 1.0 assert resample_data.kernel == "square" assert resample_data.fillval == "INDEF"