42 ndarray::Array<T, 1>
abMagFromFlux(ndarray::Array<T const, 1>
const& flux) {
43 ndarray::Array<T, 1> out = ndarray::allocate(flux.getShape());
44 for (
std::size_t ii = 0; ii < flux.getNumElements(); ++ii) {
53 ndarray::Array<T const, 1>
const& flux) {
54 if (flux.getNumElements() != fluxErr.getNumElements()) {
56 flux.getNumElements() % fluxErr.getNumElements())
59 ndarray::Array<T, 1> out = ndarray::allocate(flux.getShape());
60 for (
std::size_t ii = 0; ii < flux.getNumElements(); ++ii) {
68 ndarray::Array<T, 1>
fluxFromABMag(ndarray::Array<T const, 1>
const& mag) {
69 ndarray::Array<T, 1> out = ndarray::allocate(mag.getShape());
70 for (
std::size_t ii = 0; ii < mag.getNumElements(); ++ii) {
79 ndarray::Array<T const, 1>
const& mag) {
80 if (mag.getNumElements() != magErr.getNumElements()) {
82 mag.getNumElements() % magErr.getNumElements())
85 ndarray::Array<T, 1> out = ndarray::allocate(mag.getShape());
86 for (
std::size_t ii = 0; ii < mag.getNumElements(); ++ii) {
93 #define INSTANTIATE(TYPE) \ 94 template ndarray::Array<TYPE, 1> abMagFromFlux(ndarray::Array<TYPE const, 1> const& flux); \ 95 template ndarray::Array<TYPE, 1> abMagErrFromFluxErr(ndarray::Array<TYPE const, 1> const& fluxErr, \ 96 ndarray::Array<TYPE const, 1> const& flux); \ 97 template ndarray::Array<TYPE, 1> fluxFromABMag(ndarray::Array<TYPE const, 1> const& mag); \ 98 template ndarray::Array<TYPE, 1> fluxErrFromABMagErr(ndarray::Array<TYPE const, 1> const& magErr, \ 99 ndarray::Array<TYPE const, 1> const& mag); double fluxErrFromABMagErr(double magErr, double mag) noexcept
Compute flux error in Janskys from AB magnitude error and AB magnitude.
double abMagErrFromFluxErr(double fluxErr, double flux)
Compute AB magnitude error from flux and flux error in Janskys.
Reports attempts to exceed implementation-defined length limits for some classes. ...
double abMagFromFlux(double flux)
Compute AB magnitude from flux in Janskys.
#define INSTANTIATE(TYPE)
A base class for image defects.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
double fluxFromABMag(double mag) noexcept
Compute flux in Janskys from AB magnitude.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...