prepare.spectrum: Read and prepare a one-dimensional spectrum

Description Usage Arguments Details Value Author(s) See Also

Description

Read a one-dimensional spectrum from a fits file or ASCII data table and prepare for the kinematic analysis

Usage

1
2
3
prepare.spectrum(file, config = NULL, noise = NULL, mask = NULL,
  order = 16,z = NULL, lambda.lim = NULL, normalize = FALSE,
  contsub = FALSE, contdiv = FALSE, verbose = TRUE, object = "")

Arguments

file

name of the fits file containing the spectrum. Filters are allowed, as understood by cfitsio.

config

name of a configuration file. Specifying this is enough to read in a spectrum. Parameters than can be overridden explicitely are file (configuration$spectrum), noise (configuration$noise.1d), z (configuration$z.lens), lambda.lim (configuration$lambda.spec.lim), object (configuration$object).

noise

name of a fits file containing the noise spectrum, or a noise spectrum, or a numeric vector containing the noise spectrum or a number giving the noise level

mask

a mask in any format that can be read and converted by convert.mask. Most of the time, this will be a file or data.frame with components x1 and x2 giving the left and right limits of the wavelength regions to be masked.

order

order of a polynomial fit to the continuum

z

redshift of the galaxy. Defaults to 0.

lambda.lim

wavelength range to be cut from the data cube. If NULL, use the entire range.

normalize

logical. If TRUE, the spectrum is normalized to mean of unity over the range defined by lambda.lim

contsub

logical. if TRUE a polynomial fit to the continuum will be subtracted from the spectrum

contdiv

logical. If TRUE, the spectrum will be divided by a polynomial fit to the continuum

verbose

logical. If TRUE, give some progress report.

object

an optional name of the object

Details

A one-dimensional spectrum is read from a file and returned in the form of a list. Optionally, a noise vector is added. The spectrum is deredshifted and optionally a polynomial fit to the continuum is subtracted from the spectrum. The input file can be either a fits file or an ASCII file in the format of a data table with at least columns lambda and value.

Value

a list containing the following elements:

lambda

the wavelength values of the deredshifted spectrum

value

the original values of the spectrum

noise

the estimated noise for each wavelength pixel

mask

a logical vector with TRUE for good and FALSE for bad pixels

contsub

(optional) the values of the spectrum after subtraction of a continuum fit

contdiv

(optional) the values of the spectrum after division by a continuum fit

name

the name of the input fits file

object

the name of the object

Author(s)

Oliver Czoske

See Also

prepare.template, link{prepare.cube}


oczoske/slacR documentation built on May 20, 2019, 8:23 p.m.