lsst.pipe.tasks g03fd65e4db+0970f72ed2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.colorterms.ColortermLibrary Class Reference
Inheritance diagram for lsst.pipe.tasks.colorterms.ColortermLibrary:

Public Member Functions

def getColorterm (self, physicalFilter, photoCatName, doRaise=True)
 

Static Public Attributes

 data
 

Detailed Description

A mapping of photometric reference catalog name or glob to ColortermDict

Notes
-----
This allows photometric calibration using a variety of reference catalogs.

To construct a ColortermLibrary, use keyword arguments:
ColortermLibrary(data=dataDict)
where dataDict is a Python dict of catalog_name_or_glob: ColortermDict

Examples
--------

.. code-block:: none

    ColortermLibrary(data = {
        "hsc": ColortermDict(data={
            'g': Colorterm(primary="g", secondary="g"),
            'r': Colorterm(primary="r", secondary="r"),
            ...
        }),
        "sdss": ColortermDict(data={
            'g':    Colorterm(primary="g",
                              secondary="r",
                              c0=-0.00816446,
                              c1=-0.08366937,
                              c2=-0.00726883),
            'r':    Colorterm(primary="r",
                              secondary="i",
                              c0= 0.00231810,
                              c1= 0.01284177,
                              c2=-0.03068248),
            ...
        }),
    })

This is subclass of Config. That is a bit of a hack to make it easy to store the data
in an appropriate obs package as a config override file. In the long term some other
means of persistence will be used, at which point the constructor can be made saner.

Definition at line 205 of file colorterms.py.

Member Function Documentation

◆ getColorterm()

def lsst.pipe.tasks.colorterms.ColortermLibrary.getColorterm (   self,
  physicalFilter,
  photoCatName,
  doRaise = True 
)
Get the appropriate Colorterm from the library

Use dict of color terms in the library that matches the photoCatName.
If the photoCatName exactly matches an entry in the library, that
dict is used; otherwise if the photoCatName matches a single glob (shell syntax,
e.g., "sdss-*" will match "sdss-dr8"), then that is used. If there is no
exact match and no unique match to the globs, raise an exception.

Parameters
----------
physicalFilter : `str`
    Label of physical filter to correct to.
photoCatName : `str`
    Name of photometric reference catalog from which to retrieve the data.
    This argument is not glob-expanded (but the catalog names in the library are,
    if no exact match is found).
doRaise : `bool`
    If True then raise ColortermNotFoundError if no suitable Colorterm found;
    If False then return a null Colorterm with physicalFilter as the primary and secondary filter.

Returns
-------
ctDict : `Unknown`
    The appropriate Colorterm.

Raises
------
ColortermNotFoundError
    If no suitable Colorterm found and doRaise true;
    other exceptions may be raised for unexpected errors, regardless of the value of doRaise.

Definition at line 253 of file colorterms.py.

Member Data Documentation

◆ data

lsst.pipe.tasks.colorterms.ColortermLibrary.data
static
Initial value:
= ConfigDictField(
doc="Mapping of reference catalog name (or glob) to ColortermDict",
keytype=str,
itemtype=ColortermDict,
default={},
)

Definition at line 246 of file colorterms.py.


The documentation for this class was generated from the following file: