Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-31226: Add WCSFit task #1

Merged
merged 12 commits into from
Dec 16, 2022
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: "3.10"

- name: Install
run: pip install -r <(curl https://raw.githubusercontent.com/lsst/linting/main/requirements.txt)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.. lsst-task-topic:: lsst.drp.tasks.GbdesAstrometricFitTask

##########
GbdesAstrometricFitTask
##########

``GbdesAstrometricFitTask`` fits an astrometric solution, or world coordinate system (WCS), for a series of visits.
Sources in science images are matched with a reference catalog, which allows the fitting algorithm to break degeneracies in the astrometric model.
The fit model is a series of mappings, which can include (but are not limited to) a per-detector polynomial mapping and a per-visit polynomial mapping.
The fit is done using the `WCSFit` class from the `gbdes` package (https://github.com/lsst/gbdes/tree/lsst-dev), which is an implementation of the method described in Bernstein et al. (2017).

This task requires source catalogs for the input images, a reference catalog, and a visit summary table, which provides a starting point for the WCS fit.
The task produces the fitted WCSs, which are described in AST format and are held in `lsst.afw.table.ExposureCatalog`\s called `outputWcs`.
The task also outputs a table for debugging, `outputCatalog`, which contains the sources used in the fit, along with their residuals with the best-fit model.

.. _lsst.drp.tasks.GbdesAstrometricFitTask-summary:

Processing summary
==================

``GbdesAstrometricFitTask`` runs this sequence of operations:

#. Gathers information on the visit epochs, RAs and Decs, etc.

#. Associates sources in science images and the reference catalog to make matched objects using a friends-of-friends algorithm.

#. Uses the associated objects to fit the astrometric solution, which is a configurable sequence of mappings from the detector pixels to the sky.
This uses `WCSFit` from the `gbdes` package (https://github.com/lsst/gbdes/tree/lsst-dev).

#. Converts the internal astrometric mappings to AST format.
The output is in the form of one `lsst.afw.table.ExposureCatalog` for each visit, with a row for each detector.
The fit WCS is accessed by calling `getWCS()` on the catalog row corresponding to the desired visit and detector.

.. _lsst.drp.tasks.GbdesAstrometricFit-api:

Python API summary
==================

.. lsst-task-api-summary:: lsst.drp.tasks.GbdesAstrometricFitTask

.. _lsst.drp.tasks.GbdesAstrometricFitTask-subtasks:

Retargetable subtasks
=====================

.. lsst-task-config-subtasks:: lsst.drp.tasks.GbdesAstrometricFitTask

.. _lsst.drp.tasks.GbdesAstrometricFitTask-configs:

Configuration fields
====================

.. lsst-task-config-fields:: lsst.drp.tasks.GbdesAstrometricFitTask
1 change: 1 addition & 0 deletions python/lsst/drp/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

from .gbdesAstrometricFit import *
from .version import * # Generated by sconsUtils