LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.colorterms.Colorterm Class Reference

Colorterm correction for one pair of filters. More...

Inheritance diagram for lsst.pipe.tasks.colorterms.Colorterm:

Public Member Functions

def transformSource
 Transform the brightness of a source. More...
 
def transformMags
 Transform brightness. More...
 
def propagateFluxErrors
 

Static Public Attributes

tuple primary = Field(dtype=str, doc="name of primary filter")
 
tuple secondary = Field(dtype=str, doc="name of secondary filter")
 
tuple c0 = Field(dtype=float, default=0.0, doc="Constant parameter")
 
tuple c1 = Field(dtype=float, default=0.0, doc="First-order parameter")
 
tuple c2 = Field(dtype=float, default=0.0, doc="Second-order parameter")
 

Detailed Description

Colorterm correction for one pair of filters.

The transformed magnitude p' is given by p' = primary + c0 + c1*(primary - secondary) + c2*(primary - secondary)**2

To construct a Colorterm, use keyword arguments: Colorterm(primary=primaryFilterName, secondary=secondaryFilterName, c0=c0value, c1=c1Coeff, c2=c2Coeff) where c0-c2 are optional. For example (omitting c2): Colorterm(primary="g", secondary="r", c0=-0.00816446, c1=-0.08366937)

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 simplified to not require keyword arguments. (Fixing DM-2831 will also allow making a custom constructor).

Definition at line 39 of file colorterms.py.

Member Function Documentation

def lsst.pipe.tasks.colorterms.Colorterm.propagateFluxErrors (   self,
  primaryFluxErr,
  secondaryFluxErr 
)

Definition at line 80 of file colorterms.py.

80 
81  def propagateFluxErrors(self, primaryFluxErr, secondaryFluxErr):
82  return np.hypot((1 + self.c1)*primaryFluxErr, self.c1*secondaryFluxErr)
83 
def lsst.pipe.tasks.colorterms.Colorterm.transformMags (   self,
  primary,
  secondary 
)

Transform brightness.

Parameters
[in]primarybrightness in primary filter (magnitude)
[in]secondarybrightness in secondary filter (magnitude)
Returns
the transformed brightness (as a magnitude)

Definition at line 70 of file colorterms.py.

70 
71  def transformMags(self, primary, secondary):
72  """!Transform brightness
73 
74  @param[in] primary brightness in primary filter (magnitude)
75  @param[in] secondary brightness in secondary filter (magnitude)
76  @return the transformed brightness (as a magnitude)
77  """
78  color = primary - secondary
79  return primary + self.c0 + color*(self.c1 + color*self.c2)
def transformMags
Transform brightness.
Definition: colorterms.py:70
def lsst.pipe.tasks.colorterms.Colorterm.transformSource (   self,
  source 
)

Transform the brightness of a source.

Parameters
[in]sourcesource whose brightness is to be converted; must support get(filterName) (e.g. source.get("r")) method, as do afw::table::Source and dicts.
Returns
the transformed source magnitude

Definition at line 61 of file colorterms.py.

61 
62  def transformSource(self, source):
63  """!Transform the brightness of a source
64 
65  @param[in] source source whose brightness is to be converted; must support get(filterName)
66  (e.g. source.get("r")) method, as do afw::table::Source and dicts.
67  @return the transformed source magnitude
68  """
69  return self.transformMags(source.get(self.primary), source.get(self.secondary))
def transformSource
Transform the brightness of a source.
Definition: colorterms.py:61

Member Data Documentation

tuple lsst.pipe.tasks.colorterms.Colorterm.c0 = Field(dtype=float, default=0.0, doc="Constant parameter")
static

Definition at line 57 of file colorterms.py.

tuple lsst.pipe.tasks.colorterms.Colorterm.c1 = Field(dtype=float, default=0.0, doc="First-order parameter")
static

Definition at line 58 of file colorterms.py.

tuple lsst.pipe.tasks.colorterms.Colorterm.c2 = Field(dtype=float, default=0.0, doc="Second-order parameter")
static

Definition at line 59 of file colorterms.py.

tuple lsst.pipe.tasks.colorterms.Colorterm.primary = Field(dtype=str, doc="name of primary filter")
static

Definition at line 55 of file colorterms.py.

tuple lsst.pipe.tasks.colorterms.Colorterm.secondary = Field(dtype=str, doc="name of secondary filter")
static

Definition at line 56 of file colorterms.py.


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