write.kinmap: Function to write a kinematic map to a fits file

Description Usage Arguments Details Value Author(s) See Also

View source: R/write.kinmap.R

Description

The function uses write.fits to write one or more components of the kinematic maps to fits files. A WCS is created if its reference point is defined through function arguments. If a configuration is given, details on the object and the template are also written to the fits header.

Usage

1
2
3
write.kinmap(x, component, outfile, na.val = 0, overwrite = FALSE,
             configuration = NULL, crval1 = NULL, crval2 = NULL,
             crpix1 = NULL, crpix2 = NULL)

Arguments

x

A kinematic map as created by fit.cube. More generally, a data frame with at least the component to be written, and coordinate vectors x$L and x$M.

component

One or more components of the kinematic map x for which fits files are to be written. If more than one, these are to be given as a vector of character strings.

outfile

The name(s) of one or more fits files that are to be created. The order corresponds to that of component. If the lengths of component and outfile are not the same, files are written, until one of the vectors is exhausted.

na.val

Numerical value to replace NA in the data.

overwrite

If TRUE, an existing file will be overwritten.

configuration

A list of configuration details on the object or the name of a configuration file. Currently the components object, data.cube, noise.cube and template.file are written to the fits header.

crval1, crval2

The world coordinates of the reference point.

crpix1, crpix2

The physical coordinates, i.e.~x$L and x$M, of the reference point.

Details

The function rotates the kinematic map so that north is along the positive y axis and east along the negative x axis in the fits file. NOTE THAT THIS MIGHT CHANGE AGAIN!

A WCS is created if the coordinates of the reference point are explicitely given. The linear matrix is implicitely assumed and correponds to that of VIMOS data reduced with VIPGI. This means that x$L increases in the north direction and x$M increases in the east direction. The pixel scale is 0.67 arcsec.

The physical coordinates x$L and x$M are in principle preserved using the keywords LTM1 and LTM2 in the fits header. They are, however, interchanged. Matching the kinematic maps to the 2D image reconstruction therefore needs a rotation.

Value

None.

Author(s)

Oliver Czoske

See Also

write.fits, fit.cube


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