Skip to content

Commit

Permalink
Update makeLinearizer.py docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
czwa committed Mar 5, 2021
1 parent 9085026 commit 725f3a8
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions decam/makeLinearizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,40 @@
def makeLinearizerDecam(fromFile, force=False, verbose=False):
"""Convert the specified DECam linearity FITS table to standard LSST format
Details:
- Input format is one table per CCD, HDU is amplifier number,
the table has 3 columns: ADU, ADU_LINEAR_A, ADU_LINEAR_B.
The values of ADU contiguous (0, 1, 2...) but check and error out if not.
The values of the latter two are replacements (0+delta0, 1+delta1, 2+delta2...)
and this is converted to offsets for the LSST linearization tables (delta0, delta1, delta2...)
- Output is a set of LinearizeLookupTable instances, one per CCD, saved as dataset type "linearizer"
- The row indices for the linearization lookup table are (row index=amp name): 0=A, 1=B
@param[in] fromFile path to DECam linearity table (a FITS file with one HDU per amplifier)
Parameters
----------
fromFile : `str`
Filename to read linearity data from.
force : `bool`, optional
Overwrite existing outputs?
verbose : `bool`, optional
Control message verbosity.
Raises
------
RuntimeError :
Raised if the ADU values are not contiguous.
Notes
-----
This script generates LSST linearity stand-alone LookupTables, as
well as middleware gen-3 `ip_isr` Linearizers. These products are
written to ``DecamMapper.getLinearizerDir()`` for gen2 products,
and to ${OBS_DECAM_DIR}/decam/calib/linearizer/ for gen3 products.
The input file format is one table per CCD, with the HDU indexed
by amplifier number. Each table has 3 columns: ADU, ADU_LINEAR_A,
ADU_LINEAR_B, and the values of ADU are contiguous (0, 1, 2...).
The values of the last two columns are replacements (0+delta0,
1+delta1, 2+delta2...) for each of the two amplifiers, and this is
converted to offsets for the LSST linearization tables (delta0,
delta1, delta2...). Output is a set of LinearizeLookupTable
instances, one per CCD, saved as dataset type "linearizer" - The
row indices for the linearization lookup table are (row index=amp
name): 0=A, 1=B. These linearization lookup tables are also
stored in the gen3 Linearizers, as are the appropriate row indices
and column offsets.
"""
print("Making DECam linearizers from %r" % (fromFile,))
butler = Butler(mapper=DecamMapper)
Expand Down

0 comments on commit 725f3a8

Please sign in to comment.