LBCgo.lbcregister
=================
.. py:module:: LBCgo.lbcregister
Functions
---------
.. autoapisummary::
LBCgo.lbcregister.go_sextractor
LBCgo.lbcregister.go_scamp
LBCgo.lbcregister.go_swarp
LBCgo.lbcregister.go_register
Module Contents
---------------
.. py:function:: go_sextractor(inputfile, configfile=None, paramfile=None, convfile=None, nnwfile=None, verbose=True)
Run SExtractor on a single chip image to produce a source catalog.
Detects sources and writes a FITS_LDAC catalog (``.cat``) alongside
the input file. Default configuration files are read from the LBCgo
package ``conf/`` directory.
:param inputfile: Path to the chip FITS image to process.
:type inputfile: str
:param configfile: Path to a SExtractor configuration file. If None, uses the LBCgo
default ``sextractor.lbc.conf``. Default: None
:type configfile: str or None, optional
:param paramfile: Path to a SExtractor output parameter file. If None, uses the LBCgo
default ``sextractor.lbcoutput.param``. Default: None
:type paramfile: str or None, optional
:param convfile: Path to a SExtractor convolution kernel file. If None, uses the
LBCgo default ``default.conv``. Default: None
:type convfile: str or None, optional
:param nnwfile: Path to a SExtractor neural network weights file. If None, uses the
LBCgo default ``default.nnw``. Default: None
:type nnwfile: str or None, optional
:param verbose: Print the SExtractor command and progress. Default: True
:type verbose: bool, optional
:raises RuntimeError: If SExtractor (``sex``) is not found on the system PATH.
:returns: Writes a FITS_LDAC catalog to ``.cat``.
Returns None if a required configuration file is missing.
:rtype: None
.. py:function:: go_scamp(inputfile, astrometric_catalog='GAIA-DR3', astrometric_method='exposure', num_iterations=3, configfile=None, verbose=True)
Run SCAMP to compute an astrometric solution for a chip catalog.
Matches the SExtractor FITS_LDAC catalog against an astrometric reference
catalog and writes a ``.head`` WCS solution file. SCAMP is run iteratively
with progressively tighter tolerance parameters to refine the solution.
A minimum of 2 iterations is enforced.
:param inputfile: Path to the chip FITS image or SExtractor catalog (``*.fits`` or
``*.cat``). The function converts ``.fits`` to ``.cat`` automatically.
:type inputfile: str
:param astrometric_catalog: Reference catalog for cross-matching. Common options: ``'GAIA-DR3'``,
``'GAIA-DR2'``, ``'2MASS'``, ``'USNO-B1'``. Default: ``'GAIA-DR3'``
:type astrometric_catalog: str, optional
:param astrometric_method: Mosaic type strategy passed to SCAMP. Default: ``'exposure'``
:type astrometric_method: str, optional
:param num_iterations: Number of SCAMP iterations. Fewer than 2 will be raised to 2.
Default: 3
:type num_iterations: int, optional
:param configfile: Path to a SCAMP configuration file. If None, uses the LBCgo default
``scamp.lbc.conf``. Default: None
:type configfile: str or None, optional
:param verbose: Print SCAMP commands and progress. Default: True
:type verbose: bool, optional
:raises RuntimeError: If SCAMP is not found on the system PATH.
:returns: Writes a ``.head`` WCS solution file alongside the input catalog.
:rtype: None
.. py:function:: go_swarp(inputfiles, output_filename=None, configfile=None, verbose=True)
Resample and co-add chip images using SWarp.
Reads SCAMP-produced ``.head`` WCS solutions, reprojects all input chip
images onto a common astrometric grid, and co-adds them into a single
mosaic. The output filename is derived from the ``OBJECT`` and ``FILTER``
headers of the first input file if not specified.
All input files must share the same filter; a ``ValueError`` is raised
otherwise.
:param inputfiles: Paths to chip FITS images to co-add. All must have the same filter.
:type inputfiles: list of str
:param output_filename: Output mosaic filename. If None, derived from the object name and
filter as ``