Template Function phot::PhotConvert(double, double, double)

Function Documentation

template<PhotSystem From, PhotSystem To>
auto phot::PhotConvert(double photIn, double wl, double fluxVega) -> double

Convert a flux, specific luminosity, or magnitude to or from a Vega magnitude.

Overload of the two-argument PhotConvert(photIn, wl) above, for exactly the (From, To) pairs where one of the two is PhotSystem::Vega and the other is not (the pair (Vega, Vega) is not defined, for the same reason (Flambda, Flambda) etc. are not in the two-argument overload). Only declared here; see the specializations below.

Template Parameters:
  • From – The PhotSystem photIn is expressed in

  • To – The PhotSystem to convert photIn to

Parameters:
  • photIn – The input value, in the units/system documented by the two-argument PhotConvert(photIn, wl) overload above

  • wl – The wavelength at which photIn is evaluated, in Angstrom; see the two-argument overload above – unused here too, since the direct Flambda <-> Vega conversions need only fluxVega, but kept for a uniform signature and because chained conversions through Flambda/Fnu still need it

  • fluxVega – The filter-mean flux of Vega for the filter whose photometry is being converted, in erg/s/cm^2/Angstrom (see Filter::fluxVega()

    ) – Vega’s own zero point, unlike AB/ST’s fixed flux0AB/flux0ST, since “the Vega magnitude

    system” means different things in different filters. Unlike photIn, this is always a genuine flux (from the real, already-at-Earth Vega reference spectrum), never a specific luminosity – see PhotConvert<Flambda, Vega>’s own comment for how the two direct Flambda <-> Vega conversions account for that difference.

Returns:

photIn converted to To