IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2712


Ignore:
Timestamp:
Dec 14, 2004, 9:52:24 AM (22 years ago)
Author:
eugene
Message:

fits mods

Location:
trunk/doc/pslib
Files:
2 edited

Legend:

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

    r2700 r2712  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.50 2004-12-11 02:30:17 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.51 2004-12-14 19:52:24 eugene Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    395395\item Changed names of \code{psSphereTransform} structure members to conform with ADD.
    396396\item Altered \code{psList} and \code{psListIterator} to match that in bug 249.
    397 \end{itemize}
     397\item added status element to psMetadataLookupTYPE utilities
     398\item dropped psFitsCreateExt per discussion with rdd
     399\item fixed error of psHash to psMetadata in psFitsReadHeaderSet
     400\item added psFitsWriteImage
     401\item changed psFitsWriteImageSection to psFitsUpdateImage {\bf verify}
     402\item changed psFitsWriteHeader to psFitsUpdateHeader {\bf verify}
     403\item added header entry to psFitsWriteTable
     404\item added psFitsUpdateTable
     405\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r2700 r2712  
    1 %%% $Id: psLibSDRS.tex,v 1.158 2004-12-11 02:30:23 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.159 2004-12-14 19:52:24 eugene Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    39183918functions perform the effort of casting the data to the appropriate
    39193919type.  The numerical functions shall return 0.0 if their key is not
    3920 found.
    3921 \begin{verbatim}
    3922 void *psMetadataLookupPtr(const psMetadata *md, const char *key);
    3923 psS32 psMetadataLookupS32(const psMetadata *md, const char *key);
    3924 psF64 psMetadataLookupF64(const psMetadata *md, const char *key);
     3920found.  If the pointer value of \code{status} is not \code{NULL}, it
     3921is set to reflect the success or failure of the lookup.
     3922\begin{verbatim}
     3923void *psMetadataLookupPtr(bool *status, const psMetadata *md, const char *key);
     3924psS32 psMetadataLookupS32(bool *status, const psMetadata *md, const char *key);
     3925psF64 psMetadataLookupF64(bool *status, const psMetadata *md, const char *key);
    39253926\end{verbatim}
    39263927
     
    42374238
    42384239\begin{verbatim}
    4239 int psFitsCreateExt(psFits* fits, psFitsType type, const char* name);
    4240 \end{verbatim}
    4241 
    4242 Creates a new HDU on the end of the file with the given extname and
    4243 type.  The psFits pointer is positioned to the new HDU.  \tbd{does
    4244 this write data to disk or not?}
    4245 
    4246 \begin{verbatim}
    42474240psFitsType psFitsGetExtType(psFits* fits);
    42484241\end{verbatim}
     
    42644257Load a complete set of headers from the \code{psFits} file pointer.
    42654258This function loads the headers from all extensions into a
    4266 \code{psHash}, each entry of which is a pointer to a \code{psMetadata}
    4267 structure containing the header data.  The hash keys are the
    4268 \code{EXTNAME} values for each header (with the value of \code{PHU}
    4269 for the primary header unit).  At the start of the operation, the file
    4270 pointer is rewound to the beginning of the file.  At the end, it is
    4271 positioned where it started when the function was called.
     4259\code{psMetadata} collection, each entry of which is a pointer to a
     4260\code{psMetadata} structure containing the header data.  The metadata
     4261entry names are the \code{EXTNAME} values for each header (with the
     4262value of \code{PHU} for the primary header unit).  At the start of the
     4263operation, the file pointer is rewound to the beginning of the file.
     4264At the end, it is positioned where it started when the function was
     4265called.
    42724266
    42734267\begin{verbatim}
    42744268bool psFitsWriteHeader(psMetadata *output, const psFits *fits);
     4269bool psFitsUpdateHeader(psMetadata *output, const psFits *fits);
    42754270\end{verbatim}
    42764271Write metadata into the header of a FITS image file.  The header is
     
    43004295\begin{verbatim}
    43014296bool psFitsWriteImageSection(psFits *fits, const psImage *input, psRegion region, int z);
    4302 \end{verbatim}
     4297bool psFitsUpdateImage(psFits *fits, const psImage *input, psRegion region, int z);
     4298\end{verbatim}
     4299\tbd{we have discussed this as the alternate name}
    43034300Write an image section to the open \code{psFits} file pointer.  This
    43044301operation may write a portion of an image over the existing bytes of
     
    43154312successful operation and 1 for an error.
    43164313
     4314\begin{verbatim}
     4315bool psFitsWriteImage(psFits *fits, psMetadata *header, const psImage *input, int depth);
     4316\end{verbatim}
     4317Create a new image based on the dimensions specified for the image and
     4318the requested depth.  The header and image data segments are written
     4319in the file at the current position of the \code{psFits} pointer.
     4320This function will only write images of the native FITS image types
     4321(\code{psU8}, \code{psS16}, \code{psS32}, \code{psF32}, \code{psF64}).
     4322The user is expected to convert the data type as needed with
     4323\code{psImageCopy}.  The return value must be 0 for a successful
     4324operation and 1 for an error.
     4325
    43174326\subsubsection{FITS Table I/O Functions}
    43184327
     
    43814390
    43824391\begin{verbatim}
    4383 bool psFitsWriteTable(psFits* fits, psArray* table);
     4392bool psFitsWriteTable(psFits* fits, psMetadata *header, psArray* table);
    43844393\end{verbatim}
    43854394Accepts a \code{psArray} of \code{psMetadata} and writes it to the
    43864395current HDU.  If the current HDU is not a table type, this will fail
    43874396and return FALSE.
     4397
     4398\begin{verbatim}
     4399bool psFitsUpdateTable(psFits* fits, psMetadata *header, psMetadata* data, int row);
     4400\end{verbatim}
     4401Writes the \code{psMetadata} data to a FITS table at the specified row
     4402in the current HDU.  If the current HDU is not a table type, this will
     4403fail and return FALSE. 
    43884404
    43894405\subsection{Detector and Sky Coordinates}
Note: See TracChangeset for help on using the changeset viewer.