profoundGainConvert: Convert gain between mag-zero points

View source: R/profoundUtility.R

profoundGainConvertR Documentation

Convert gain between mag-zero points

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

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

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

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