LSSTApplications  18.1.0
LSSTDataManagementBasePackage
Namespaces | Functions | Variables
Magnitude.h File Reference

Utilities for converting between flux and magnitude in C++. More...

#include <cmath>

Go to the source code of this file.

Namespaces

 lsst
 A base class for image defects.
 
 lsst::utils
 

Functions

double lsst::utils::nanojanskyToABMagnitude (double flux)
 Convert a flux in nanojansky to AB magnitude. More...
 
double lsst::utils::ABMagnitudeToNanojansky (double magnitude)
 Convert an AB magnitude to a flux in nanojansky. More...
 

Variables

const double lsst::utils::referenceFlux = 1e23 * pow(10, (48.6 / -2.5)) * 1e9
 The Oke & Gunn (1983) AB magnitude reference flux, in nJy (often approximated as 3631.0). More...
 

Detailed Description

Utilities for converting between flux and magnitude in C++.

Use astropy.units ABmag and nJy for converstions in python:

import astropy.units as u
mag = (flux*u.nJy).to_value(u.ABmag)
flux = (mag*u.ABmag).to_value(u.nJy)

Definition in file Magnitude.h.