Skip to content

Commit

Permalink
Update documentation for ip.diffim
Browse files Browse the repository at this point in the history
Remove documentation pages with outdated information.
Include new tasks doc pages and fix docstrings.
Add a new overview page for ip.diffim

Adding the examples in the landing page

Fix bug on docstring

Fix review comments

Update doc/lsst.ip.diffim/index.rst

Co-authored-by: Ian Sullivan <[email protected]>

Update doc/lsst.ip.diffim/overview_ipdiffim.rst

Co-authored-by: Ian Sullivan <[email protected]>

Fix review comments

Fix review comments
  • Loading branch information
BrunoSanchez committed Mar 4, 2024
1 parent 48b254a commit 2d2d4af
Show file tree
Hide file tree
Showing 9 changed files with 396 additions and 269 deletions.
8 changes: 5 additions & 3 deletions doc/lsst.ip.diffim/AL_implementation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ Basis functions
Solving for the matching kernel starts with the generation of the
basis functions. The number of basis functions and the properties of
the Gaussian bases (e.g. widths in pixels) are determined in
`lsst.ip.diffim.makeKernelBasisList.generateAlardLuptonBasisList`. The
decision logic depends on configuration and psf fwhm values of the
images, some details is given in the function API documentation.
`lsst.ip.diffim.makeKernelBasisList.generateAlardLuptonBasisList`.
The full config for this is being set in the module
`lsst.ip.diffim.psfMatch` config classes. The decision logic depends
on this configuration and psf fwhm values of the images, some details
are given in the function API documentation.

.. TODO More details about the basis function generation
Expand Down
219 changes: 0 additions & 219 deletions doc/lsst.ip.diffim/code_notes.rst

This file was deleted.

64 changes: 58 additions & 6 deletions doc/lsst.ip.diffim/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,26 @@
lsst.ip.diffim
##############

The ``lsst.ip.diffim`` module provides algorithms for astronomical image differencing.
.. Paragraph that describes what this Python module does and links to related modules and frameworks.
The ``lsst.ip.diffim`` module provides algorithms and utilities for astronomical **image differencing** and **transient detection**.

.. _lsst.ip.diffimg-overview:

Overview of lsst.ip.diffim
==========================

.. toctree linking to the basic overview of the package
.. toctree::
:maxdepth: 1

.. toctree::
:maxdepth: 1

overview_ipdiffim
AL_implementation


.. _lsst.ip.diffim-using:

Expand All @@ -15,14 +34,47 @@ Using lsst.ip.diffim

.. toctree linking to topics related to using the module's APIs.
.. toctree::
.. toctree
:maxdepth: 1
.. toctree::
.. toctree
:maxdepth: 1
code_notes
AL_implementation
Production pipelines
--------------------

This package is used in production pipelines like ``lsst.ap.pipe`` and ``lsst.drp.pipe``, designed for processing large collections of survey data.

For an example of how the two primary `~lsst.pipe.base.PipelineTasks` in this package (`~lsst.ip.diffim.AlardLuptonSubtractTask` and `~lsst.ip.diffim.DetectAndMeasureTask`) are used in a production pipeline, see `ap_pipe/pipelines/ApPipe.yaml`.


Single frame processing
-----------------------

Single image frame usage can be carried out by importing the `~lsst.ip.diffim` as a library of tasks, as the following example shows:

.. code-block:: python
from lsst.ip.diffim import subtractImages
...
subtract_task = subtractImages.AlardLuptonSubtractTask()
subtraction = subtract_task.run(
warped_template, science, science_source_catalog)
For source detection a similar pattern works:

.. code-block:: python
from lsst.ip.diffim import DetectAndMeasureTask
...
detect_task = DetectAndMeasureTask()
detect_and_measure = detect_and_measure_task.run(
science, subtraction.matchedTemplate, subtraction.difference)
.. _lsst.ip.diffim-contributing:

Expand Down Expand Up @@ -61,7 +113,7 @@ Configurations

.. lsst-configs::
:root: lsst.ip.diffim
:toctree: configs
:toctree: config

.. _lsst.ip.diffim-pyapi:

Expand Down
Loading

0 comments on commit 2d2d4af

Please sign in to comment.