Learn R Programming

ProFound (version 1.0.1)

profoundMakeStack: Stack Images

Description

Stacks multiple images based on their signal-to-noise.

Usage

profoundMakeStack(image_list, sky_list = NULL, skyRMS_list = NULL, magzero_in = 0,
magzero_out = 0)

Arguments

image_list

List; each list element is a numeric matrix representing the image to be stacked.

sky_list

List; each list element is a numeric matrix representing the sky to be subtracted.

skyRMS_list

List; each list element is a numeric matrix representing the sky-RMS to weight the stack with.

magzero_in

Numeric vector; the input mag-zero points. If length 1 then it is assumed all input frames have the same mag-zero point.

magzero_out

Numeric scalar; the output mag-zero point desired.

Value

A list containing:

image

Numeric matrix; the variance weighted stacked image.

skyRMS

The sky RMS of the final stacked image

magzero

The mag-zero point of the stacked image.

Details

The stack is actually done based on variance weighting. In pseudo code:

stack=0 stackRMS=0 for(i in 1:length(image_list)) stack=stack+(image_list[[i]]-sky_list[[i]])/(skyRMS_list[[i]]^2) sky_stack=sky_stack+(image_list[[i]]^2)

stack=stack*sky_stack/(length(skyRMS_list)^2)

See Also

profoundProFound

Examples

Run this code
# NOT RUN {
image=readFITS(system.file("extdata", 'VIKING/mystery_VIKING_Z.fits', package="ProFound"))

stack=profoundMakeStack(list(image$imDat, image$imDat, image$imDat),
skyRMS_list = list(8,8,3))

stack$skyRMS
# }

Run the code above in your browser using DataLab