From cb76de24d16fd6f701df994671eaf96097c5f220 Mon Sep 17 00:00:00 2001 From: Christopher Waters Date: Thu, 9 Jun 2022 17:56:27 -0500 Subject: [PATCH 1/6] Add preliminary documentation stubs. --- .../tasks/lsst.ip.isr.AssembleCcdTask.rst | 45 +++++++++++++++++++ .../tasks/lsst.ip.isr.CrosstalkTask.rst | 45 +++++++++++++++++++ .../tasks/lsst.ip.isr.FringeTask.rst | 45 +++++++++++++++++++ doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst | 45 +++++++++++++++++++ doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst | 45 +++++++++++++++++++ .../tasks/lsst.ip.isr.MaskingTask.rst | 45 +++++++++++++++++++ .../tasks/lsst.ip.isr.NullCrosstalkTask.rst | 45 +++++++++++++++++++ .../lsst.ip.isr.OverscanCorrectionTask.rst | 45 +++++++++++++++++++ .../tasks/lsst.ip.isr.RunIsrTask.rst | 45 +++++++++++++++++++ .../tasks/lsst.ip.isr.StrayLightTask.rst | 45 +++++++++++++++++++ 10 files changed, 450 insertions(+) create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.RunIsrTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst new file mode 100644 index 000000000..c361822d1 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.AssembleCcdTask + +############### +AssembleCcdTask +############### + +``AssembleCcdTask`` does + +.. _lsst.ip.isr.AssembleCcdTask-processing-summary: + +Processing summary +================== + +``AssembleCcdTask`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.AssembleCcdTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.AssembleCcdTask + +.. _lsst.ip.isr.AssembleCcdTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.AssembleCcdTask + +.. _lsst.ip.isr.AssembleCcdTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.AssembleCcdTask + +.. _lsst.ip.isr.AssembleCcdTask-debug: + +Debugging +========= + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst new file mode 100644 index 000000000..f4745c6f0 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.CrosstalkTask + +############# +CrosstalkTask +############# + +``CrosstalkTask`` does + +.. _lsst.ip.isr.CrosstalkTask-processing-summary: + +Processing summary +================== + +``CrosstalkTask`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.CrosstalkTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.CrosstalkTask + +.. _lsst.ip.isr.CrosstalkTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.CrosstalkTask + +.. _lsst.ip.isr.CrosstalkTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.CrosstalkTask + +.. _lsst.ip.isr.CrosstalkTask-debug: + +Debugging +========= + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst new file mode 100644 index 000000000..d5288213a --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.FringeTask + +########## +FringeTask +########## + +``FringeTask`` does + +.. _lsst.ip.isr.FringeTask-processing-summary: + +Processing summary +================== + +``FringeTask`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.FringeTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.FringeTask + +.. _lsst.ip.isr.FringeTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.FringeTask + +.. _lsst.ip.isr.FringeTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.FringeTask + +.. _lsst.ip.isr.FringeTask-debug: + +Debugging +========= + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst new file mode 100644 index 000000000..021e9a596 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.IsrMock + +####### +IsrMock +####### + +``IsrMock`` does + +.. _lsst.ip.isr.IsrMock-processing-summary: + +Processing summary +================== + +``IsrMock`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.IsrMock-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.IsrMock + +.. _lsst.ip.isr.IsrMock-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.IsrMock + +.. _lsst.ip.isr.IsrMock-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.IsrMock + +.. _lsst.ip.isr.IsrMock-debug: + +Debugging +========= + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst new file mode 100644 index 000000000..045e08203 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.IsrTask + +####### +IsrTask +####### + +``IsrTask`` does + +.. _lsst.ip.isr.IsrTask-processing-summary: + +Processing summary +================== + +``IsrTask`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.IsrTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.IsrTask + +.. _lsst.ip.isr.IsrTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.IsrTask + +.. _lsst.ip.isr.IsrTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.IsrTask + +.. _lsst.ip.isr.IsrTask-debug: + +Debugging +========= + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst new file mode 100644 index 000000000..2dc8710a7 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.MaskingTask + +########### +MaskingTask +########### + +``MaskingTask`` does + +.. _lsst.ip.isr.MaskingTask-processing-summary: + +Processing summary +================== + +``MaskingTask`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.MaskingTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.MaskingTask + +.. _lsst.ip.isr.MaskingTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.MaskingTask + +.. _lsst.ip.isr.MaskingTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.MaskingTask + +.. _lsst.ip.isr.MaskingTask-debug: + +Debugging +========= + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst new file mode 100644 index 000000000..03bc239f4 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.NullCrosstalkTask + +################# +NullCrosstalkTask +################# + +``NullCrosstalkTask`` does + +.. _lsst.ip.isr.NullCrosstalkTask-processing-summary: + +Processing summary +================== + +``NullCrosstalkTask`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.NullCrosstalkTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.NullCrosstalkTask + +.. _lsst.ip.isr.NullCrosstalkTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.NullCrosstalkTask + +.. _lsst.ip.isr.NullCrosstalkTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.NullCrosstalkTask + +.. _lsst.ip.isr.NullCrosstalkTask-debug: + +Debugging +========= + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst new file mode 100644 index 000000000..c4fbffadd --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.OverscanCorrectionTask + +###################### +OverscanCorrectionTask +###################### + +``OverscanCorrectionTask`` does + +.. _lsst.ip.isr.OverscanCorrectionTask-processing-summary: + +Processing summary +================== + +``OverscanCorrectionTask`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.OverscanCorrectionTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.OverscanCorrectionTask + +.. _lsst.ip.isr.OverscanCorrectionTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.OverscanCorrectionTask + +.. _lsst.ip.isr.OverscanCorrectionTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.OverscanCorrectionTask + +.. _lsst.ip.isr.OverscanCorrectionTask-debug: + +Debugging +========= + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.RunIsrTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.RunIsrTask.rst new file mode 100644 index 000000000..e16f75779 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.RunIsrTask.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.RunIsrTask + +########## +RunIsrTask +########## + +``RunIsrTask`` does + +.. _lsst.ip.isr.RunIsrTask-processing-summary: + +Processing summary +================== + +``RunIsrTask`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.RunIsrTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.RunIsrTask + +.. _lsst.ip.isr.RunIsrTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.RunIsrTask + +.. _lsst.ip.isr.RunIsrTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.RunIsrTask + +.. _lsst.ip.isr.RunIsrTask-debug: + +Debugging +========= + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst new file mode 100644 index 000000000..69482a708 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst @@ -0,0 +1,45 @@ +.. lsst-task-topic:: lsst.ip.isr.StrayLightTask + +############## +StrayLightTask +############## + +``StrayLightTask`` does + +.. _lsst.ip.isr.StrayLightTask-processing-summary: + +Processing summary +================== + +``StrayLightTask`` runs these operations: + +#. +#. + + +.. _lsst.ip.isr.StrayLightTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.StrayLightTask + +.. _lsst.ip.isr.StrayLightTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.StrayLightTask + +.. _lsst.ip.isr.StrayLightTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.StrayLightTask + +.. _lsst.ip.isr.StrayLightTask-debug: + +Debugging +========= + From 1c23a168da001d1eb0f09fe3938cd332ff468607 Mon Sep 17 00:00:00 2001 From: Christopher Waters Date: Thu, 9 Jun 2022 18:01:31 -0500 Subject: [PATCH 2/6] Update docstrings. Fix whitespace errors. Fix outdated types. Fix typos. --- doc/SConscript | 3 - .../tasks/lsst.ip.isr.IsrMock.rst | 48 +++++++++++++ doc/lsst.ip.isr/index.rst | 46 ++++++++++++- .../tasks/lsst.ip.isr.AssembleCcdTask.rst | 8 ++- .../tasks/lsst.ip.isr.CrosstalkTask.rst | 12 ++-- .../tasks/lsst.ip.isr.FringeTask.rst | 16 ++++- doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst | 45 ------------ doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst | 23 +++++-- .../tasks/lsst.ip.isr.MaskingTask.rst | 12 +--- .../tasks/lsst.ip.isr.NullCrosstalkTask.rst | 12 +--- .../lsst.ip.isr.OverscanCorrectionTask.rst | 9 +-- .../tasks/lsst.ip.isr.RunIsrTask.rst | 45 ------------ .../tasks/lsst.ip.isr.StrayLightTask.rst | 11 +-- doc/manifest.yaml | 1 + python/lsst/ip/isr/assembleCcdTask.py | 53 +++++++++----- python/lsst/ip/isr/brighterFatterKernel.py | 25 +++++-- python/lsst/ip/isr/calibType.py | 27 +++----- python/lsst/ip/isr/crosstalk.py | 19 ++--- python/lsst/ip/isr/defects.py | 8 +-- python/lsst/ip/isr/fringe.py | 69 ++++++++++++++----- python/lsst/ip/isr/isrFunctions.py | 53 ++++++++------ python/lsst/ip/isr/isrMock.py | 35 +++++++++- python/lsst/ip/isr/isrQa.py | 5 +- python/lsst/ip/isr/isrTask.py | 22 +++--- python/lsst/ip/isr/linearize.py | 12 +++- python/lsst/ip/isr/masking.py | 8 ++- python/lsst/ip/isr/overscan.py | 6 +- python/lsst/ip/isr/photodiode.py | 6 +- python/lsst/ip/isr/photodiodeCorrection.py | 7 +- python/lsst/ip/isr/ptcDataset.py | 13 +++- python/lsst/ip/isr/straylight.py | 6 +- python/lsst/ip/isr/vignette.py | 1 + 32 files changed, 398 insertions(+), 268 deletions(-) delete mode 100644 doc/SConscript create mode 100644 doc/lsst.ip.isr.isrMock/tasks/lsst.ip.isr.IsrMock.rst delete mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst delete mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.RunIsrTask.rst diff --git a/doc/SConscript b/doc/SConscript deleted file mode 100644 index 61b554ade..000000000 --- a/doc/SConscript +++ /dev/null @@ -1,3 +0,0 @@ -# -*- python -*- -from lsst.sconsUtils import scripts -scripts.BasicSConscript.doc() diff --git a/doc/lsst.ip.isr.isrMock/tasks/lsst.ip.isr.IsrMock.rst b/doc/lsst.ip.isr.isrMock/tasks/lsst.ip.isr.IsrMock.rst new file mode 100644 index 000000000..9e49a9544 --- /dev/null +++ b/doc/lsst.ip.isr.isrMock/tasks/lsst.ip.isr.IsrMock.rst @@ -0,0 +1,48 @@ +.. lsst-task-topic:: lsst.ip.isr.IsrMock + +####### +IsrMock +####### + +``IsrMock`` creates a variety of simulated images and calibration products, for use in testing. + +.. _lsst.ip.isr.IsrMock-processing-summary: + +Processing summary +================== + +``IsrMock`` can generate simulated "raw" images (and the associated calibration products needed to correct them) that may contain any or all of the following: + +#. A simulated sky with Poissonian noise. +#. A single Gaussian source. +#. A fringe signal. +#. Flat field correction. +#. Dark current and noise. +#. Bias offset and noise. +#. An overscan with a simple gradient functional form. +#. Crosstalk between amps. + +The output exposure can be returned as a trimmed (overscan and prescan removed) single image, an untrimmed single image, or a dictionary containing each amplifier as a separate image indexed by the amplifier name. This allows testing of the various methods of assembly. + +.. _lsst.ip.isr.IsrMock-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.IsrMock + +.. _lsst.ip.isr.IsrMock-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.IsrMock + +.. _lsst.ip.isr.IsrMock-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.IsrMock + +.. _lsst.ip.isr.IsrMock-debug: diff --git a/doc/lsst.ip.isr/index.rst b/doc/lsst.ip.isr/index.rst index 809a7482e..875afb654 100644 --- a/doc/lsst.ip.isr/index.rst +++ b/doc/lsst.ip.isr/index.rst @@ -7,8 +7,22 @@ lsst.ip.isr ########### The ``lsst.ip.isr`` module provides instrument signature removal (ISR) related tasks. + ISR includes steps such as combining multiple amplifiers into one full CCD image, corrections for overscans, crosstalk, bias and dark frames, and the creation of variance and mask planes. +.. _lsst.ip.isr-using: + +Using lsst.ip.isr +================= + +.. toctree:: + :maxdepth: 1 + +``lsst.ip.isr`` is generally used as the initial step of pipeline processing, performing the initial image processing for ``lsst.drp.pipe``, ``lsst.ap.pipe``, and ``lsst.cp.pipe``. This module also contains the definitions for calibration products that are not just a simple image. The final major component is a set of tasks designed to simulate raw data and calibration products, to allow for the functions and methods to be properly tested with known inputs. + + calibration-types + isrmock-reference + .. _lsst.ip.isr-contributing: Contributing @@ -17,11 +31,30 @@ Contributing ``lsst.ip.isr`` is developed at https://github.com/lsst/ip_isr. You can find Jira issues for this module under the `ip_isr `_ component. -.. _lsst.ip.isr-command-line-taskref: +.. If there are topics related to developing this module (rather than using it), link to this from a toctree placed here. + +.. .. toctree:: +.. :maxdepth: 1 Task reference ============== +.. _lsst.ip.isr-pipeline-tasks: + +Pipeline tasks +-------------- + +.. lsst-pipelinetasks:: + :root: lsst.ip.isr + +.. _lsst.ip.isr-command-line-tasks: + +Command-line tasks +------------------ + +.. lsst-cmdlinetasks:: + :root: lsst.ip.isr + .. _lsst.ip.isr-tasks: Tasks @@ -31,8 +64,19 @@ Tasks :root: lsst.ip.isr :toctree: tasks +.. _lsst.ip.isr-pyapi: + Python API reference ==================== .. automodapi:: lsst.ip.isr :no-main-docstr: + :no-inheritance-diagram: + +.. automodapi:: lsst.ip.isr.ampOffset + :no-main-docstr: + :no-inheritance-diagram: + +.. automodapi:: lsst.ip.isr.vignette + :no-main-docstr: + :no-inheritance-diagram: diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst index c361822d1..aa75e6814 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst @@ -4,7 +4,7 @@ AssembleCcdTask ############### -``AssembleCcdTask`` does +``AssembleCcdTask`` constructs a full detector image from individual segments. The end result can either be untrimmed (all overscan and prescan regions are retained), or trimmed (these sections are removed, producing an image of only the imaging region). .. _lsst.ip.isr.AssembleCcdTask-processing-summary: @@ -13,8 +13,9 @@ Processing summary ``AssembleCcdTask`` runs these operations: -#. -#. +#. The exposure detector is identified, and a loop over each amplifier trims and shifts each segment into the correct location of the assembled exposure. +#. The exposure metadata is filtered to remove keywords that have context in the raw amplifier data, but not in the assembled image. +#. The WCS, filter, and visit info are also transferred from the input exposure to the output. .. _lsst.ip.isr.AssembleCcdTask-api: @@ -43,3 +44,4 @@ Configuration fields Debugging ========= +If the a debug frame for ``assembledExposure`` is ``True`` for ``lsst.ip.isr.assembleCcdTask``, then the final assembled exposure is displayed. diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst index f4745c6f0..6c4a1a841 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst @@ -4,7 +4,7 @@ CrosstalkTask ############# -``CrosstalkTask`` does +``CrosstalkTask`` corrects the effects of crosstalk by subtracting scaled copies of the source amplifier images from the target amplifiers. This task uses the `lsst.ip.isr.CrosstalkCalib` to hold the crosstalk coefficients, as well as a number of the utility functions to ensure that the source and template amplifier images are aligned such that the readout corner is in the same location for both. Both intra- and inter- detector crosstalk signals can be corrected, although the latter that requires all the exposures for all potential source detectors be supplied. .. _lsst.ip.isr.CrosstalkTask-processing-summary: @@ -13,9 +13,9 @@ Processing summary ``CrosstalkTask`` runs these operations: -#. -#. - +#. Iterate over all potential source amplifier and target amplifiers, identifying which have significant crosstalk coefficients. +#. Flip amplifier images to match readout corners, and subtract the scaled version from the target amplifier. +#. Repeat this procedure for any inter-detector crosstalk signals that have supplied exposures. .. _lsst.ip.isr.CrosstalkTask-api: @@ -39,7 +39,3 @@ Configuration fields .. lsst-task-config-fields:: lsst.ip.isr.CrosstalkTask .. _lsst.ip.isr.CrosstalkTask-debug: - -Debugging -========= - diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst index d5288213a..670e91b6c 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst @@ -4,7 +4,7 @@ FringeTask ########## -``FringeTask`` does +``FringeTask`` removes the fringing signal that is evident in long wavelength data. .. _lsst.ip.isr.FringeTask-processing-summary: @@ -13,8 +13,17 @@ Processing summary ``FringeTask`` runs these operations: -#. -#. +#. A background "pedestal" level is optionally subtracted from the input fringes. +#. A large number of random locations on the exposure are identified. +#. At each of those random positions, the local sky level is estimated by taking a heavily (3.0 sigma) clipped median in a box. +#. Those positions are measured similarly on the fringe frame. +#. An iterative clipping least squares process is run to find the best fitting scale factor to minimize + +.. math:: +y = science - scale * fringe + +#. This scaled fringe signal is subtracted from the science image. +#. This process can be repeated if multiple fringe frames exist. .. _lsst.ip.isr.FringeTask-api: @@ -43,3 +52,4 @@ Configuration fields Debugging ========= +Debugging hooks exist to display the exposure and the locations of the random positions, as well as to display the fit between the science and fringe measurements. These are disabled in the code by default. diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst deleted file mode 100644 index 021e9a596..000000000 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrMock.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. lsst-task-topic:: lsst.ip.isr.IsrMock - -####### -IsrMock -####### - -``IsrMock`` does - -.. _lsst.ip.isr.IsrMock-processing-summary: - -Processing summary -================== - -``IsrMock`` runs these operations: - -#. -#. - - -.. _lsst.ip.isr.IsrMock-api: - -Python API summary -================== - -.. lsst-task-api-summary:: lsst.ip.isr.IsrMock - -.. _lsst.ip.isr.IsrMock-subtasks: - -Retargetable subtasks -===================== - -.. lsst-task-config-subtasks:: lsst.ip.isr.IsrMock - -.. _lsst.ip.isr.IsrMock-configs: - -Configuration fields -==================== - -.. lsst-task-config-fields:: lsst.ip.isr.IsrMock - -.. _lsst.ip.isr.IsrMock-debug: - -Debugging -========= - diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst index 045e08203..952662966 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst @@ -4,7 +4,7 @@ IsrTask ####### -``IsrTask`` does +``IsrTask`` performs instrument signal removal (ISR) from raw exposure data. There are many configuration options available to enable and disable the many stages of reduction. This allows for the processing of raw data into full ``postISRCCD`` files for further processing, as well as subsets of that processing to assist in the construction of calibration products. .. _lsst.ip.isr.IsrTask-processing-summary: @@ -13,9 +13,23 @@ Processing summary ``IsrTask`` runs these operations: -#. -#. - +#. Overscan correction using `lsst.ip.isr.OverscanTask`. +#. CCD assembly using `lsst.ip.isr.AssembleCcdTask`. +#. Bias correction using `lsst.ip.isr.isrFunctions.biasCorrection`. +#. Variance plane construction. +#. Linearity correction. +#. Crosstalk correction using `lsst.ip.isr.CrosstalkTask`. +#. Defect masking, NaN masking, saturation trail widening, and any camera specific masking. +#. Brighter-fatter correction using `lsst.ip.isr.isrFunction.brighterFatterCorrection`. +#. Dark correction using `lsst.ip.isr.isrFunctions.darkCorrection`. +#. Fringe correction using `lsst.ip.isr.FringeTask`. +#. Straylight correction using `lsst.ip.isr.StrayLightTask`. +#. Flat correction using `lsst.ip.isr.isrFunctions.flatCorrection`, or gain scaling using `lsst.ip.isr.isrFunctions.applyGains`. +#. Vignette polygon construction and masking using `lsst.ip.isr.VignetteTask`. +#. Attaching transmission curves using `lsst.ip.isr.isrFunctions.attachTransmissionCurve`. +#. Illumination correction using `lsst.ip.isr.isrFunctions.illuminationCorrection`. +#. Interpolation over masked pixels using `lsst.ip.isr.isrFunctions.interpolateFromMask`. +#. Amp-to-amp offset correction using `lsst.ip.isr.AmpOffsetTask`. .. _lsst.ip.isr.IsrTask-api: @@ -43,3 +57,4 @@ Configuration fields Debugging ========= +Debug break points exist after a number of the major steps, allowing the exposure processed to that level to be displayed. Each of these break points are named after the most recent step completed, and include ``doBias``, ``doCrosstalk``, ``doAssembleCcd``, ``doBrighterFatter``, ``doDark``, ``doFringe``, ``doStrayLight``, ``doFlat``, and ``postISRCCD``. diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst index 2dc8710a7..22a577f21 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst @@ -4,18 +4,14 @@ MaskingTask ########### -``MaskingTask`` does +``MaskingTask`` is a placeholder method. It is intended to perform additional masking that is separate from any defects or saturated pixels. .. _lsst.ip.isr.MaskingTask-processing-summary: Processing summary ================== -``MaskingTask`` runs these operations: - -#. -#. - +``MaskingTask`` must be implemented by a camera-specific class. .. _lsst.ip.isr.MaskingTask-api: @@ -39,7 +35,3 @@ Configuration fields .. lsst-task-config-fields:: lsst.ip.isr.MaskingTask .. _lsst.ip.isr.MaskingTask-debug: - -Debugging -========= - diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst index 03bc239f4..58cc1bd64 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst @@ -4,18 +4,14 @@ NullCrosstalkTask ################# -``NullCrosstalkTask`` does +``NullCrosstalkTask`` is a dummy function that accepts the same inputs as the `lsst.ip.isr.CrosstalkTask` task, but performs no crosstalk subtraction. .. _lsst.ip.isr.NullCrosstalkTask-processing-summary: Processing summary ================== -``NullCrosstalkTask`` runs these operations: - -#. -#. - +``NullCrosstalkTask`` runs no operations. .. _lsst.ip.isr.NullCrosstalkTask-api: @@ -39,7 +35,3 @@ Configuration fields .. lsst-task-config-fields:: lsst.ip.isr.NullCrosstalkTask .. _lsst.ip.isr.NullCrosstalkTask-debug: - -Debugging -========= - diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst index c4fbffadd..7259473b2 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst @@ -4,7 +4,7 @@ OverscanCorrectionTask ###################### -``OverscanCorrectionTask`` does +``OverscanCorrectionTask`` calculates and subtracts the overscan from the input exposure. .. _lsst.ip.isr.OverscanCorrectionTask-processing-summary: @@ -13,9 +13,9 @@ Processing summary ``OverscanCorrectionTask`` runs these operations: -#. -#. - +#. Fits the overscan, either as a single constant value (for the 'MEAN', 'MEANCLIP', and 'MEDIAN' methods) or as a per-row vector (for the 'MEDIAN_PER_ROW', polynomial, and spline methods). +#. Subtracts that model from both the image and overscan arrays, +#. Optionally masks suspect pixels. .. _lsst.ip.isr.OverscanCorrectionTask-api: @@ -43,3 +43,4 @@ Configuration fields Debugging ========= +If ``debug.display`` is true for ``lsst.ip.isr.overscan``, then per-amplifier plots of the data values and the overscan model are shown for evaluation. diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.RunIsrTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.RunIsrTask.rst deleted file mode 100644 index e16f75779..000000000 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.RunIsrTask.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. lsst-task-topic:: lsst.ip.isr.RunIsrTask - -########## -RunIsrTask -########## - -``RunIsrTask`` does - -.. _lsst.ip.isr.RunIsrTask-processing-summary: - -Processing summary -================== - -``RunIsrTask`` runs these operations: - -#. -#. - - -.. _lsst.ip.isr.RunIsrTask-api: - -Python API summary -================== - -.. lsst-task-api-summary:: lsst.ip.isr.RunIsrTask - -.. _lsst.ip.isr.RunIsrTask-subtasks: - -Retargetable subtasks -===================== - -.. lsst-task-config-subtasks:: lsst.ip.isr.RunIsrTask - -.. _lsst.ip.isr.RunIsrTask-configs: - -Configuration fields -==================== - -.. lsst-task-config-fields:: lsst.ip.isr.RunIsrTask - -.. _lsst.ip.isr.RunIsrTask-debug: - -Debugging -========= - diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst index 69482a708..3680b846f 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst @@ -4,17 +4,14 @@ StrayLightTask ############## -``StrayLightTask`` does +``StrayLightTask`` applies a stray light correction to the input exposure. .. _lsst.ip.isr.StrayLightTask-processing-summary: Processing summary ================== -``StrayLightTask`` runs these operations: - -#. -#. +``StrayLightTask`` is a placeholder task, as the particular type of correction must be implemented by a camera specific class. .. _lsst.ip.isr.StrayLightTask-api: @@ -39,7 +36,3 @@ Configuration fields .. lsst-task-config-fields:: lsst.ip.isr.StrayLightTask .. _lsst.ip.isr.StrayLightTask-debug: - -Debugging -========= - diff --git a/doc/manifest.yaml b/doc/manifest.yaml index c53c7c4d5..0940aee77 100644 --- a/doc/manifest.yaml +++ b/doc/manifest.yaml @@ -4,3 +4,4 @@ # For each module there is a corresponding module doc subdirectory. modules: - "lsst.ip.isr" + - "lsst.ip.isr.isrMock" diff --git a/python/lsst/ip/isr/assembleCcdTask.py b/python/lsst/ip/isr/assembleCcdTask.py index f9b9d37fe..68a844072 100644 --- a/python/lsst/ip/isr/assembleCcdTask.py +++ b/python/lsst/ip/isr/assembleCcdTask.py @@ -47,10 +47,31 @@ class AssembleCcdTask(pipeBase.Task): """Assemble a set of amplifier images into a full detector size set of pixels. - The keys for removal specified in - `lsst.ip.isr.AssembleCcdConfig.keysToRemove` are added to a default set: - ('DATASEC', 'BIASSEC', 'TRIMSEC', 'GAIN'). + This task assembles sections of an image into a larger mosaic. + The sub-sections are typically amplifier sections and are to be + assembled into a detector size pixel grid. The assembly is driven + by the entries in the raw amp information. The task can be + configured to return a detector image with non-data + (e.g. overscan) pixels included. The task can also renormalize + the pixel values to a nominal gain of 1. The task also removes + exposure metadata that has context in raw amps, but not in trimmed + detectors. This includes the set ('DATASEC', 'BIASSEC', + 'TRIMSEC', 'GAIN'), as well as any other keys specificied in the + task config.. + + Parameters + ---------- + **kwargs : Any + Keyword parameters. + + Notes + ----- + + Debug plotting of the assembled image can be enabled by setting + the ``assembledExposure`` keyword in the lsstDebug `debug.display` + dictionary to True. """ + ConfigClass = AssembleCcdConfig _DefaultName = "assembleCcd" @@ -60,28 +81,29 @@ def __init__(self, **kwargs): self.allKeysToRemove = ('DATASEC', 'BIASSEC', 'TRIMSEC', 'GAIN') + tuple(self.config.keysToRemove) def assembleCcd(self, assembleInput): - """Assemble a set of amps into a single CCD size image. + """Assemble a set of amps into a single CCD size image Parameters ---------- - assembleInput : `dict` [`str`, `lsst.afw.image.Exposure`] or \ - `lsst.afw.image.Exposure` - Either a dictionary of amp exposures, or a single exposure - containing all raw amps. If a dictionary of amp exposures, the key - should be the amp name. + assembleInput : `lsst.afw.image.Exposure` or `dict` + If an `~lsst.afw.image.Exposure` is passed, it is assumed + to contain all the raw amps as regions within that + exposure. If the input is a `dict`, then the keys are the + amplifier names, and the values are + `~lsst.afw.image.Exposure` entries containing the data for + that amplifier Returns ------- - assembledCcd : `lsst.afw.image.Exposure` - An exposure of the assembled amp sections. + outExposure : `lsst.afw.image.Exposure` + The assembled exposure. Raises ------ TypeError - Raised if the input exposures to be assembled do not adhere to the - required format. + Raised if the input is not an `lsst.afw.image.Exposure` or a `dict`. RuntimeError - Raised if the detector set on the input exposure is not set. + Raised if no input detector can be identified. """ ccd = None if isinstance(assembleInput, dict): @@ -120,12 +142,11 @@ def getNextExposure(amp): for amp in ccd: inMI = getNextExposure(amp).getMaskedImage() assemble(outMI, inMI, amp) - # + # If we are returning an "untrimmed" image (with overscans and # extended register) we need to update the ampInfo table in the # Detector as we've moved the amp images into # place in a single Detector image - # if not self.config.doTrim: ccd = cameraGeom.makeUpdatedDetector(ccd) diff --git a/python/lsst/ip/isr/brighterFatterKernel.py b/python/lsst/ip/isr/brighterFatterKernel.py index 01c602fbc..e687773ba 100644 --- a/python/lsst/ip/isr/brighterFatterKernel.py +++ b/python/lsst/ip/isr/brighterFatterKernel.py @@ -50,11 +50,9 @@ class BrighterFatterKernel(IsrCalib): ---------- camera : `lsst.afw.cameraGeom.Camera` Camera describing detector geometry. - level : `str` + level : `str`, optional Level the kernels will be generated for. - log : `logging.Logger`, optional - Log to write messages to. - **kwargs : + **kwargs : Any Parameters to pass to parent constructor. Notes @@ -95,6 +93,7 @@ class BrighterFatterKernel(IsrCalib): detKernels : `dict` Dictionary keyed by detector names containing the BF kernels. """ + _OBSTYPE = 'bfk' _SCHEMA = 'Brighter-fatter kernel' _VERSION = 1.1 @@ -140,7 +139,7 @@ def updateMetadata(self, setDate=False, **kwargs): setDate : `bool`, optional Update the CALIBDATE fields in the metadata to the current time. Defaults to False. - kwargs : + kwargs : Any Other keyword parameters to set in the metadata. """ kwargs['LEVEL'] = self.level @@ -454,7 +453,6 @@ def toTable(self): tableList : `list` [`lsst.afw.table.Table`] List of tables containing the crosstalk calibration information. - """ tableList = [] self.updateMetadata() @@ -575,4 +573,17 @@ def makeDetectorKernelFromAmpwiseKernels(self, detectorName, ampsToExclude=[]): self.detKernels[detectorName] = avgKernel def replaceDetectorKernelWithAmpKernel(self, ampName, detectorName): - self.detKernel[detectorName] = self.ampKernel[ampName] + """Create a detector level kernel by promoting an amplifier level + kernel. + + Parameters + ---------- + ampName : `str` + Amplifier name used as an index in the calibration + ``ampKernel` dictionary that will be promoted. + detectorName : `str` + Name of the detector to build a kernel for. This supplies + the key that the new kernel will be indexed in the + calibration ``detKernels`` dictionary. + """ + self.detKernels[detectorName] = self.ampKernel[ampName] diff --git a/python/lsst/ip/isr/calibType.py b/python/lsst/ip/isr/calibType.py index 9a92a5195..721f2d375 100644 --- a/python/lsst/ip/isr/calibType.py +++ b/python/lsst/ip/isr/calibType.py @@ -58,7 +58,10 @@ class IsrCalib(abc.ABC): Detector to extract metadata from. log : `logging.Logger`, optional Log for messages. + kwargs : Any + Additional parameters that will be added to the metadata. """ + _OBSTYPE = "generic" _SCHEMA = "NO SCHEMA" _VERSION = 0 @@ -180,7 +183,7 @@ def setMetadata(self, metadata): Parameters ---------- - metadata : `lsst.daf.base.PropertyList` + metadata : `dict` or `lsst.daf.base.PropertyList` Metadata to associate with the calibration. Will be copied and overwrite existing metadata. """ @@ -241,11 +244,7 @@ def updateMetadata(self, camera=None, detector=None, filterName=None, (self._raftName, self._slotName) = self._detectorName.split("_") if filterName: - # TOD0 DM-28093: I think this whole comment can go away, if we - # always use physicalLabel everywhere in ip_isr. - # If set via: - # exposure.getInfo().getFilter().getName() - # then this will hold the abstract filter. + # These should always be physical_filter names. self._filter = filterName if setDate: @@ -330,7 +329,6 @@ def calibInfoFromDict(self, dictionary): RuntimeError Raised if the dictionary does not match the expected OBSTYPE. """ - def search(haystack, needles): """Search dictionary 'haystack' for an entry in 'needles' """ @@ -440,7 +438,7 @@ def writeText(self, filename, format="auto"): ---------- filename : `str` Name of the file to write. - format : `str` + format : `str`, optional Format to write the file as. Supported values are: ``"auto"`` : Determine filetype from filename. ``"yaml"`` : Write as yaml. @@ -697,20 +695,15 @@ class IsrProvenance(IsrCalib): Parameters ---------- - instrument : `str`, optional - Name of the instrument the data was taken with. calibType : `str`, optional Type of calibration this provenance was generated for. - detectorName : `str`, optional - Name of the detector this calibration is for. - detectorSerial : `str`, optional - Identifier for the detector. - + kwargs : Any + Additional parameters passed to the parent class. """ + _OBSTYPE = "IsrProvenance" - def __init__(self, calibType="unknown", - **kwargs): + def __init__(self, calibType="unknown", **kwargs): self.calibType = calibType self.dimensions = set() self.dataIdList = list() diff --git a/python/lsst/ip/isr/crosstalk.py b/python/lsst/ip/isr/crosstalk.py index 2b51ae850..5fe626b87 100644 --- a/python/lsst/ip/isr/crosstalk.py +++ b/python/lsst/ip/isr/crosstalk.py @@ -97,6 +97,7 @@ class CrosstalkCalib(IsrCalib): of the numerator and denominator of the source and target signals, with "adu" meaning "ADU / ADU" and "electron" meaning "e- / e-". """ + _OBSTYPE = 'CROSSTALK' _SCHEMA = 'Gen3 Crosstalk' _VERSION = 1.1 @@ -176,7 +177,6 @@ def fromDetector(self, detector, coeffVector=None, coeffSqrVector=None): ------- calib : `lsst.ip.isr.CrosstalkCalib` The calibration constructed from the detector. - """ self._detectorId = detector.getId() self._detectorName = detector.getName() @@ -219,8 +219,6 @@ def fromDetector(self, detector, coeffVector=None, coeffSqrVector=None): def fromDict(cls, dictionary): """Construct a calibration from a dictionary of properties. - Must be implemented by the specific calibration subclasses. - Parameters ---------- dictionary : `dict` @@ -387,7 +385,6 @@ def fromTable(cls, tableList): ------- calib : `lsst.ip.isr.CrosstalkCalib` The calibration defined in the tables. - """ coeffTable = tableList[0] @@ -435,7 +432,6 @@ def toTable(self): tableList : `list` [`lsst.afw.table.Table`] List of tables containing the crosstalk calibration information. - """ tableList = [] self.updateMetadata() @@ -447,6 +443,7 @@ def toTable(self): 'CT_ERRORS_SQR': self.coeffErrSqr.reshape(self.nAmp*self.nAmp), 'CT_AMP_GAIN_RATIOS': self.ampGainRatios.reshape(self.nAmp*self.nAmp), }]) + # filter None, because astropy can't deal. inMeta = self.getMetadata().toDict() outMeta = {k: v for k, v in inMeta.items() if v is not None} @@ -527,8 +524,9 @@ def calculateBackground(mi, badPixels=["BAD"]): ---------- mi : `lsst.afw.image.MaskedImage` MaskedImage for which to measure background. - badPixels : `list` of `str` + badPixels : `list` [`str`], optional Mask planes to ignore. + Returns ------- bg : `float` @@ -569,7 +567,7 @@ def subtractCrosstalk(self, thisExposure, sourceExposure=None, crosstalkCoeffs=N Coefficients to use to correct crosstalk. crosstalkCoeffsSqr : `numpy.ndarray`, optional. Quadratic coefficients to use to correct crosstalk. - badPixels : `list` of `str`, optional + badPixels : `list` [`str`], optional Mask planes to ignore. minPixelToMask : `float`, optional Minimum pixel value (relative to the background level) in @@ -745,6 +743,7 @@ def subtractCrosstalk(self, thisExposure, sourceExposure=None, crosstalkCoeffs=N class CrosstalkConfig(Config): """Configuration for intra-detector crosstalk removal.""" + minPixelToMask = Field( dtype=float, doc="Set crosstalk mask plane for pixels over this value.", @@ -795,7 +794,7 @@ def getCrosstalk(self, detector=None): Parameters ---------- - detector : `lsst.afw.cameraGeom.detector` + detector : `lsst.afw.cameraGeom.detector`, optional Detector that is to be crosstalk corrected. Returns @@ -828,7 +827,7 @@ def hasCrosstalk(self, detector=None): Parameters ---------- - detector : `lsst.afw.cameraGeom.detector` + detector : `lsst.afw.cameraGeom.detector`, optional Detector that is to be crosstalk corrected. Returns @@ -847,6 +846,7 @@ def hasCrosstalk(self, detector=None): class CrosstalkTask(Task): """Apply intra-detector crosstalk correction.""" + ConfigClass = CrosstalkConfig _DefaultName = 'isrCrosstalk' @@ -1026,5 +1026,6 @@ def run( class NullCrosstalkTask(CrosstalkTask): + def run(self, exposure, crosstalkSources=None): self.log.info("Not performing any crosstalk correction") diff --git a/python/lsst/ip/isr/defects.py b/python/lsst/ip/isr/defects.py index bebed0381..e51618e7d 100644 --- a/python/lsst/ip/isr/defects.py +++ b/python/lsst/ip/isr/defects.py @@ -75,7 +75,6 @@ class Defects(IsrCalib): The collection of Defect objects. """ - """The calibration type used for ingest.""" _OBSTYPE = "defects" _SCHEMA = '' _VERSION = 2.0 @@ -265,7 +264,7 @@ def maskPixels(self, mask, maskName="BAD"): ---------- maskedImage : `lsst.afw.image.MaskedImage` or `lsst.afw.image.Mask` Image to process. Only the mask plane is updated. - maskName : str, optional + maskName : `str`, optional Mask plane name to use. """ # mask bad pixels @@ -490,12 +489,12 @@ def _get_values(values, n=1): ---------- values : `numbers.Number` or `list` or `np.array` Input values. - n : `int` + n : `int`, optional Number of values to retrieve. Returns ------- - vals : `list` or `np.array` or `numbers.Number` + values : `list` or `np.array` or `numbers.Number` Single value from supplied list if ``n`` is 1, or `list` containing first ``n`` values from supplied values. @@ -619,7 +618,6 @@ def readLsstDefectsFile(cls, filename, normalize_on_init=False): ---------- filename : `str` Name of text file containing the defect information. - normalize_on_init : `bool`, optional If `True`, normalization is applied to the defects listed in the table to remove duplicates, eliminate overlaps, etc. Otherwise diff --git a/python/lsst/ip/isr/fringe.py b/python/lsst/ip/isr/fringe.py index 6d0460705..20feb7423 100644 --- a/python/lsst/ip/isr/fringe.py +++ b/python/lsst/ip/isr/fringe.py @@ -33,6 +33,10 @@ from lsst.utils.timer import timeMethod from .isrFunctions import checkFilter + +__all__ = ['FringeStatisticsConfig', 'FringeConfig', 'FringeTask'] + + afwDisplay.setDefaultMaskTransparency(75) @@ -47,6 +51,7 @@ def getFrame(): class FringeStatisticsConfig(Config): """Options for measuring fringes on an exposure""" + badMaskPlanes = ListField(dtype=str, default=["SAT"], doc="Ignore pixels with these masks") stat = Field(dtype=int, default=int(afwMath.MEDIAN), doc="Statistic to use") clip = Field(dtype=float, default=3.0, doc="Sigma clip threshold") @@ -57,9 +62,9 @@ class FringeStatisticsConfig(Config): class FringeConfig(Config): """Fringe subtraction options""" - # TODO DM-28093: change the doc to specify that these are physical labels + + # These are always physical_filter names. filters = ListField(dtype=str, default=[], doc="Only fringe-subtract these filters") - # TODO: remove in DM-27177 useFilterAliases = Field(dtype=bool, default=False, doc="Search filter aliases during check.", deprecated=("Removed with no replacement (FilterLabel has no aliases)." "Will be removed after v22.")) @@ -73,12 +78,13 @@ class FringeConfig(Config): class FringeTask(Task): - """Task to remove fringes from a science exposure + """Task to remove fringes from a science exposure. We measure fringe amplitudes at random positions on the science exposure and at the same positions on the (potentially multiple) fringe frames and solve for the scales simultaneously. """ + ConfigClass = FringeConfig _DefaultName = 'isrFringe' @@ -454,14 +460,25 @@ def subtract(self, science, fringes, solution): def measure(mi, x, y, size, statistic, stats): - """Measure a statistic within an aperture - - @param mi MaskedImage to measure - @param x, y Center for aperture - @param size Size of aperture - @param statistic Statistic to measure - @param stats StatisticsControl object - @return Value of statistic within aperture + """Measure a statistic within an aperture. + + Parameters + ---------- + mi : `lsst.afw.image.MaskedImage` + MaskedImage to measure. + x, y : `int` + Center for the aperture. + size : `int` + Size of the aperture. + statistic : `str` + Name of the statistic to measure. + stats : `lsst.afw.math.StatisticsControl` + Control object for the measurement. + + Returns + ------- + value : `float` + Measured value. """ bbox = lsst.geom.Box2I(lsst.geom.Point2I(int(x) - size, int(y - size)), lsst.geom.Extent2I(2*size, 2*size)) @@ -470,19 +487,37 @@ def measure(mi, x, y, size, statistic, stats): def stdev(vector): - """Calculate a robust standard deviation of an array of values + """Calculate a robust standard deviation of an array of values. - @param vector Array of values - @return Standard deviation + Parameters + ---------- + vector : `list` or `numpy.array`, (N,) + Values to find the dispersion of. + + Returns + ------- + value : `float` + Robust standard deviation. """ q1, q3 = numpy.percentile(vector, (25, 75)) return 0.74*(q3 - q1) def select(vector, clip): - """Select values within 'clip' standard deviations of the median - - Returns a boolean array. + """Select values within 'clip' standard deviations of the median. + + Parameters + ---------- + vector : `list` or `numpy.array`, (N,) + Values to find the dispersion of. + clip : `float` + Number of sigma to use for rejecting values. + + Returns + ------- + mask : `numpy.array` [`bool`], (N,) + If True, than that element is within ``clip`` sigma of the + median. """ q1, q2, q3 = numpy.percentile(vector, (25, 50, 75)) return numpy.abs(vector - q2) < clip*0.74*(q3 - q1) diff --git a/python/lsst/ip/isr/isrFunctions.py b/python/lsst/ip/isr/isrFunctions.py index 9ed4777c8..cbc67f38e 100644 --- a/python/lsst/ip/isr/isrFunctions.py +++ b/python/lsst/ip/isr/isrFunctions.py @@ -116,6 +116,11 @@ def interpolateDefectList(maskedImage, defectList, fwhm, fallbackValue=None): Fallback value if an interpolated value cannot be determined. If None, then the clipped mean of the image is used. + Returns + ------- + maskedImage : `lsst.afw.image.MaskedImage` + Input image with the defects interpolated. + Notes ----- The ``fwhm`` parameter is used to create a PSF, but the underlying @@ -173,11 +178,11 @@ def growMasks(mask, radius=0, maskNameList=['BAD'], maskValue="BAD"): ---------- mask : `lsst.afw.image.Mask` Mask image to process. - radius : scalar + radius : scalar, optional Amount to grow the mask. - maskNameList : `str` or `list` [`str`] + maskNameList : `str` or `list` [`str`], optional Mask names that should be grown. - maskValue : `str` + maskValue : `str`, optional Mask plane to assign the newly masked pixels to. """ if radius > 0: @@ -204,6 +209,11 @@ def interpolateFromMask(maskedImage, fwhm, growSaturatedFootprints=1, fallbackValue : scalar, optional Value of last resort for interpolation. + Returns + ------- + maskedImage : `lsst.afw.image.MaskedImage` + Defect-interpolated image. + Notes ----- The ``fwhm`` parameter is used to create a PSF, but the underlying @@ -248,6 +258,11 @@ def saturationCorrection(maskedImage, saturation, fwhm, growFootprints=1, interp fallbackValue : scalar, optional Value of last resort for interpolation. + Returns + ------- + maskedImage : `lsst.afw.image.MaskedImage` + Saturation masked, and possibly interpolated image. + Notes ----- The ``fwhm`` parameter is used to create a PSF, but the underlying @@ -323,7 +338,7 @@ def biasCorrection(maskedImage, biasMaskedImage, trimToFit=False): Image to process. The image is modified by this method. biasMaskedImage : `lsst.afw.image.MaskedImage` Bias image of the same size as ``maskedImage`` - trimToFit : `Bool`, optional + trimToFit : `bool`, optional If True, raw data is symmetrically trimmed to match calibration size. @@ -332,7 +347,6 @@ def biasCorrection(maskedImage, biasMaskedImage, trimToFit=False): RuntimeError Raised if ``maskedImage`` and ``biasMaskedImage`` do not have the same size. - """ if trimToFit: maskedImage = trimToMatchCalibBBox(maskedImage, biasMaskedImage) @@ -356,9 +370,9 @@ def darkCorrection(maskedImage, darkMaskedImage, expScale, darkScale, invert=Fal Dark exposure time for ``maskedImage``. darkScale : scalar Dark exposure time for ``darkMaskedImage``. - invert : `Bool`, optional + invert : `bool`, optional If True, re-add the dark to an already corrected image. - trimToFit : `Bool`, optional + trimToFit : `bool`, optional If True, raw data is symmetrically trimmed to match calibration size. @@ -414,14 +428,14 @@ def flatCorrection(maskedImage, flatMaskedImage, scalingType, userScale=1.0, inv Image to process. The image is modified. flatMaskedImage : `lsst.afw.image.MaskedImage` Flat image of the same size as ``maskedImage`` - scalingType : str + scalingType : `str` Flat scale computation method. Allowed values are 'MEAN', 'MEDIAN', or 'USER'. userScale : scalar, optional Scale to use if ``scalingType='USER'``. - invert : `Bool`, optional + invert : `bool`, optional If True, unflatten an already flattened image. - trimToFit : `Bool`, optional + trimToFit : `bool`, optional If True, raw data is symmetrically trimmed to match calibration size. @@ -467,7 +481,7 @@ def illuminationCorrection(maskedImage, illumMaskedImage, illumScale, trimToFit= Illumination correction image of the same size as ``maskedImage``. illumScale : scalar Scale factor for the illumination correction. - trimToFit : `Bool`, optional + trimToFit : `bool`, optional If True, raw data is symmetrically trimmed to match calibration size. @@ -502,10 +516,10 @@ def brighterFatterCorrection(exposure, kernel, maxIter, threshold, applyGain, ga threshold : scalar Convergence threshold in terms of the sum of absolute deviations between an iteration and the previous one. - applyGain : `Bool` + applyGain : `bool` If True, then the exposure values are scaled by the gain prior to correction. - gains : `dict` [`str`, `float`] + gains : `dict` [`str`, `float`], optional A dictionary, keyed by amplifier name, of the gains to use. If gains is None, the nominal gains in the amplifier object are used. @@ -550,7 +564,6 @@ def brighterFatterCorrection(exposure, kernel, maxIter, threshold, applyGain, ga # The image needs to be units of electrons/holes with gainContext(exposure, image, applyGain, gains): - kLx = numpy.shape(kernel)[0] kLy = numpy.shape(kernel)[1] kernelImage = afwImage.ImageD(kLx, kLy) @@ -577,7 +590,6 @@ def brighterFatterCorrection(exposure, kernel, maxIter, threshold, applyGain, ga endY = -kLy//2 for iteration in range(maxIter): - afwMath.convolve(outImage, tempImage, fixedKernel, convCntrl) tmpArray = tempImage.getArray() outArray = outImage.getArray() @@ -920,16 +932,16 @@ def attachTransmissionCurve(exposure, opticsTransmission=None, filterTransmissio ``TransmissionCurves`` in post-assembly trimmed detector coordinates. Must have a valid ``Detector`` attached that matches the detector associated with sensorTransmission. - opticsTransmission : `lsst.afw.image.TransmissionCurve` + opticsTransmission : `lsst.afw.image.TransmissionCurve`, optional A ``TransmissionCurve`` that represents the throughput of the optics, to be evaluated in focal-plane coordinates. - filterTransmission : `lsst.afw.image.TransmissionCurve` + filterTransmission : `lsst.afw.image.TransmissionCurve`, optional A ``TransmissionCurve`` that represents the throughput of the filter itself, to be evaluated in focal-plane coordinates. - sensorTransmission : `lsst.afw.image.TransmissionCurve` + sensorTransmission : `lsst.afw.image.TransmissionCurve`, optional A ``TransmissionCurve`` that represents the throughput of the sensor itself, to be evaluated in post-assembly trimmed detector coordinates. - atmosphereTransmission : `lsst.afw.image.TransmissionCurve` + atmosphereTransmission : `lsst.afw.image.TransmissionCurve`, optional A ``TransmissionCurve`` that represents the throughput of the atmosphere, assumed to be spatially constant. @@ -967,7 +979,7 @@ def applyGains(exposure, normalizeGains=False, ptcGains=None, isTrimmed=True): ---------- exposure : `lsst.afw.image.Exposure` Exposure to process. The image is modified. - normalizeGains : `Bool`, optional + normalizeGains : `bool`, optional If True, then amplifiers are scaled to force the median of each amplifier to equal the median of those medians. ptcGains : `dict`[`str`], optional @@ -1012,7 +1024,6 @@ def widenSaturationTrails(mask): mask : `lsst.afw.image.Mask` Mask which will have the saturated areas grown. """ - extraGrowDict = {} for i in range(1, 6): extraGrowDict[i] = 0 diff --git a/python/lsst/ip/isr/isrMock.py b/python/lsst/ip/isr/isrMock.py index 0f5412fda..c733c56f4 100644 --- a/python/lsst/ip/isr/isrMock.py +++ b/python/lsst/ip/isr/isrMock.py @@ -51,6 +51,7 @@ class IsrMockConfig(pexConfig.Config): signals are combined to create real data. The camera used is the test camera defined by the afwUtils code. """ + # Detector parameters. "Exposure" parameters. isLsstLike = pexConfig.Field( dtype=bool, @@ -270,6 +271,7 @@ class IsrMock(pipeBase.Task): `lsst.afw.cameraGeom.testUtils` to avoid making the test data dependent on any of the actual obs package formats. """ + ConfigClass = IsrMockConfig _DefaultName = "isrMock" @@ -818,7 +820,7 @@ def amplifierAddFringe(self, amp, ampData, scale, x0=100, y0=0): Parameters ---------- - amp : `~lsst.afw.ampInfo.AmpInfoRecord` + amp : `~lsst.afw.cameraGeom.Amplifier` Amplifier to operate on. Needed for amp<->exp coordinate transforms. ampData : `lsst.afw.image.ImageF` @@ -850,7 +852,7 @@ def amplifierMultiplyFlat(self, amp, ampData, fracDrop, u0=100.0, v0=100.0): Parameters ---------- - amp : `lsst.afw.ampInfo.AmpInfoRecord` + amp : `lsst.afw.cameraGeom.Amplifier` Amplifier to operate on. Needed for amp<->exp coordinate transforms. ampData : `lsst.afw.image.ImageF` @@ -884,6 +886,7 @@ def amplifierMultiplyFlat(self, amp, ampData, fracDrop, u0=100.0, v0=100.0): class RawMock(IsrMock): """Generate a raw exposure suitable for ISR. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.isTrimmed = False @@ -900,6 +903,7 @@ def __init__(self, **kwargs): class TrimmedRawMock(RawMock): """Generate a trimmed raw exposure. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.isTrimmed = True @@ -909,6 +913,7 @@ def __init__(self, **kwargs): class CalibratedRawMock(RawMock): """Generate a trimmed raw exposure. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.isTrimmed = True @@ -930,6 +935,7 @@ def __init__(self, **kwargs): class RawDictMock(RawMock): """Generate a raw exposure dict suitable for ISR. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.doGenerateAmpDict = True @@ -938,6 +944,7 @@ def __init__(self, **kwargs): class MasterMock(IsrMock): """Parent class for those that make master calibrations. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.isTrimmed = True @@ -956,6 +963,7 @@ def __init__(self, **kwargs): class BiasMock(MasterMock): """Simulated master bias calibration. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.doAddBias = True @@ -965,6 +973,7 @@ def __init__(self, **kwargs): class DarkMock(MasterMock): """Simulated master dark calibration. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.doAddDark = True @@ -982,6 +991,7 @@ def __init__(self, **kwargs): class FringeMock(MasterMock): """Simulated master fringe calibration. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.doAddFringe = True @@ -990,6 +1000,7 @@ def __init__(self, **kwargs): class UntrimmedFringeMock(FringeMock): """Simulated untrimmed master fringe calibration. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.isTrimmed = False @@ -998,6 +1009,7 @@ def __init__(self, **kwargs): class BfKernelMock(IsrMock): """Simulated brighter-fatter kernel. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.doGenerateImage = False @@ -1024,6 +1036,7 @@ def __init__(self, **kwargs): class CrosstalkCoeffMock(IsrMock): """Simulated crosstalk coefficient matrix. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.doGenerateImage = False @@ -1037,6 +1050,7 @@ def __init__(self, **kwargs): class TransmissionMock(IsrMock): """Simulated transmission curve. """ + def __init__(self, **kwargs): super().__init__(**kwargs) self.config.doGenerateImage = False @@ -1049,7 +1063,17 @@ def __init__(self, **kwargs): class MockDataContainer(object): """Container for holding ISR mock objects. + + Currently only supports get and put operations, which are most + likely to be called for data in ISR processing. + + Parameters + ---------- + kwargs : Any + If ``config`` is a key, it is used to define the mock + configuration. """ + dataId = "isrMock Fake Data" darkval = 2. # electron/sec oscan = 250. # adu @@ -1131,7 +1155,14 @@ def get(self, dataType, **kwargs): class MockFringeContainer(object): """Container for mock fringe data. + + Parameters + ---------- + kwargs : Any + If ``config`` is a key, it is used to define the mock + configuration. """ + dataId = "isrMock Fake Data" darkval = 2. # electron/sec oscan = 250. # adu diff --git a/python/lsst/ip/isr/isrQa.py b/python/lsst/ip/isr/isrQa.py index cd96b0662..1c0fd34a9 100644 --- a/python/lsst/ip/isr/isrQa.py +++ b/python/lsst/ip/isr/isrQa.py @@ -27,6 +27,9 @@ import lsst.pex.config as pexConfig +__all__ = ['IsrQaFlatnessConfig', 'IsrQaConfig', 'makeThumbnail'] + + class IsrQaFlatnessConfig(pexConfig.Config): meshX = pexConfig.Field( dtype=int, @@ -127,7 +130,7 @@ def makeThumbnail(exposure, isrQaConfig=None): ---------- exposure : `lsst.afw.image.Exposure` The exposure to be converted into a thumbnail. - isrQaConfig : `Config` + isrQaConfig : `Config`, optional Configuration object containing all parameters to control the thumbnail generation. diff --git a/python/lsst/ip/isr/isrTask.py b/python/lsst/ip/isr/isrTask.py index 697b1bdbe..b37d8a6d4 100644 --- a/python/lsst/ip/isr/isrTask.py +++ b/python/lsst/ip/isr/isrTask.py @@ -1000,7 +1000,7 @@ class IsrTask(pipeBase.PipelineTask): Parameters ---------- - args : `list` + args : `list`, optional Positional arguments passed to the Task constructor. None used at this time. kwargs : `dict`, optional @@ -1266,6 +1266,8 @@ def run(self, ccdExposure, *, camera=None, bias=None, linearizer=None, correction. If `None`, no correction will be performed. illumMaskedImage : `lsst.afw.image.MaskedImage`, optional Illumination correction image. + isGen3 : `bool`, optional + Flag this call to run() as using the Gen3 butler environment. Returns ------- @@ -1314,7 +1316,6 @@ def run(self, ccdExposure, *, camera=None, bias=None, linearizer=None, In addition, setting the ``postISRCCD`` entry displays the exposure after all ISR processing has finished. """ - ccdExposure = self.ensureExposure(ccdExposure, camera, detectorNum) bias = self.ensureExposure(bias, camera, detectorNum) dark = self.ensureExposure(dark, camera, detectorNum) @@ -2050,7 +2051,6 @@ def convertIntToFloat(self, exposure): ------ RuntimeError Raised if the exposure type cannot be converted to float. - """ if isinstance(exposure, afwImage.ExposureF): # Nothing to be done @@ -2081,10 +2081,9 @@ def maskAmplifier(self, ccdExposure, amp, defects): Returns ------- - badAmp : `Bool` + badAmp : `bool` If this is true, the entire amplifier area is covered by defects and unusable. - """ maskedImage = ccdExposure.getMaskedImage() @@ -2183,11 +2182,6 @@ def overscanCorrection(self, ccdExposure, amp): Clipped standard deviation of the overscan after correction. (`float`) - Raises - ------ - RuntimeError - Raised if the ``amp`` does not contain raw pixel information. - See Also -------- lsst.ip.isr.overscan.OverscanTask @@ -2292,7 +2286,7 @@ def darkCorrection(self, exposure, darkExposure, invert=False): Exposure to process. darkExposure : `lsst.afw.image.Exposure` Dark exposure of the same size as ``exposure``. - invert : `Bool`, optional + invert : `bool`, optional If True, re-add the dark to an already corrected image. Raises @@ -2339,7 +2333,7 @@ def doLinearize(self, detector): Returns ------- - doLinearize : `Bool` + doLinearize : `bool` If True, linearization should be performed. """ return self.config.doLinearize and \ @@ -2354,7 +2348,7 @@ def flatCorrection(self, exposure, flatExposure, invert=False): Exposure to process. flatExposure : `lsst.afw.image.Exposure` Flat exposure of the same size as ``exposure``. - invert : `Bool`, optional + invert : `bool`, optional If True, unflatten an already flattened image. See Also @@ -2592,7 +2586,7 @@ def measureBackground(self, exposure, IsrQaConfig=None): ---------- exposure : `lsst.afw.image.Exposure` Exposure to process. - IsrQaConfig : `lsst.ip.isr.isrQa.IsrQaConfig` + IsrQaConfig : `lsst.ip.isr.isrQa.IsrQaConfig`, optional Configuration object containing parameters on which background statistics and subgrids to use. """ diff --git a/python/lsst/ip/isr/linearize.py b/python/lsst/ip/isr/linearize.py index 6a2df9015..1acbe1782 100644 --- a/python/lsst/ip/isr/linearize.py +++ b/python/lsst/ip/isr/linearize.py @@ -103,6 +103,7 @@ class Linearizer(IsrCalib): tableData : `numpy.array`, optional Lookup table data for the linearity correction. """ + _OBSTYPE = "LINEARIZER" _SCHEMA = 'Gen3 Linearizer' _VERSION = 1.3 @@ -150,7 +151,7 @@ def updateMetadata(self, setDate=False, **kwargs): setDate : `bool`, optional Update the CALIBDATE fields in the metadata to the current time. Defaults to False. - kwargs : + kwargs : Any Other keyword parameters to set in the metadata. """ kwargs['HAS_LINEARITY'] = self.hasLinearity @@ -210,7 +211,6 @@ def fromDict(cls, dictionary): Raised if the supplied dictionary is for a different calibration. """ - calib = cls() if calib._OBSTYPE != dictionary['metadata']['OBSTYPE']: @@ -358,7 +358,6 @@ def toTable(self): List of tables containing the linearity calibration information. """ - tableList = [] self.updateMetadata() catalog = Table([{'AMPLIFIER_NAME': ampName, @@ -554,6 +553,7 @@ class LinearizeBase(metaclass=abc.ABCMeta): corrected_value = uncorrected_value + f(uncorrected_value) """ + LinearityType = None # linearity type, a string used for AmpInfoCatalogs @abc.abstractmethod @@ -608,6 +608,7 @@ class LinearizeLookupTable(LinearizeBase): the nearest index is used instead of truncating to the next smaller index """ + LinearityType = "LookupTable" def __call__(self, image, **kwargs): @@ -682,6 +683,7 @@ class LinearizePolynomial(LinearizeBase): A coefficient multiplied by ``uncorrImage**1`` is proportional to the gain. Not necessary for correcting non-linearity. """ + LinearityType = "Polynomial" def __call__(self, image, **kwargs): @@ -730,6 +732,7 @@ class LinearizeSquared(LinearizeBase): where c0 is linearity coefficient 0 for each amplifier. """ + LinearityType = "Squared" def __call__(self, image, **kwargs): @@ -777,6 +780,7 @@ class LinearizeSpline(LinearizeBase): to be subtracted from the observed flux. """ + LinearityType = "Spline" def __call__(self, image, **kwargs): @@ -830,6 +834,7 @@ def __call__(self, image, **kwargs): class LinearizeProportional(LinearizeBase): """Do not correct non-linearity. """ + LinearityType = "Proportional" def __call__(self, image, **kwargs): @@ -860,6 +865,7 @@ def __call__(self, image, **kwargs): class LinearizeNone(LinearizeBase): """Do not correct non-linearity. """ + LinearityType = "None" def __call__(self, image, **kwargs): diff --git a/python/lsst/ip/isr/masking.py b/python/lsst/ip/isr/masking.py index 02b3333a5..f80da1003 100644 --- a/python/lsst/ip/isr/masking.py +++ b/python/lsst/ip/isr/masking.py @@ -26,6 +26,9 @@ from lsst.pipe.base import Task +__all__ = ['MaskingConfig', 'MaskingTask'] + + class MaskingConfig(Config): doSpecificMasking = Field( dtype=bool, @@ -36,7 +39,10 @@ class MaskingConfig(Config): class MaskingTask(Task): """Perform extra masking for detector issues such as ghosts and glints. + + This is a dummy task that needs a camera-specific implementation. """ + ConfigClass = MaskingConfig _DefaultName = "isrMasking" @@ -54,4 +60,4 @@ def run(self, exposure): This task is currently not implemented, and should be retargeted by a camera specific version. """ - return + pass diff --git a/python/lsst/ip/isr/overscan.py b/python/lsst/ip/isr/overscan.py index 208894447..5003bac4e 100644 --- a/python/lsst/ip/isr/overscan.py +++ b/python/lsst/ip/isr/overscan.py @@ -38,6 +38,7 @@ class OverscanCorrectionTaskConfigBase(pexConfig.Config): """Overscan correction options. """ + fitType = pexConfig.ChoiceField( dtype=str, doc="The method for fitting the overscan bias level.", @@ -136,6 +137,8 @@ class OverscanCorrectionTaskBase(pipeBase.Task): ---------- statControl : `lsst.afw.math.StatisticsControl`, optional Statistics control object. + kwargs : Any + Additional parameters passed to the parent class. """ ConfigClass = OverscanCorrectionTaskConfigBase _DefaultName = "overscanBase" @@ -458,6 +461,8 @@ def getImageArray(self, image): image : `lsst.afw.image.Image` or `lsst.afw.image.MaskedImage` Image data to pull array from. + Returns + ------- calcImage : `numpy.ndarray` Image data array for numpy operating. """ @@ -627,7 +632,6 @@ def splineEval(indices, interp): values : `numpy.ndarray` Evaluated spline values at each index. """ - return interp.interpolate(indices.astype(float)) @staticmethod diff --git a/python/lsst/ip/isr/photodiode.py b/python/lsst/ip/isr/photodiode.py index 7db447c6c..1b786d940 100644 --- a/python/lsst/ip/isr/photodiode.py +++ b/python/lsst/ip/isr/photodiode.py @@ -36,12 +36,10 @@ class PhotodiodeCalib(IsrCalib): Parameters ---------- - timeSamples : `list` or `numpy.ndarray` + timeSamples : `list` or `numpy.ndarray`, optional List of samples the photodiode was measured at. - currentSamples : `list` or `numpy.ndarray` + currentSamples : `list` or `numpy.ndarray`, optional List of current measurements at each time sample. - log : `logging.Logger`, optional - Log to write messages to. If `None` a default logger will be used. **kwargs : Additional parameters. These will be passed to the parent constructor with the exception of: diff --git a/python/lsst/ip/isr/photodiodeCorrection.py b/python/lsst/ip/isr/photodiodeCorrection.py index 2ab826e15..9427dfb30 100644 --- a/python/lsst/ip/isr/photodiodeCorrection.py +++ b/python/lsst/ip/isr/photodiodeCorrection.py @@ -58,10 +58,12 @@ class PhotodiodeCorrection(IsrCalib): Notes ----- - The photodiode correction attributes stored are: + The photodiode correction attributes stored as: + abscissaCorrections : `dict` : [`str`, `float`] - Correction value indexed by exposure pair + Correction value indexed by exposure pair """ + _OBSTYPE = "PHOTODIODE_CORRECTION" _SCHEMA = 'PhotodiodeCorrection' _VERSION = 1.1 @@ -93,7 +95,6 @@ def updateMetadata(self, setDate=False, **kwargs): kwargs : Other keyword parameters to set in the metadata. """ - super().updateMetadata(setDate=setDate, **kwargs) @classmethod diff --git a/python/lsst/ip/isr/ptcDataset.py b/python/lsst/ip/isr/ptcDataset.py index 215cc286b..175f1ec90 100644 --- a/python/lsst/ip/isr/ptcDataset.py +++ b/python/lsst/ip/isr/ptcDataset.py @@ -365,6 +365,7 @@ def setAuxValuesPartialDataset(self, auxDict): def updateMetadata(self, **kwargs): """Update calibration metadata. + This calls the base class's method after ensuring the required calibration keywords will be saved. @@ -381,6 +382,7 @@ def updateMetadata(self, **kwargs): @classmethod def fromDict(cls, dictionary): """Construct a calibration from a dictionary of properties. + Must be implemented by the specific calibration subclasses. Parameters @@ -496,6 +498,7 @@ def fromDict(cls, dictionary): def toDict(self): """Return a dictionary containing the calibration properties. + The dictionary should be able to be round-tripped through `fromDict`. @@ -561,6 +564,7 @@ def _dictOfArraysToDictOfLists(dictOfArrays): @classmethod def fromTable(cls, tableList): """Construct calibration from a list of tables. + This method uses the `fromDict` method to create the calibration, after constructing an appropriate dictionary from the input tables. @@ -797,6 +801,7 @@ def fromDetector(self, detector): def getExpIdsUsed(self, ampName): """Get the exposures used, i.e. not discarded, for a given amp. + If no mask has been created yet, all exposures are returned. Parameters @@ -830,7 +835,13 @@ def getExpIdsUsed(self, ampName): return expIdsUsed def getGoodAmps(self): - """Get the good amps from this PTC.""" + """Get the good amps from this PTC. + + Returns + ------- + results : `list` [`str`] + List of good amplifiers. + """ return [amp for amp in self.ampNames if amp not in self.badAmps] def getGoodPoints(self, ampName): diff --git a/python/lsst/ip/isr/straylight.py b/python/lsst/ip/isr/straylight.py index e52a32898..a684407ce 100644 --- a/python/lsst/ip/isr/straylight.py +++ b/python/lsst/ip/isr/straylight.py @@ -31,6 +31,9 @@ from .calibType import IsrCalib +__all__ = ['StrayLightConfig', 'StrayLightTask', 'StrayLightData'] + + class StrayLightConfig(Config): doRotatorAngleCorrection = Field( dtype=bool, @@ -50,6 +53,7 @@ class StrayLightTask(Task): This is a dummy task to be retargeted with an camera-specific version. """ + ConfigClass = StrayLightConfig _DefaultName = "isrStrayLight" @@ -77,7 +81,7 @@ def run(self, exposure, strayLightData): raise NotImplementedError("Must be implemented by subclasses.") def checkFilter(self, exposure): - """Check whether we should fringe-subtract the science exposure. + """Check whether we should straylight correct this science exposure. Parameters ---------- diff --git a/python/lsst/ip/isr/vignette.py b/python/lsst/ip/isr/vignette.py index 69840946e..fc8956eb2 100644 --- a/python/lsst/ip/isr/vignette.py +++ b/python/lsst/ip/isr/vignette.py @@ -70,6 +70,7 @@ class VignetteTask(Task): """Define a simple circular vignette pattern and optionally update mask plane. """ + ConfigClass = VignetteConfig _DefaultName = "isrVignette" From a04321e3698395b46bbe64d79638966495493fa5 Mon Sep 17 00:00:00 2001 From: Christopher Waters Date: Mon, 31 Oct 2022 13:02:19 -0700 Subject: [PATCH 3/6] Fix config formatting to match other tasks. --- python/lsst/ip/isr/fringe.py | 88 +++++++++++++++++++++++++++++------- 1 file changed, 71 insertions(+), 17 deletions(-) diff --git a/python/lsst/ip/isr/fringe.py b/python/lsst/ip/isr/fringe.py index 20feb7423..f3e457fb1 100644 --- a/python/lsst/ip/isr/fringe.py +++ b/python/lsst/ip/isr/fringe.py @@ -52,29 +52,83 @@ def getFrame(): class FringeStatisticsConfig(Config): """Options for measuring fringes on an exposure""" - badMaskPlanes = ListField(dtype=str, default=["SAT"], doc="Ignore pixels with these masks") - stat = Field(dtype=int, default=int(afwMath.MEDIAN), doc="Statistic to use") - clip = Field(dtype=float, default=3.0, doc="Sigma clip threshold") - iterations = Field(dtype=int, default=3, doc="Number of fitting iterations") - rngSeedOffset = Field(dtype=int, default=0, - doc="Offset to the random number generator seed (full seed includes exposure ID)") + badMaskPlanes = ListField( + dtype=str, + default=["SAT"], + doc="Ignore pixels with these masks" + ) + stat = Field( + dtype=int, + default=int(afwMath.MEDIAN), + doc="Statistic to use" + ) + clip = Field( + dtype=float, + default=3.0, + doc="Sigma clip threshold" + ) + iterations = Field( + dtype=int, + default=3, + doc="Number of fitting iterations" + ) + rngSeedOffset = Field( + dtype=int, + default=0, + doc="Offset to the random number generator seed (full seed includes exposure ID)" + ) class FringeConfig(Config): """Fringe subtraction options""" # These are always physical_filter names. - filters = ListField(dtype=str, default=[], doc="Only fringe-subtract these filters") - useFilterAliases = Field(dtype=bool, default=False, doc="Search filter aliases during check.", - deprecated=("Removed with no replacement (FilterLabel has no aliases)." - "Will be removed after v22.")) - num = Field(dtype=int, default=30000, doc="Number of fringe measurements") - small = Field(dtype=int, default=3, doc="Half-size of small (fringe) measurements (pixels)") - large = Field(dtype=int, default=30, doc="Half-size of large (background) measurements (pixels)") - iterations = Field(dtype=int, default=20, doc="Number of fitting iterations") - clip = Field(dtype=float, default=3.0, doc="Sigma clip threshold") - stats = ConfigField(dtype=FringeStatisticsConfig, doc="Statistics for measuring fringes") - pedestal = Field(dtype=bool, default=False, doc="Remove fringe pedestal?") + filters = ListField( + dtype=str, + default=[], + doc="Only fringe-subtract these filters" + ) + useFilterAliases = Field( + dtype=bool, + default=False, + doc="Search filter aliases during check.", + deprecated=("Removed with no replacement (FilterLabel has no aliases)." + "Will be removed after v22.") + ) + num = Field( + dtype=int, + default=30000, + doc="Number of fringe measurements" + ) + small = Field( + dtype=int, + default=3, + doc="Half-size of small (fringe) measurements (pixels)" + ) + large = Field( + dtype=int, + default=30, + doc="Half-size of large (background) measurements (pixels)" + ) + iterations = Field( + dtype=int, + default=20, + doc="Number of fitting iterations" + ) + clip = Field( + dtype=float, + default=3.0, + doc="Sigma clip threshold" + ) + stats = ConfigField( + dtype=FringeStatisticsConfig, + doc="Statistics for measuring fringes" + ) + pedestal = Field( + dtype=bool, + default=False, + doc="Remove fringe pedestal?" + ) class FringeTask(Task): From 992caf652f5a0dbe4e1fb18bfcb3c2e4be187a54 Mon Sep 17 00:00:00 2001 From: Christopher Waters Date: Mon, 31 Oct 2022 13:49:31 -0700 Subject: [PATCH 4/6] Fix docstring typo. --- python/lsst/ip/isr/brighterFatterKernel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/lsst/ip/isr/brighterFatterKernel.py b/python/lsst/ip/isr/brighterFatterKernel.py index e687773ba..9f9dece22 100644 --- a/python/lsst/ip/isr/brighterFatterKernel.py +++ b/python/lsst/ip/isr/brighterFatterKernel.py @@ -580,7 +580,7 @@ def replaceDetectorKernelWithAmpKernel(self, ampName, detectorName): ---------- ampName : `str` Amplifier name used as an index in the calibration - ``ampKernel` dictionary that will be promoted. + ``ampKernel`` dictionary that will be promoted. detectorName : `str` Name of the detector to build a kernel for. This supplies the key that the new kernel will be indexed in the From b4090ab8193e1346219189d3d29cf475cd9478df Mon Sep 17 00:00:00 2001 From: Christopher Waters Date: Mon, 31 Oct 2022 13:57:19 -0700 Subject: [PATCH 5/6] Update doc/ tree. --- doc/index.rst | 1 + doc/lsst.ip.isr.isrMock/index.rst | 51 +++++++++++++++++++ .../tasks/lsst.ip.isr.IsrMock.rst | 18 +++---- .../lsst.ip.isr.FringeStatisticsConfig.rst | 14 +++++ .../configs/lsst.ip.isr.IsrQaConfig.rst | 14 +++++ .../lsst.ip.isr.IsrQaFlatnessConfig.rst | 14 +++++ doc/lsst.ip.isr/index.rst | 19 +++---- .../tasks/lsst.ip.isr.AmpOffsetTask.rst | 36 +++++++++++++ .../tasks/lsst.ip.isr.AssembleCcdTask.rst | 18 +++---- .../tasks/lsst.ip.isr.CrosstalkTask.rst | 20 ++++---- .../tasks/lsst.ip.isr.DeferredChargeTask.rst | 46 +++++++++++++++++ .../tasks/lsst.ip.isr.FringeTask.rst | 21 ++++---- .../tasks/lsst.ip.isr.IsrStatisticsTask.rst | 35 +++++++++++++ doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst | 18 +++---- .../tasks/lsst.ip.isr.MaskingTask.rst | 18 +++---- .../tasks/lsst.ip.isr.NullCrosstalkTask.rst | 20 ++++---- .../lsst.ip.isr.OverscanCorrectionTask.rst | 18 +++---- .../tasks/lsst.ip.isr.StrayLightTask.rst | 18 +++---- .../tasks/lsst.ip.isr.VignetteTask.rst | 39 ++++++++++++++ 19 files changed, 342 insertions(+), 96 deletions(-) create mode 100644 doc/lsst.ip.isr.isrMock/index.rst create mode 100644 doc/lsst.ip.isr/configs/lsst.ip.isr.FringeStatisticsConfig.rst create mode 100644 doc/lsst.ip.isr/configs/lsst.ip.isr.IsrQaConfig.rst create mode 100644 doc/lsst.ip.isr/configs/lsst.ip.isr.IsrQaFlatnessConfig.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.AmpOffsetTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.DeferredChargeTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrStatisticsTask.rst create mode 100644 doc/lsst.ip.isr/tasks/lsst.ip.isr.VignetteTask.rst diff --git a/doc/index.rst b/doc/index.rst index 64dae5cfb..977806863 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -10,3 +10,4 @@ ip_isr documentation preview :maxdepth: 1 lsst.ip.isr/index + lsst.ip.isr.isrMock/index diff --git a/doc/lsst.ip.isr.isrMock/index.rst b/doc/lsst.ip.isr.isrMock/index.rst new file mode 100644 index 000000000..2a82a101f --- /dev/null +++ b/doc/lsst.ip.isr.isrMock/index.rst @@ -0,0 +1,51 @@ +.. py:currentmodule:: lsst.ip.isr.isrMock + +.. _lsst.ip.isr.isrMock: + +################### +lsst.ip.isr.isrMock +################### + +The ``lsst.ip.isr.isrMock`` module provides classes to simulate raw exposures and calibration products to allow for testing. + +.. _lsst.ip.isr.isrMock-using: + +Using lsst.ip.isr.isrMock +========================= + +.. toctree:: + :maxdepth: 1 + +.. _lsst.ip.isr.isrMock-contributing: + +Contributing +============ + +``lsst.ip.isr.isrMock`` is developed at https://github.com/lsst/ip_isr. +You can find Jira issues for this module under the `ip_isr `_ component. + +.. If there are topics related to developing this module (rather than using it), link to this from a toctree placed here. + +.. .. toctree:: +.. :maxdepth: 1 + +Task reference +============== + +.. _lsst.ip.isr.isrMock-pipeline-tasks: + +Tasks +----- + +.. lsst-tasks:: + :root: lsst.ip.isr.isrMock + :toctree: tasks + +.. _lsst.ip.isr.isrMock-pyapi: + +Python API reference +==================== + +.. automodapi:: lsst.ip.isr.isrMock + :no-main-docstr: + :no-inheritance-diagram: diff --git a/doc/lsst.ip.isr.isrMock/tasks/lsst.ip.isr.IsrMock.rst b/doc/lsst.ip.isr.isrMock/tasks/lsst.ip.isr.IsrMock.rst index 9e49a9544..0b25bde96 100644 --- a/doc/lsst.ip.isr.isrMock/tasks/lsst.ip.isr.IsrMock.rst +++ b/doc/lsst.ip.isr.isrMock/tasks/lsst.ip.isr.IsrMock.rst @@ -1,4 +1,4 @@ -.. lsst-task-topic:: lsst.ip.isr.IsrMock +.. lsst-task-topic:: lsst.ip.isr.isrMock.IsrMock ####### IsrMock @@ -6,7 +6,7 @@ IsrMock ``IsrMock`` creates a variety of simulated images and calibration products, for use in testing. -.. _lsst.ip.isr.IsrMock-processing-summary: +.. _lsst.ip.isr.isrMock.IsrMock-processing-summary: Processing summary ================== @@ -24,25 +24,25 @@ Processing summary The output exposure can be returned as a trimmed (overscan and prescan removed) single image, an untrimmed single image, or a dictionary containing each amplifier as a separate image indexed by the amplifier name. This allows testing of the various methods of assembly. -.. _lsst.ip.isr.IsrMock-api: +.. _lsst.ip.isr.isrMock.IsrMock-api: Python API summary ================== -.. lsst-task-api-summary:: lsst.ip.isr.IsrMock +.. lsst-task-api-summary:: lsst.ip.isr.isrMock.IsrMock -.. _lsst.ip.isr.IsrMock-subtasks: +.. _lsst.ip.isr.isrMock.IsrMock-subtasks: Retargetable subtasks ===================== -.. lsst-task-config-subtasks:: lsst.ip.isr.IsrMock +.. lsst-task-config-subtasks:: lsst.ip.isr.isrMock.IsrMock -.. _lsst.ip.isr.IsrMock-configs: +.. _lsst.ip.isr.isrMock.IsrMock-configs: Configuration fields ==================== -.. lsst-task-config-fields:: lsst.ip.isr.IsrMock +.. lsst-task-config-fields:: lsst.ip.isr.isrMock.IsrMock -.. _lsst.ip.isr.IsrMock-debug: +.. _lsst.ip.isr.isrMock.IsrMock-debug: diff --git a/doc/lsst.ip.isr/configs/lsst.ip.isr.FringeStatisticsConfig.rst b/doc/lsst.ip.isr/configs/lsst.ip.isr.FringeStatisticsConfig.rst new file mode 100644 index 000000000..2813a0d74 --- /dev/null +++ b/doc/lsst.ip.isr/configs/lsst.ip.isr.FringeStatisticsConfig.rst @@ -0,0 +1,14 @@ +.. lsst-config-topic:: lsst.ip.isr.fringe.FringeStatisticsConfig + +###################### +FringeStatisticsConfig +###################### + +``FringeStatisticsConfig`` provides configuration for the statistics method used to generate sample points for fringe measurement. + +.. _lsst.ip.isr.fringe.FringeStatisticsConfig-configs: + +Configuration fields +==================== + +.. lsst-config-fields:: lsst.ip.isr.fringe.FringeStatisticsConfig diff --git a/doc/lsst.ip.isr/configs/lsst.ip.isr.IsrQaConfig.rst b/doc/lsst.ip.isr/configs/lsst.ip.isr.IsrQaConfig.rst new file mode 100644 index 000000000..382c23375 --- /dev/null +++ b/doc/lsst.ip.isr/configs/lsst.ip.isr.IsrQaConfig.rst @@ -0,0 +1,14 @@ +.. lsst-config-topic:: lsst.ip.isr.isrQa.IsrQaConfig + +########### +IsrQaConfig +########### + +``IsrQaConfig`` provides configuration for quality-assurance measurements, including thumbnail images, created by IsrTask. + +.. _lsst.ip.isr.isrQa.IsrQaConfig-configs: + +Configuration fields +==================== + +.. lsst-config-fields:: lsst.ip.isr.isrQa.IsrQaConfig diff --git a/doc/lsst.ip.isr/configs/lsst.ip.isr.IsrQaFlatnessConfig.rst b/doc/lsst.ip.isr/configs/lsst.ip.isr.IsrQaFlatnessConfig.rst new file mode 100644 index 000000000..b18e9bad2 --- /dev/null +++ b/doc/lsst.ip.isr/configs/lsst.ip.isr.IsrQaFlatnessConfig.rst @@ -0,0 +1,14 @@ +.. lsst-config-topic:: lsst.ip.isr.isrQa.IsrQaFlatnessConfig + +################### +IsrQaFlatnessConfig +################### + +``IsrQaFlatnessConfig`` provides configuration for the quality assurance estimate of the image background. + +.. _lsst.ip.isr.isrQa.IsrQaFlatnessConfig-configs: + +Configuration fields +==================== + +.. lsst-config-fields:: lsst.ip.isr.isrQa.IsrQaFlatnessConfig diff --git a/doc/lsst.ip.isr/index.rst b/doc/lsst.ip.isr/index.rst index 875afb654..ca65d7705 100644 --- a/doc/lsst.ip.isr/index.rst +++ b/doc/lsst.ip.isr/index.rst @@ -20,9 +20,6 @@ Using lsst.ip.isr ``lsst.ip.isr`` is generally used as the initial step of pipeline processing, performing the initial image processing for ``lsst.drp.pipe``, ``lsst.ap.pipe``, and ``lsst.cp.pipe``. This module also contains the definitions for calibration products that are not just a simple image. The final major component is a set of tasks designed to simulate raw data and calibration products, to allow for the functions and methods to be properly tested with known inputs. - calibration-types - isrmock-reference - .. _lsst.ip.isr-contributing: Contributing @@ -64,6 +61,14 @@ Tasks :root: lsst.ip.isr :toctree: tasks +.. _lsst.ip.isr-configs: + +Configurations +-------------- +.. lsst-configs:: + :root: lsst.ip.isr + :toctree: configs + .. _lsst.ip.isr-pyapi: Python API reference @@ -72,11 +77,3 @@ Python API reference .. automodapi:: lsst.ip.isr :no-main-docstr: :no-inheritance-diagram: - -.. automodapi:: lsst.ip.isr.ampOffset - :no-main-docstr: - :no-inheritance-diagram: - -.. automodapi:: lsst.ip.isr.vignette - :no-main-docstr: - :no-inheritance-diagram: diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.AmpOffsetTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.AmpOffsetTask.rst new file mode 100644 index 000000000..ba8e7669f --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.AmpOffsetTask.rst @@ -0,0 +1,36 @@ +.. lsst-task-topic:: lsst.ip.isr.ampOffset.AmpOffsetTask + +############# +AmpOffsetTask +############# + +``AmpOffsetTask`` is designed to measure background levels at amplifier boundaries, using those values to calculate the optimal offsets needed to align the flux levels to remove remnant shifts between amplifiers that are not corrected by bias, dark, and flat correction. + +.. _lsst.ip.isr.ampOffset.AmpOffsetTask-processing-summary: + +Processing summary +================== + +``AmpOffsetTask`` is a stub task that should be subclassed by camera-specific implementations that can correctly map the measurements into amp-to-amp shifts. + +.. _lsst.ip.isr.ampOffset.AmpOffsetTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.ampOffset.AmpOffsetTask + +.. _lsst.ip.isr.ampOffset.AmpOffsetTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.ampOffset.AmpOffsetTask + +.. _lsst.ip.isr.ampOffset.AmpOffsetTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.ampOffset.AmpOffsetTask + diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst index aa75e6814..646d53e58 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.AssembleCcdTask.rst @@ -1,4 +1,4 @@ -.. lsst-task-topic:: lsst.ip.isr.AssembleCcdTask +.. lsst-task-topic:: lsst.ip.isr.assembleCcdTask.AssembleCcdTask ############### AssembleCcdTask @@ -6,7 +6,7 @@ AssembleCcdTask ``AssembleCcdTask`` constructs a full detector image from individual segments. The end result can either be untrimmed (all overscan and prescan regions are retained), or trimmed (these sections are removed, producing an image of only the imaging region). -.. _lsst.ip.isr.AssembleCcdTask-processing-summary: +.. _lsst.ip.isr.assembleCcdTask.AssembleCcdTask-processing-summary: Processing summary ================== @@ -18,28 +18,28 @@ Processing summary #. The WCS, filter, and visit info are also transferred from the input exposure to the output. -.. _lsst.ip.isr.AssembleCcdTask-api: +.. _lsst.ip.isr.assembleCcdTask.AssembleCcdTask-api: Python API summary ================== -.. lsst-task-api-summary:: lsst.ip.isr.AssembleCcdTask +.. lsst-task-api-summary:: lsst.ip.isr.assembleCcdTask.AssembleCcdTask -.. _lsst.ip.isr.AssembleCcdTask-subtasks: +.. _lsst.ip.isr.assembleCcdTask.AssembleCcdTask-subtasks: Retargetable subtasks ===================== -.. lsst-task-config-subtasks:: lsst.ip.isr.AssembleCcdTask +.. lsst-task-config-subtasks:: lsst.ip.isr.assembleCcdTask.AssembleCcdTask -.. _lsst.ip.isr.AssembleCcdTask-configs: +.. _lsst.ip.isr.assembleCcdTask.AssembleCcdTask-configs: Configuration fields ==================== -.. lsst-task-config-fields:: lsst.ip.isr.AssembleCcdTask +.. lsst-task-config-fields:: lsst.ip.isr.assembleCcdTask.AssembleCcdTask -.. _lsst.ip.isr.AssembleCcdTask-debug: +.. _lsst.ip.isr.assembleCcdTask.AssembleCcdTask-debug: Debugging ========= diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst index 6c4a1a841..cec60dfa4 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.CrosstalkTask.rst @@ -1,12 +1,12 @@ -.. lsst-task-topic:: lsst.ip.isr.CrosstalkTask +.. lsst-task-topic:: lsst.ip.isr.crosstalk.CrosstalkTask ############# CrosstalkTask ############# -``CrosstalkTask`` corrects the effects of crosstalk by subtracting scaled copies of the source amplifier images from the target amplifiers. This task uses the `lsst.ip.isr.CrosstalkCalib` to hold the crosstalk coefficients, as well as a number of the utility functions to ensure that the source and template amplifier images are aligned such that the readout corner is in the same location for both. Both intra- and inter- detector crosstalk signals can be corrected, although the latter that requires all the exposures for all potential source detectors be supplied. +``CrosstalkTask`` corrects the effects of crosstalk by subtracting scaled copies of the source amplifier images from the target amplifiers. This task uses the `lsst.ip.isr.crosstalk.CrosstalkCalib` to hold the crosstalk coefficients, as well as a number of the utility functions to ensure that the source and template amplifier images are aligned such that the readout corner is in the same location for both. Both intra- and inter- detector crosstalk signals can be corrected, although the latter that requires all the exposures for all potential source detectors be supplied. -.. _lsst.ip.isr.CrosstalkTask-processing-summary: +.. _lsst.ip.isr.crosstalk.CrosstalkTask-processing-summary: Processing summary ================== @@ -17,25 +17,25 @@ Processing summary #. Flip amplifier images to match readout corners, and subtract the scaled version from the target amplifier. #. Repeat this procedure for any inter-detector crosstalk signals that have supplied exposures. -.. _lsst.ip.isr.CrosstalkTask-api: +.. _lsst.ip.isr.crosstalk.CrosstalkTask-api: Python API summary ================== -.. lsst-task-api-summary:: lsst.ip.isr.CrosstalkTask +.. lsst-task-api-summary:: lsst.ip.isr.crosstalk.CrosstalkTask -.. _lsst.ip.isr.CrosstalkTask-subtasks: +.. _lsst.ip.isr.crosstalk.CrosstalkTask-subtasks: Retargetable subtasks ===================== -.. lsst-task-config-subtasks:: lsst.ip.isr.CrosstalkTask +.. lsst-task-config-subtasks:: lsst.ip.isr.crosstalk.CrosstalkTask -.. _lsst.ip.isr.CrosstalkTask-configs: +.. _lsst.ip.isr.crosstalk.CrosstalkTask-configs: Configuration fields ==================== -.. lsst-task-config-fields:: lsst.ip.isr.CrosstalkTask +.. lsst-task-config-fields:: lsst.ip.isr.crosstalk.CrosstalkTask -.. _lsst.ip.isr.CrosstalkTask-debug: +.. _lsst.ip.isr.crosstalk.CrosstalkTask-debug: diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.DeferredChargeTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.DeferredChargeTask.rst new file mode 100644 index 000000000..be04dec51 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.DeferredChargeTask.rst @@ -0,0 +1,46 @@ +.. lsst-task-topic:: lsst.ip.isr.deferredCharge.DeferredChargeTask + +################## +DeferredChargeTask +################## + +``DeferredChargeTask`` corrects the input exposure using a per-amplifier model of the charge-transfer inefficiency. + +.. _lsst.ip.isr.deferredCharge.DeferredChargeTask-processing-summary: + +Processing summary +================== + +``DeferredChargeTask`` runs these operations: + +#. Transforms the input amplifier data to have a common orientation via a series of flips. +#. Corrects the image data for local offsets. +#. Corrects the image data for serial traps. + +.. _lsst.ip.isr.deferredCharge.DeferredChargeTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.deferredCharge.DeferredChargeTask + +.. _lsst.ip.isr.deferredCharge.DeferredChargeTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.deferredCharge.DeferredChargeTask + +.. _lsst.ip.isr.deferredCharge.DeferredChargeTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.deferredCharge.DeferredChargeTask + +.. _lsst.ip.isr.deferredCharge.DeferredChargeTask-debug: + +Debugging +========= + +Debugging hooks exist to display the exposure and the locations of the random positions, as well as to display the fit between the science and fringe measurements. These are disabled in the code by default. diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst index 670e91b6c..463cde736 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.FringeTask.rst @@ -1,4 +1,4 @@ -.. lsst-task-topic:: lsst.ip.isr.FringeTask +.. lsst-task-topic:: lsst.ip.isr.fringe.FringeTask ########## FringeTask @@ -6,7 +6,7 @@ FringeTask ``FringeTask`` removes the fringing signal that is evident in long wavelength data. -.. _lsst.ip.isr.FringeTask-processing-summary: +.. _lsst.ip.isr.fringe.FringeTask-processing-summary: Processing summary ================== @@ -19,35 +19,34 @@ Processing summary #. Those positions are measured similarly on the fringe frame. #. An iterative clipping least squares process is run to find the best fitting scale factor to minimize -.. math:: -y = science - scale * fringe +.. math:: y = science - scale * fringe #. This scaled fringe signal is subtracted from the science image. #. This process can be repeated if multiple fringe frames exist. -.. _lsst.ip.isr.FringeTask-api: +.. _lsst.ip.isr.fringe.FringeTask-api: Python API summary ================== -.. lsst-task-api-summary:: lsst.ip.isr.FringeTask +.. lsst-task-api-summary:: lsst.ip.isr.fringe.FringeTask -.. _lsst.ip.isr.FringeTask-subtasks: +.. _lsst.ip.isr.fringe.FringeTask-subtasks: Retargetable subtasks ===================== -.. lsst-task-config-subtasks:: lsst.ip.isr.FringeTask +.. lsst-task-config-subtasks:: lsst.ip.isr.fringe.FringeTask -.. _lsst.ip.isr.FringeTask-configs: +.. _lsst.ip.isr.fringe.FringeTask-configs: Configuration fields ==================== -.. lsst-task-config-fields:: lsst.ip.isr.FringeTask +.. lsst-task-config-fields:: lsst.ip.isr.fringe.FringeTask -.. _lsst.ip.isr.FringeTask-debug: +.. _lsst.ip.isr.fringe.FringeTask-debug: Debugging ========= diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrStatisticsTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrStatisticsTask.rst new file mode 100644 index 000000000..790ad4809 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrStatisticsTask.rst @@ -0,0 +1,35 @@ +.. lsst-task-topic:: lsst.ip.isr.isrStatistics.IsrStatisticsTask + +################# +IsrStatisticsTask +################# + +``IsrStatisticsTask`` provides a way to measure some set of properties on the final ISR corrected exposure. This is intended to allow these properties to be calculated without the need to add multiple additional tasks for each new measurements. + +.. _lsst.ip.isr.isrStatistics.IsrStatisticsTask-processing-summary: + +Processing summary +================== + +``IsrStatisticsTask`` has a run method that can be simply extended for future statistics. Currently, only the measurement of charge-transfer ineffiency metrics is being calculated. + +.. _lsst.ip.isr.isrStatistics.IsrStatisticsTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.isrStatistics.IsrStatisticsTask + +.. _lsst.ip.isr.isrStatistics.IsrStatisticsTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.isrStatistics.IsrStatisticsTask + +.. _lsst.ip.isr.isrStatistics.IsrStatisticsTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.isrStatistics.IsrStatisticsTask diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst index 952662966..f2870744f 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.IsrTask.rst @@ -13,23 +13,23 @@ Processing summary ``IsrTask`` runs these operations: -#. Overscan correction using `lsst.ip.isr.OverscanTask`. -#. CCD assembly using `lsst.ip.isr.AssembleCcdTask`. +#. Overscan correction using `lsst.ip.isr.overscan.OverscanTask`. +#. CCD assembly using `lsst.ip.isr.assembleCcdTask.AssembleCcdTask`. #. Bias correction using `lsst.ip.isr.isrFunctions.biasCorrection`. #. Variance plane construction. #. Linearity correction. -#. Crosstalk correction using `lsst.ip.isr.CrosstalkTask`. +#. Crosstalk correction using `lsst.ip.isr.crosstalk.CrosstalkTask`. #. Defect masking, NaN masking, saturation trail widening, and any camera specific masking. -#. Brighter-fatter correction using `lsst.ip.isr.isrFunction.brighterFatterCorrection`. +#. Brighter-fatter correction using `lsst.ip.isr.isrFunctions.brighterFatterCorrection`. #. Dark correction using `lsst.ip.isr.isrFunctions.darkCorrection`. -#. Fringe correction using `lsst.ip.isr.FringeTask`. -#. Straylight correction using `lsst.ip.isr.StrayLightTask`. +#. Fringe correction using `lsst.ip.isr.fringe.FringeTask`. +#. Straylight correction using `lsst.ip.isr.straylight.StrayLightTask`. #. Flat correction using `lsst.ip.isr.isrFunctions.flatCorrection`, or gain scaling using `lsst.ip.isr.isrFunctions.applyGains`. -#. Vignette polygon construction and masking using `lsst.ip.isr.VignetteTask`. +#. Vignette polygon construction and masking using `lsst.ip.isr.vignette.VignetteTask`. #. Attaching transmission curves using `lsst.ip.isr.isrFunctions.attachTransmissionCurve`. #. Illumination correction using `lsst.ip.isr.isrFunctions.illuminationCorrection`. #. Interpolation over masked pixels using `lsst.ip.isr.isrFunctions.interpolateFromMask`. -#. Amp-to-amp offset correction using `lsst.ip.isr.AmpOffsetTask`. +#. Amp-to-amp offset correction using `lsst.ip.isr.ampOffset.AmpOffsetTask`. .. _lsst.ip.isr.IsrTask-api: @@ -57,4 +57,4 @@ Configuration fields Debugging ========= -Debug break points exist after a number of the major steps, allowing the exposure processed to that level to be displayed. Each of these break points are named after the most recent step completed, and include ``doBias``, ``doCrosstalk``, ``doAssembleCcd``, ``doBrighterFatter``, ``doDark``, ``doFringe``, ``doStrayLight``, ``doFlat``, and ``postISRCCD``. +Debug break points exist after a number of the major steps, allowing the exposure processed to that level to be displayed. Each of these break points are named after the most recent step completed, and include ``doBias``, ``doCrosstalk``, ``doAssembleCcd``, ``doBrighterFatter``, ``doDark``, ``doFringe``, ``doStrayLight``, ``doFlat``, and ``postISRCCD``. diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst index 22a577f21..78ae692e6 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.MaskingTask.rst @@ -1,4 +1,4 @@ -.. lsst-task-topic:: lsst.ip.isr.MaskingTask +.. lsst-task-topic:: lsst.ip.isr.masking.MaskingTask ########### MaskingTask @@ -6,32 +6,32 @@ MaskingTask ``MaskingTask`` is a placeholder method. It is intended to perform additional masking that is separate from any defects or saturated pixels. -.. _lsst.ip.isr.MaskingTask-processing-summary: +.. _lsst.ip.isr.masking.MaskingTask-processing-summary: Processing summary ================== ``MaskingTask`` must be implemented by a camera-specific class. -.. _lsst.ip.isr.MaskingTask-api: +.. _lsst.ip.isr.masking.MaskingTask-api: Python API summary ================== -.. lsst-task-api-summary:: lsst.ip.isr.MaskingTask +.. lsst-task-api-summary:: lsst.ip.isr.masking.MaskingTask -.. _lsst.ip.isr.MaskingTask-subtasks: +.. _lsst.ip.isr.masking.MaskingTask-subtasks: Retargetable subtasks ===================== -.. lsst-task-config-subtasks:: lsst.ip.isr.MaskingTask +.. lsst-task-config-subtasks:: lsst.ip.isr.masking.MaskingTask -.. _lsst.ip.isr.MaskingTask-configs: +.. _lsst.ip.isr.masking.MaskingTask-configs: Configuration fields ==================== -.. lsst-task-config-fields:: lsst.ip.isr.MaskingTask +.. lsst-task-config-fields:: lsst.ip.isr.masking.MaskingTask -.. _lsst.ip.isr.MaskingTask-debug: +.. _lsst.ip.isr.masking.MaskingTask-debug: diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst index 58cc1bd64..ed980cd5a 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.NullCrosstalkTask.rst @@ -1,37 +1,37 @@ -.. lsst-task-topic:: lsst.ip.isr.NullCrosstalkTask +.. lsst-task-topic:: lsst.ip.isr.crosstalk.NullCrosstalkTask ################# NullCrosstalkTask ################# -``NullCrosstalkTask`` is a dummy function that accepts the same inputs as the `lsst.ip.isr.CrosstalkTask` task, but performs no crosstalk subtraction. +``NullCrosstalkTask`` is a dummy function that accepts the same inputs as the `lsst.ip.isr.crosstalk.CrosstalkTask` task, but performs no crosstalk subtraction. -.. _lsst.ip.isr.NullCrosstalkTask-processing-summary: +.. _lsst.ip.isr.crosstalk.NullCrosstalkTask-processing-summary: Processing summary ================== ``NullCrosstalkTask`` runs no operations. -.. _lsst.ip.isr.NullCrosstalkTask-api: +.. _lsst.ip.isr.crosstalk.NullCrosstalkTask-api: Python API summary ================== -.. lsst-task-api-summary:: lsst.ip.isr.NullCrosstalkTask +.. lsst-task-api-summary:: lsst.ip.isr.crosstalk.NullCrosstalkTask -.. _lsst.ip.isr.NullCrosstalkTask-subtasks: +.. _lsst.ip.isr.crosstalk.NullCrosstalkTask-subtasks: Retargetable subtasks ===================== -.. lsst-task-config-subtasks:: lsst.ip.isr.NullCrosstalkTask +.. lsst-task-config-subtasks:: lsst.ip.isr.crosstalk.NullCrosstalkTask -.. _lsst.ip.isr.NullCrosstalkTask-configs: +.. _lsst.ip.isr.crosstalk.NullCrosstalkTask-configs: Configuration fields ==================== -.. lsst-task-config-fields:: lsst.ip.isr.NullCrosstalkTask +.. lsst-task-config-fields:: lsst.ip.isr.crosstalk.NullCrosstalkTask -.. _lsst.ip.isr.NullCrosstalkTask-debug: +.. _lsst.ip.isr.crosstalk.NullCrosstalkTask-debug: diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst index 7259473b2..a21e5deac 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.OverscanCorrectionTask.rst @@ -1,4 +1,4 @@ -.. lsst-task-topic:: lsst.ip.isr.OverscanCorrectionTask +.. lsst-task-topic:: lsst.ip.isr.overscan.OverscanCorrectionTask ###################### OverscanCorrectionTask @@ -6,7 +6,7 @@ OverscanCorrectionTask ``OverscanCorrectionTask`` calculates and subtracts the overscan from the input exposure. -.. _lsst.ip.isr.OverscanCorrectionTask-processing-summary: +.. _lsst.ip.isr.overscan.OverscanCorrectionTask-processing-summary: Processing summary ================== @@ -17,28 +17,28 @@ Processing summary #. Subtracts that model from both the image and overscan arrays, #. Optionally masks suspect pixels. -.. _lsst.ip.isr.OverscanCorrectionTask-api: +.. _lsst.ip.isr.overscan.OverscanCorrectionTask-api: Python API summary ================== -.. lsst-task-api-summary:: lsst.ip.isr.OverscanCorrectionTask +.. lsst-task-api-summary:: lsst.ip.isr.overscan.OverscanCorrectionTask -.. _lsst.ip.isr.OverscanCorrectionTask-subtasks: +.. _lsst.ip.isr.overscan.OverscanCorrectionTask-subtasks: Retargetable subtasks ===================== -.. lsst-task-config-subtasks:: lsst.ip.isr.OverscanCorrectionTask +.. lsst-task-config-subtasks:: lsst.ip.isr.overscan.OverscanCorrectionTask -.. _lsst.ip.isr.OverscanCorrectionTask-configs: +.. _lsst.ip.isr.overscan.OverscanCorrectionTask-configs: Configuration fields ==================== -.. lsst-task-config-fields:: lsst.ip.isr.OverscanCorrectionTask +.. lsst-task-config-fields:: lsst.ip.isr.overscan.OverscanCorrectionTask -.. _lsst.ip.isr.OverscanCorrectionTask-debug: +.. _lsst.ip.isr.overscan.OverscanCorrectionTask-debug: Debugging ========= diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst index 3680b846f..c73f5c41f 100644 --- a/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.StrayLightTask.rst @@ -1,4 +1,4 @@ -.. lsst-task-topic:: lsst.ip.isr.StrayLightTask +.. lsst-task-topic:: lsst.ip.isr.straylight.StrayLightTask ############## StrayLightTask @@ -6,7 +6,7 @@ StrayLightTask ``StrayLightTask`` applies a stray light correction to the input exposure. -.. _lsst.ip.isr.StrayLightTask-processing-summary: +.. _lsst.ip.isr.straylight.StrayLightTask-processing-summary: Processing summary ================== @@ -14,25 +14,25 @@ Processing summary ``StrayLightTask`` is a placeholder task, as the particular type of correction must be implemented by a camera specific class. -.. _lsst.ip.isr.StrayLightTask-api: +.. _lsst.ip.isr.straylight.StrayLightTask-api: Python API summary ================== -.. lsst-task-api-summary:: lsst.ip.isr.StrayLightTask +.. lsst-task-api-summary:: lsst.ip.isr.straylight.StrayLightTask -.. _lsst.ip.isr.StrayLightTask-subtasks: +.. _lsst.ip.isr.straylight.StrayLightTask-subtasks: Retargetable subtasks ===================== -.. lsst-task-config-subtasks:: lsst.ip.isr.StrayLightTask +.. lsst-task-config-subtasks:: lsst.ip.isr.straylight.StrayLightTask -.. _lsst.ip.isr.StrayLightTask-configs: +.. _lsst.ip.isr.straylight.StrayLightTask-configs: Configuration fields ==================== -.. lsst-task-config-fields:: lsst.ip.isr.StrayLightTask +.. lsst-task-config-fields:: lsst.ip.isr.straylight.StrayLightTask -.. _lsst.ip.isr.StrayLightTask-debug: +.. _lsst.ip.isr.straylight.StrayLightTask-debug: diff --git a/doc/lsst.ip.isr/tasks/lsst.ip.isr.VignetteTask.rst b/doc/lsst.ip.isr/tasks/lsst.ip.isr.VignetteTask.rst new file mode 100644 index 000000000..f14d0a912 --- /dev/null +++ b/doc/lsst.ip.isr/tasks/lsst.ip.isr.VignetteTask.rst @@ -0,0 +1,39 @@ +.. lsst-task-topic:: lsst.ip.isr.vignette.VignetteTask + +############ +VignetteTask +############ + +``VignetteTask`` determines the intersection of an exposure with a circular vignetted model, optionally masking the pixels that fall outside this model. + +.. _lsst.ip.isr.vignette.VignetteTask-processing-summary: + +Processing summary +================== + +``VignetteTask`` runs these operations: + +#. Constructs a circular vignette model from configuration parameters. +#. Sets the exposure valid polygon using this model. +#. Optionally masks the pixels in the exposure that in the vignetted region. + +.. _lsst.ip.isr.vignette.VignetteTask-api: + +Python API summary +================== + +.. lsst-task-api-summary:: lsst.ip.isr.vignette.VignetteTask + +.. _lsst.ip.isr.vignette.VignetteTask-subtasks: + +Retargetable subtasks +===================== + +.. lsst-task-config-subtasks:: lsst.ip.isr.vignette.VignetteTask + +.. _lsst.ip.isr.vignette.VignetteTask-configs: + +Configuration fields +==================== + +.. lsst-task-config-fields:: lsst.ip.isr.vignette.VignetteTask From 6f9cbc73037ef38e42f95a488a6cc77e0db90c30 Mon Sep 17 00:00:00 2001 From: Christopher Waters Date: Fri, 2 Dec 2022 13:50:55 -0800 Subject: [PATCH 6/6] Remove duplicate __all__ definitions. --- python/lsst/ip/isr/fringe.py | 3 --- python/lsst/ip/isr/isrQa.py | 3 --- python/lsst/ip/isr/masking.py | 3 --- python/lsst/ip/isr/straylight.py | 3 --- 4 files changed, 12 deletions(-) diff --git a/python/lsst/ip/isr/fringe.py b/python/lsst/ip/isr/fringe.py index f3e457fb1..cf909f6cb 100644 --- a/python/lsst/ip/isr/fringe.py +++ b/python/lsst/ip/isr/fringe.py @@ -34,9 +34,6 @@ from .isrFunctions import checkFilter -__all__ = ['FringeStatisticsConfig', 'FringeConfig', 'FringeTask'] - - afwDisplay.setDefaultMaskTransparency(75) diff --git a/python/lsst/ip/isr/isrQa.py b/python/lsst/ip/isr/isrQa.py index 1c0fd34a9..df7ecfa33 100644 --- a/python/lsst/ip/isr/isrQa.py +++ b/python/lsst/ip/isr/isrQa.py @@ -27,9 +27,6 @@ import lsst.pex.config as pexConfig -__all__ = ['IsrQaFlatnessConfig', 'IsrQaConfig', 'makeThumbnail'] - - class IsrQaFlatnessConfig(pexConfig.Config): meshX = pexConfig.Field( dtype=int, diff --git a/python/lsst/ip/isr/masking.py b/python/lsst/ip/isr/masking.py index f80da1003..d4c25b193 100644 --- a/python/lsst/ip/isr/masking.py +++ b/python/lsst/ip/isr/masking.py @@ -26,9 +26,6 @@ from lsst.pipe.base import Task -__all__ = ['MaskingConfig', 'MaskingTask'] - - class MaskingConfig(Config): doSpecificMasking = Field( dtype=bool, diff --git a/python/lsst/ip/isr/straylight.py b/python/lsst/ip/isr/straylight.py index a684407ce..b73a64974 100644 --- a/python/lsst/ip/isr/straylight.py +++ b/python/lsst/ip/isr/straylight.py @@ -31,9 +31,6 @@ from .calibType import IsrCalib -__all__ = ['StrayLightConfig', 'StrayLightTask', 'StrayLightData'] - - class StrayLightConfig(Config): doRotatorAngleCorrection = Field( dtype=bool,