profoundMakeSigma: Make a Sigma Map

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

View source: R/profoundUtility.R

Description

A utility function to construct a ProFit legal sigma map that can be input to profitSetupData.

Usage

1
2
3
profoundMakeSigma(image = NULL, objects = NULL, sky = 0, skyRMS = 0, readRMS = 0,
darkRMS = 0, skycut = 0, gain = 1, image_units = 'ADU', sky_units = 'ADU',
read_units = 'ADU', dark_units = 'ADU', output_units = 'ADU', plot = FALSE, ...)

Arguments

image

Numeric matrix; required, the image we want to analyse.

objects

Boolean matrix; optional, object mask where 1 is object and 0 is sky. Pixels set to 0 are interpreted as sky, and set to zero for calculating object shot-noise. If provided, this matrix *must* be the same dimensions as image.

sky

Numeric; the absolute sky level. Consider using the sky output from profoundSkyEst or profoundMakeSkyGrid. Can be a scalar (value uniformly applied to full sigma map) or a matrix matching the dimensions of image (allows values to vary per pixel). This will be subtracted off the image internally, so only provide this if the sky does need to be subtracted!

skyRMS

Numeric; the RMS of the sky. Consider using the skyRMS output from profoundSkyEst or profoundMakeSkyGrid. Can be a scalar (value uniformly applied to full sigma map) or a matrix matching the dimensions of image (allows values to vary per pixel).

readRMS

Numeric; the RMS of the read-noise. If you have estimated the sky RMS from the image directly this should not be necessary since it naturally captures this component. Can be a scalar (value uniformly applied to full sigma map) or a matrix matching the dimensions of image (allows values to vary per pixel).

darkRMS

Numeric; the RMS of the dark-current-noise. If you have estimated the sky RMS from the image directly this should not be necessary since it naturally captures this component. Can be a scalar (value uniformly applied to full sigma map) or a matrix matching the dimensions of image (allows values to vary per pixel).

skycut

How many multiples of skyRMS above the sky to start calculating shot-noise based on the gain scaling of the image. If you are missing an object mask You almost certainly do not want this to be below 0 (else you will reduce the level of the sigma map just due to fluctuations in the sky), and in practice this should probably be set in the range 1-3.

gain

Numeric; the gain (in photo-electrons per ADU). For a very rough estimate consider using the gain output from profoundGainEst. Can be a scalar (value uniformly applied to full sigma map) or a matrix matching the dimensions of image (allows values to vary per pixel).

image_units

Character; the units of the image. Must either be 'ADU' for generic astronomical data units, or 'elec' for photo-electrons.

sky_units

Character; the units of sky and skyRMS. Must either be 'ADU' for generic astronomical data units (the same type and scaling as per image), or 'elec' for photo-electrons.

read_units

Character; the units of read. Must either be 'ADU' for generic astronomical data units (the same type and scaling as per image), or 'elec' for photo-electrons.

dark_units

Character; the units of dark. Must either be 'ADU' for generic astronomical data units (the same type and scaling as per image), or 'elec' for photo-electrons.

output_units

Character; the units of the output sigma map. Must either be 'ADU' for generic astronomical data units (the same type and scaling as per image), or 'elec' for photo-electrons.

plot

Logical; should a magimage plot of the output be generated?

...

Further arguments to be passed to magimage. Only relevant is plot=TRUE.

Details

This is a simple utility function, but useful for beginners if they are unsure of how the error terms should be propagated (in short: in quadrature).

Value

Numeric matrix; a sigma map the same size as image. This should be appropriate for feeding into profitSetupData.

Author(s)

Aaron Robotham

See Also

profoundSkyEst, profoundGainEst

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
image=readFITS(system.file("extdata", 'VIKING/mystery_VIKING_Z.fits',
package="ProFound"))
profound=profoundProFound(image)

sigma_est=profoundMakeSigma(image$imDat, objects=profound$objects, sky=profound$sky,
skyRMS=profound$skyRMS)

## End(Not run)

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