R/addComment.R

Defines functions addComment

Documented in addComment

addComment <-
function(comment, headerName) {
# Add comment line card image to FITS header
#
# A. Harris 2012.10.13
    # check for valid inputs, stop otherwise
    if (!is.character(comment)) stop('*** Comment must be a string ***')
    comment <- strtrim(comment, 70)

    # modify header
    headerName <- c(headerName, sprintf('COMMENT   %-70s', comment))

    # return modified structure
    headerName
}

Try the FITSio package in your browser

Any scripts or data that you put into this service are public.

FITSio documentation built on April 4, 2021, 1:06 a.m.