IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2006, 5:29:03 PM (20 years ago)
Author:
Paul Price
Message:

Updated psFitsValidateHeader, psFitsWriteImage, psFitsWriteTable;
added psFitsHeaderFromImage, psFitsHeaderFromTable. See bug 733.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r6732 r6759  
    1 %%% $Id: psLibSDRS.tex,v 1.389 2006-03-30 03:36:41 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.390 2006-04-04 03:29:03 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    41394139\code{psFitsHeaderValidate} shall validate the supplied \code{header}
    41404140so that it is in compliance to the FITS standard for header keyword
    4141 names and types.  The contents should be changed to conform to the
    4142 FITS standard where possible by truncating names and adding (where
    4143 missing) those keywords required by FITS (e.g., \code{SIMPLE}).  If
    4144 the resulting \code{header} conforms to the FITS standard, the
    4145 function shall return \code{true}; otherwise the function shall return
     4141names and types.  This involves scanning for types that cannot be
     4142represented in FITS, and changing the keywords to conform to the FITS
     4143standard where possible by using the \code{HIERARCH} keyword.  If the
     4144resulting \code{header} conforms to the FITS standard, the function
     4145shall return \code{true}; otherwise the function shall return
    41464146\code{false}.
     4147
     4148\begin{prototype}
     4149psMetadata *psFitsHeaderFromImage(psMetadata *header, const psImage *image);
     4150psMetadata *psFitsHeaderFromTable(psMetadata *header, const psArray *table);
     4151\end{prototype}
     4152
     4153\code{psFitsHeaderFromImage} shall format the \code{header} to be
     4154appropriate for writing the \code{image}.  The function shall update
     4155the following keywords in the \code{header} on the basis of the
     4156\code{image}: \code{SIMPLE}, \code{NAXIS}, \code{NAXIS1},
     4157\code{NAXIS2}, \code{NAXIS3}, \code{BSCALE}, \code{BZERO},
     4158\code{EXTNAME}.  If the \code{header} is \code{NULL}, a new header
     4159shall be allocated and returned.  \code{psFitsHeaderFromTable} shall
     4160do similarly for \code{table}s, setting the appropriate keywords for
     4161FITS tables.
     4162
    41474163
    41484164\begin{prototype}
     
    42054221native FITS image types (\code{psU8}, \code{psS16}, \code{psS32},
    42064222\code{psF32}, \code{psF64}).  The user is expected to convert the data
    4207 type as needed with \code{psImageCopy}.  The return value must be 0
    4208 for a successful operation and 1 for an error.  If \code{extname} is
    4209 not \code{NULL}, the \code{EXTNAME} in the \code{header} shall be
    4210 updated to be \code{extname} before writing.
     4223type as needed with \code{psImageCopy}.  The function shall call
     4224\code{psFitsHeaderForImage} to obtain the correct FITS headers.  The
     4225return value must be 0 for a successful operation and 1 for an error.
    42114226
    42124227\begin{prototype}
     
    43084323\end{prototype}
    43094324Accepts a \code{psArray} of \code{psMetadata} and writes it to the end
    4310 of the file with the given \code{extname}.
     4325of the file with the given \code{extname}.  The function shall call
     4326\code{psFitsHeaderFromTable} to obtain the correct headers for writing
     4327the table.
    43114328
    43124329\begin{prototype}
Note: See TracChangeset for help on using the changeset viewer.