Class Color

Class Documentation

class Color

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 …

Unnamed Group

bool operator==(Color const &other) const

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.

bool operator!=(Color const &other) const

Public Functions

Color(double g_r = std::numeric_limits<double>::quiet_NaN())
Color(Color const&)
Color(Color&&)
Color &operator=(Color const&)
Color &operator=(Color&&)
~Color()
bool isIndeterminate() const

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

std::size_t hash_value() const

Return a hash of this object.

double getLambdaEff(Filter const&) const

Return the effective wavelength for this object in the given filter