View source: R/profitUtility.R
profitFlux2Mag | R Documentation |
Simple functions to concert between magnitudes and flux given a certain magnitude zero-point.
profitFlux2Mag(flux = 1, magzero = 0)
profitMag2Flux(mag = 0, magzero = 0)
profitFlux2SB(flux = 1, magzero = 0, pixscale = 1)
profitSB2Flux(SB = 0, magzero = 0, pixscale = 1)
flux |
Numeric scalar/vector; flux in ADUs given the magzero. |
mag |
Numeric scalar/vector; magnitude given the magzero. |
magzero |
Numeric scalar/vector; magnitude zero point. What this implies depends on the magnitude system being used (e.g. AB or Vega). |
SB |
Numeric scalar/vector; surface brightness in mag/asec^2. |
pixscale |
Numeric scalar/vector; the pixel scale, where pixscale=asec/pix (e.g. 0.4 for SDSS). If set to 1, then the output is in terms of pixels, otherwise it is in arcseconds. |
These functions are here to prevent silly mistakes, but the conversion is almost trivial.
profitFlux2Mag |
Returns the magnitude, where mag = -2.5 * log10(flux) + magzero |
profitMag2Flux |
Returns the flux, where flux = 10^(-0.4 * (mag - magzero)) |
profitFlux2SB |
Returns the surface brightness in mag/sq-asec, where SB = -2.5 * log10(flux) + magzero + 5 * log10(pixscale)) |
profitSB2Flux |
Returns the flux, where flux = 10^(-0.4 * (SB - 5 * log10(pixscale) - magzero)) |
Aaron Robotham
profitFlux2Mag(1e5, 30)
profitMag2Flux(17.5, 30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.