source.subtraction: Source Subtraction from FITS image

View source: R/source.subtraction.R

source.subtractionR Documentation

Source Subtraction from FITS image

Description

__This function is not designed to be called directly, but rather is an internal function to measure.fluxes__

Perform a subtraction of sources and/or contaminants from a FITS image.

Usage

source.subtraction(image, sfa_models, ap.lims.data.stamp,
fluxes, outputfile, outputheader, beamarea, inside.mask,
diagnostic = FALSE, verbose = FALSE, fluxmap.outputfile = "fluxmap.fits")

Arguments

image

numeric (j,k) array; the image to be used for subtraction

sfa_models

numeric length (m) list of (n,n) arrays; length (m) list of (n,n) stamps containing the apertures to be subtracted

ap.lims.data.stamp

numeric (m,4) array; limits of where the aperture stamps are to be placed, in image pixel space; [,1]=x_lo, [,2]=x_up, [,3]=y_lo, [,4]=y_up.

fluxes

numeric (m) vector; flux weights used in normalisation of apertures

outputfile

string; relative path to, and filename of, the output subtracted image

outputheader

list; the FITS header for the output image

beamarea

numeric; the beam area for the input image

inside.mask

logical (m) vector; if TRUE, then the object will be subtracted

diagnostic

logical; if TRUE, then perform diagnostic checks and outputs

verbose

logical; if TRUE, then perform verbose outputs

fluxmap.outputfile

string; relative path to, and filename of, the output fluxmap image

Details

Procedure performs a subtraction of the provided sfa_models from ‘image’. The models are normalised so that the integral of the ith model is fluxes[i]. This means that the source subtraction is only going to accurately remove all object flux (leaving only noise) in cases where the object is perfectly modeled. As this is rarely the case, the result of this source subtraction is generally the creation of ‘butterfly’ patterns. This is an indication that objects are not being modeled perfectly by the aperture-psf convolution.

Value

NULL; all output is to file

Author(s)

Angus H Wright ICRAR angus.wright@icrar.org

See Also

measure.fluxes, flux.measurements


AngusWright/LAMBDAR documentation built on May 12, 2022, 1:49 a.m.