profoundFlux2Mag: Convert between fluxes and magnitudes.

View source: R/profoundUtility.R

profoundFlux2MagR Documentation

Convert between fluxes and magnitudes.

Description

Simple functions to concert between magnitudes and flux given a certain magnitude zero-point.

Usage

profoundFlux2Mag(flux = 1, magzero = 0)
profoundMag2Flux(mag = 0, magzero = 0)
profoundFlux2SB(flux = 1, magzero = 0, pixscale = 1)
profoundSB2Flux(SB = 0, magzero = 0, pixscale = 1)

Arguments

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.

Details

These functions are here to prevent silly mistakes, but the conversion is almost trivial.

Value

profoundFlux2Mag

Returns the magnitude, where mag = -2.5 * log10(flux) + magzero)

profoundMag2Flux

Returns the flux, where flux = 10^(-0.4 * (mag - magzero))

HERE!!!

Author(s)

Aaron Robotham

See Also

profoundGainConvert

Examples

profoundFlux2Mag(1e5, 30)
profoundMag2Flux(17.5, 30)

asgr/ProFound documentation built on Feb. 10, 2024, 9:04 p.m.