closeHdr: Format and close FITS header

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

View source: R/closeHdr.R

Description

Function adds END statement and closes FITS header

Usage

1
closeHdr(headerName)

Arguments

headerName

Header card images (vector)

Details

Adds END to header and pads with spaces to length defined in FITS standard.

Value

Character vector to write to FITS file as header.

Author(s)

A. Harris

References

Hanisch et al., Astron.\ Astrophys. 376, 359-380 (2001)

http://fits.gsfc.nasa.gov/

See Also

modifyHeader, makeFITSimHdr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
X <- matrix(1:15, ncol = 3)
# extra header lines (optional)
header <- newKwv('KEYWORD', 'VALUE', 'NOTE') # initialize header
header <- addComment('Add these lines to auto-generated header', header=header)
header <- delKwv('KEYWORD', header=header)  # kill first line
header <- addKwv('test1', 'plot size', header=header)
header <- addKwv('test2', 4294.95397809807, 'number', header=header)
header <- addKwv('test3', 4.29495397809807e50, 'big number', header=header)
# make main header
header <- makeFITSimHdr(X, crpixn = c(1,1), crvaln = c(10, 100),
                        cdeltn = c(8, 2), ctypen = c("Distance", "Time"),
                        cunitn = c("Furlongs", "Fortnights"),
                        header = header)
# finish and close out header
tmp <- closeHdr(header) 

FITSio documentation built on May 29, 2017, 1:07 p.m.