profoundGainConvert: Convert gain between mag-zero points

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/profoundUtility.R

Description

Simple function to update the gain (electrons/ADU) when changing between magnitude zero points. These gains are what should be passed to e.g. profoundMakeSigma.

Usage

1
profoundGainConvert(gain = 1, magzero = 0, magzero_new = 0)

Arguments

gain

Numeric scalar or vector; the current gain/s in electrons/ADU.

magzero

Numeric scalar or vector; the current magnitude zero point/s.

magzero_new

Numeric scalar or vector; the new magnitude zero point/s.

Details

A simple function that is mostly here to avoid silly conversion mistakes. The conversion is calculated as: gain*10^(-0.4*(magzero_new - magzero)), where an object magnitude can be calculated from ADU flux as -2.5*log10(flux_ADU)+magzero.

Value

Numeric scalar or vector; the new gain/s.

Author(s)

Aaron Robotham

See Also

profoundMakeSigma, profoundFlux2Mag, profoundMag2Flux

Examples

1
2
#For optical survey data typically images with gain~1 have a magzero~30:
profoundGainConvert(1,30,0)

ProFound documentation built on Jan. 8, 2021, 5:37 p.m.