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 | Private Attributes | List of all members
lsst::afw::image::Color Class Reference

#include <Color.h>

Public Member Functions

 Color (double g_r=std::numeric_limits< double >::quiet_NaN())
 
bool isIndeterminate () const
 Whether the color is the special value that indicates that it is unspecified. More...
 
double getLambdaEff (Filter const &) const
 
bool operator== (Color const &other) const
 
bool operator!= (Color const &other) const
 

Private Attributes

double _g_r
 

Detailed Description

Describe the colour of a source

We need a concept of colour more general than "g - r" in order to calculate e.g. atmospheric dispersion or a source's PSF

Note
This is very much just a place holder until we work out what we need. A full SED may be required, in which case a constructor from an SED name might be appropriate, or a couple of colours, or ...

Definition at line 28 of file Color.h.

Constructor & Destructor Documentation

lsst::afw::image::Color::Color ( double  g_r = std::numeric_limits<double>::quiet_NaN())
inlineexplicit

Definition at line 30 of file Color.h.

30 : _g_r(g_r) {}

Member Function Documentation

double lsst::afw::image::Color::getLambdaEff ( Filter const &  ) const
inline

Return the effective wavelength for this object in the given filter

Definition at line 54 of file Color.h.

55  { return 1000*_g_r; }
bool lsst::afw::image::Color::isIndeterminate ( ) const
inline

Whether the color is the special value that indicates that it is unspecified.

Definition at line 33 of file Color.h.

33 { return utils::isnan(_g_r); }
int isnan(T t)
Definition: ieee.h:110
bool lsst::afw::image::Color::operator!= ( Color const &  other) const
inline

Equality comparison for colors

Just a placeholder like everything else, but we explicitly let indeterminate colors compare as equal.

In the future, we'll probably want some way of doing fuzzy comparisons on colors, but then we'd have to define some kind of "color difference" matric, and it's not worthwhile doing that yet.

Definition at line 49 of file Color.h.

49 { return !operator==(other); }
bool operator==(Color const &other) const
Definition: Color.h:46
bool lsst::afw::image::Color::operator== ( Color const &  other) const
inline

Equality comparison for colors

Just a placeholder like everything else, but we explicitly let indeterminate colors compare as equal.

In the future, we'll probably want some way of doing fuzzy comparisons on colors, but then we'd have to define some kind of "color difference" matric, and it's not worthwhile doing that yet.

Definition at line 46 of file Color.h.

46  {
47  return (isIndeterminate() && other.isIndeterminate()) || other._g_r == _g_r;
48  }
bool isIndeterminate() const
Whether the color is the special value that indicates that it is unspecified.
Definition: Color.h:33

Member Data Documentation

double lsst::afw::image::Color::_g_r
private

Definition at line 57 of file Color.h.


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