IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2070


Ignore:
Timestamp:
Oct 12, 2004, 4:34:41 PM (22 years ago)
Author:
eugene
Message:

revisions for SDRS version 08

Location:
trunk/doc/pslib
Files:
5 edited

Legend:

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

    r2047 r2070  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.33 2004-10-11 23:43:15 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.34 2004-10-13 02:34:41 eugene Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    301301\end{itemize}
    302302
    303 \subsection{Changes from Revision 07 (7 September 2004) to present}
     303\subsection{Changes from Revision 07 (7 September 2004) to Revision 08 (12 October 2004)}
    304304
    305305\begin{itemize}
    306 \item Changed format of \code{psLogMsg}, following bug 189: format now
    307   has multiple lines.
     306\item Changed format of \code{psLogMsg}, following bug 189: format now has multiple lines.
    308307\item Added configuration file grammar.
    309 \item Added explanation of \code{psArray *coords} in
    310   \code{psMinimizeLMFunc}, and changed \code{psMatrix} to
     308\item Added explanation of \code{psArray *coords} in \code{psMinimizeLMFunc}, and changed \code{psMatrix} to
    311309  \code{psImage} in response to bug 191.
    312310\item Added \code{psTimeTable}.
     
    321319\item Removed \code{psListRemoveNext} and \code{psListRemoveAfter}.
    322320  Removing an item pointed to by an iterator doesn't cause an error.
    323 \item Added \code{PS_TYPE_STR} and \code{PS_TYPE_BOOL} to
    324   \code{psElemType}.
     321\item Added \code{psRectangle}
     322\item Added \code{PS_TYPE_BOOL} to \code{psElemType}.
     323\item Dropped \code{PS_TYPE_OTHER}
     324\item Replaced \code{PS_META_IMG} with \code{PS_META_MATH}
     325\item Replaced \code{PS_META_ITEM_SET} with \code{PS_META_LIST}
     326\item Added \code{psElemType} to \code{psMetadataItem} to specify primitive data types.
     327\item Cleaned up the entries in \code{psMetadataType}.
     328\item Moved the \code{psList} entry (item set, now list) to the union.
     329\item Added a \code{psMetadata} entry to the union.
     330\item Added typing contruct and hierarchy to \code{psMetadataParseConfig}
     331\item Added FITS I/O section
    325332\item Moved \code{psImageReadSection} and \code{psImageWriteSection} to FITS I/O Functions section and modified names.
    326333\item Moved \code{psMetadataReadHeader} and \code{psMetadataFReadHeader} to FITS I/O Functions section and modified names.
    327 \item added FITS I/O section
    328 \item added \code{psRectangle}
    329 \item fixed typo: \code{p_psScalar} to \code{psScalar}
    330 \item renamed psMetadata.data.void to psMetadata.data.data to be consistent with psList, psHash
    331 \item replaced \code{PS_META_IMG} with \code{PS_META_MATH}
    332 \item dropped \code{PS_TYPE_BOOL, PS_TYPE_STR, PS_TYPE_OTHER}
    333 \item require comment mark in 'multiple' metadata config entry for comments
    334 \item changed return values for \code{psMetadataParseConfig}
     334\item Fixed typo: \code{p_psScalar} to \code{psScalar}
     335\item Renamed \code{psMetadata.data.void} to \code{psMetadata.data.data} to be consistent with \code{psList}, \code{psHash}
     336\item Require comment mark in 'multiple' metadata config entry for comments
     337\item Changed return values for \code{psMetadataParseConfig}
    335338\item Added \code{psTimeAlloc}.
    336339\item Adding \code{errors} to \code{psVectorStats}.
  • trunk/doc/pslib/psLibSDRS.tex

    r2047 r2070  
    1 %%% $Id: psLibSDRS.tex,v 1.136 2004-10-11 23:43:03 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.137 2004-10-13 02:34:41 eugene Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    3030DR & 2004 Mar 29 & Draft \\ \hline
    313100 & 2004 Apr 1  & First version, sent to MHPCC \\ \hline
    32 01 & 2004 May 19 & Extensive modifications, see appendix \\ \hline
     3201 & 2004 May 19 & Extensive modifications, see Appendix B \\ \hline
    333302 & 2004 Jun 22 & Incorporation of Bugzilla PRs (up to 69) \\ \hline
    34 03 & 2004 Aug 10 & Adding convolution, splines, chebyshevs \\
    35    &             & (modified polynomials), ImageTrim for Phase 2. \\
    36    &             & Changed minimization. \\ \hline
    37 04-- & Various   & See Appendix A for a change log. \\ \hline
     3403 & 2004 Jul 06 & \\ \hline
     3504 & 2004 Jul 13 & See Appendix B for a change log. \\ \hline
     3605 & 2004 Aug 16 & draft for start of cycle 3 \\ \hline
     3706 & 2004 Aug 19 & revision for cycle 3 \\ \hline
     3807 & 2004 Sep 07 & final for cycle 3 \\ \hline
     3908 & 2004 Oct 12 & draft for start of cycle 4 \\
    3840\RevisionsEnd
    3941
     
    12331235    PS_TYPE_C32,                        ///< Complex numbers consisting of floats
    12341236    PS_TYPE_C64,                        ///< Complex numbers consisting of doubles
     1237    PS_TYPE_BOOL                        ///< Boolean value
    12351238} psElemType;
    12361239\end{verbatim}
     
    13861389dimensionality must be 2. 
    13871390
     1391\subsection{Math Casting}
     1392
     1393We define a basic data type which only contains the type information.
     1394This structure should be used to cast an unknown \code{psMath} data
     1395structure (\code{psImage}, \code{psVector}, \code{psScalar}) so the
     1396data type testing may be safely performed. 
     1397
     1398\begin{verbatim}
     1399typedef struct {
     1400    psType type;                        ///< data type information
     1401} psMath;
     1402\end{verbatim}
     1403
    13881404\subsection{Simple Arrays}
    13891405
     
    18601876psStats *psVectorStats(psStats *stats,
    18611877                       const psVector *in,
    1862                        const psVector *errors,
     1878                       const psVector *errors,
    18631879                       const psVector *mask,
    18641880                       unsigned int maskVal
    1865                        );
     1881                       );
    18661882\end{verbatim}
    18671883%
     
    36623678\begin{verbatim}
    36633679typedef struct {
    3664     const int id;                       ///< unique ID for this item
    3665     const char *name;                   ///< Name of item
     3680    int id;                             ///< unique ID for this item
     3681    char *name;                         ///< Name of item
    36663682    psMetadataType type;                ///< type of this item
     3683    psElemType ptype;                   ///< primitive data type
    36673684    const union {
    3668         bool bool;                      ///< boolean value
    3669         psS32 S32;                      ///< integer value
    3670         psF32 F32;                      ///< floating value
    3671         psF64 F64;                      ///< double value
    3672         void *data;                     ///< other type
     3685        psS32 S32;                      ///< integer data
     3686        psF32 F32;                      ///< floating-point data
     3687        psF64 F64;                      ///< double-precision data
     3688        void *V;                        ///< other type
     3689        psList *list;                   ///< psList entry
     3690        psMetadata *md;                 ///< psMetadata entry
    36733691    } data;                             ///< value of metadata
    36743692    char *comment;                      ///< optional comment ("", not NULL)
    3675     psList *items;                      ///< list of psMetadataItems with the same name
    36763693} psMetadataItem;
    36773694\end{verbatim}
     
    36823699given by the union \code{data}, and may be of type \code{psS32},
    36833700\code{psF32}, \code{psF64}, or an arbitrary rich structure pointed at
    3684 by the \code{void} pointer \code{void}.  A character string comment
     3701by the \code{void} pointer \code{V}.  A character string comment
    36853702associated with this metadata item may be stored in the element
    3686 \code{comment}. The \code{type} entry specifies the type of the data
    3687 being represented, given by the enumerated type \code{psMetadataType}:
    3688 \begin{verbatim}
    3689 typedef enum {                          ///< type of data.item is:
    3690     PS_META_ITEM_SET = 0,               ///< NULL; metadata is in psMetadataType.items
    3691     PS_META_BOOL,                       ///< bool (.bool)
    3692     PS_META_S32,                        ///< int (.S32)
    3693     PS_META_F32,                        ///< float (.F32)
    3694     PS_META_F64,                        ///< double (.F64)
    3695     PS_META_STR,                        ///< string (.data)
    3696     PS_META_MATH,                       ///< psScalar, psVector, psImage (.data)
    3697     PS_META_JPEG,                       ///< JPEG (.data)
    3698     PS_META_PNG,                        ///< PNG (.data)
    3699     PS_META_ASTROM,                     ///< astrometric coefficients (.data)
    3700     PS_META_UNKNOWN,                    ///< other (.data)
     3703\code{comment}. The \code{type} entry specifies how to interpret the
     3704type of the data being represented, given by the enumerated type
     3705\code{psMetadataType}:
     3706%
     3707\begin{verbatim}
     3708typedef enum {                          ///< type of item.data is:
     3709    PS_META_PRIMITIVE,                  ///< primitive type: use item.ptype
     3710    PS_META_LIST,                       ///< psList; use item.data.list (used for non-unique data)
     3711    PS_META_META,                       ///< psMetadata: use item.data.list
     3712    PS_META_STR,                        ///< string (item.data.V)
     3713    PS_META_MATH,                       ///< psScalar, psVector, psImage (item.data.V)
     3714    PS_META_JPEG,                       ///< JPEG (item.data)
     3715    PS_META_PNG,                        ///< PNG (item.data)
     3716    PS_META_ASTROM,                     ///< astrometric coefficients (item.data)
     3717    PS_META_UNKNOWN,                    ///< other (item.data)
    37013718    PS_META_NTYPE                       ///< Number of types; must be last
    37023719} psMetadataType;
    37033720\end{verbatim}
     3721If the data is a PSLib primitive data value, the primitive data type
     3722is given by the value of \code{ptype}.
    37043723
    37053724A collection of metadata is represented by the \code{psMetadata} structure:
     
    39633982\begin{verbatim}
    39643983Double     F64     1.23456789      # This is a comment
    3965 Float    F32 0.98765#This is a comment too
     3984Float    F32 0.98765 # This is a comment too
    39663985String  STR This is the string that forms the value #comment
    39673986
     
    39834002than the above example, but PSLib must be able to parse such ugly
    39844003files.
     4004
     4005We extend \code{psMetadataParseConfig} to allow a modest tree
     4006structure by defining a reserved keyword \code{TYPE}.  Any line in the
     4007config file which starts with the word \code{TYPE} shall be
     4008interpretted as defining a new valid type.  The defined type name
     4009follows the word \code{TYPE}, and is in turn followed by an arbitrary
     4010number of words.  These words are to be interpreted as the names of an
     4011embedded \code{psMetadata} entry, where the values are given on any
     4012line which (following the \code{TYPE} definition) employs the new type
     4013name.  For example, a new type may be defined as:
     4014\begin{verbatim}
     4015TYPE      CELL   EXTNAME   BIASSEC  CHIP
     4016CELL.00   CELL   CCD00     BSEC-00  CHIP.00
     4017CELL.01   CELL   CCD01     BSEC-01  CHIP.00
     4018\end{verbatim}
     4019
     4020When \code{psMetadataParseConfig} encounters the \code{TYPE} line, it
     4021should construct a \code{psMetadata} container and fill it with
     4022\code{psMetadataItems} having the names \code{EXTNAME, BIASSEC, CHIP},
     4023with type \code{PS_META_STR}, but data allocated.  When it next
     4024encounters an entry of type \code{CELL}, it should then use the given
     4025name (e.g., \code{CELL.00}) for the \code{psMetadataItem}, and copy
     4026the \code{psMetadata} data onto the \code{psMetadataItem.data.md}
     4027entry, filling in the values from the rest of the line (\code{CCD00,
     4028BSEC-00, CHIP.00}).  This hierarchical structure is illustrated in
     4029Figure~\ref{fig:metadata}.
    39854030
    39864031A BNF-like grammar of the configuration file is contained in
     
    40394084\begin{verbatim}
    40404085bool psFitsWriteHeader(psMetadata *output, const char *filename);
    4041 bool psFitsReadHeaderPtr(psMetadata *output, const psFits *fd);
    4042 \end{verbatim}
    4043 Write metadata into the header of a FITS image file.  \tbd{where?}
    4044 \tbd{consistency check?}  \tbd{function to remove non-FITS header
    4045 entries?}  The header is written to the end of the given file.
    4046 \tbd{Allow for overwriting a specific header? dangerous in anycase:
    4047 the header and data must agree for the file to be valid...}
     4086bool psFitsWriteHeaderPtr(psMetadata *output, const psFits *fd);
     4087\end{verbatim}
     4088Write metadata into the header of a FITS image file.  The header is
     4089written to the end of the given file.  \tbd{Allow for overwriting a
     4090specific header? dangerous in anycase: the header and data must agree
     4091for the file to be valid...}  \tbd{consistency check?}  \tbd{function
     4092to remove non-FITS header entries?}
    40484093
    40494094\subsubsection{FITS Image I/O Functions}
Note: See TracChangeset for help on using the changeset viewer.