IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3653


Ignore:
Timestamp:
Apr 4, 2005, 1:19:51 PM (21 years ago)
Author:
jhoblitt
Message:

add UTC,UT1,TAI,TT types
change "multiple symbol" declaration format to [keyword] MULTI
add Scoping Rules
add PS_META_TIME to psMetadataType

Location:
trunk/doc/pslib
Files:
2 edited

Legend:

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

    r3621 r3653  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.80 2005-04-01 04:20:31 jhoblitt Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.81 2005-04-04 23:19:51 jhoblitt Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    521521\end{itemize}
    522522
    523 \item Restrictions on the use of \code{malloc}, \code{calloc}, \code{realloc}, and \code{free} should not be unintentional imposed on 3rd party code.
    524 \item Added database support for ``auto-incrementing''
    525 \end{itemize}
     523\item Restrictions on the use of \code{malloc}, \code{calloc}, \code{realloc}, and \code{free} should not be unintentionaly imposed on 3rd party code.
     524\item Add database support for ``auto-incrementing''
     525\item Changes to Configuration Files:
     526\begin{itemize}
     527\item Add \code{UTC,UT1,TAI,TT} types
     528\item Change ``multiple symbol'' declaration format to \code{[keyword] MULTI}
     529\item Add Scoping Rules
     530\end{itemize}
     531\item Add \code{PS_META_TIME} to \code{psMetadataType}
     532\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r3621 r3653  
    1 %%% $Id: psLibSDRS.tex,v 1.194 2005-04-01 04:20:31 jhoblitt Exp $
     1%%% $Id: psLibSDRS.tex,v 1.195 2005-04-04 23:19:51 jhoblitt Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    36903690    PS_META_PNG,                        ///< PNG (item.data)
    36913691    PS_META_ASTROM,                     ///< astrometric coefficients (item.data)
     3692    PS_META_TIME,                       ///< psTime (item.data.V)
    36923693    PS_META_UNKNOWN,                    ///< other (item.data)
    36933694    PS_META_NTYPE                       ///< Number of types; must be last
     
    39373938On error, the function shall return \code{NULL}.
    39383939
     3940\subsubsection{Comments}
     3941
    39393942The configuration file shall consist of plain text with
    39403943key/type/value/comment quads on separate lines.  Blank lines,
     
    39483951which should not form part of the key.
    39493952
    3950 Next, to assist the casting of the value, shall be a string
    3951 identifying the type of the value, which shall correspond to one of
    3952 the simple types supported in \code{psMetadata}:
    3953 \code{STRING,BOOL,S32,F32,F64}; \code{STR} may be used to abbreviate
    3954 \code{STRING}.
     3953\subsubsection{Types}
     3954\paragraph{Scalar \& Vector}
     3955
     3956Next, to assist the casting of the value, shall be a string identifying the
     3957type of the value, which shall correspond to one of the simple types supported
     3958in \code{psMetadata}: \code{STRING,BOOL,S32,F32,F64}; \code{STR} may be used to
     3959abbreviate \code{STRING}; valid time type are \code{UTC,UT1,TAI,TT}.
    39553960
    39563961\tbd{May, in the future, require more types, including U8,S16,C64,
    39573962which will also necessitate updating the definition of psMetadata.}
    39583963
    3959 The value shall follow the type: strings may consist of multiple
    3960 words, and shall have all leading and trailing whitespace removed;
    3961 booleans shall simply be either \code{T} or \code{F}.
     3964The value shall follow the type: strings may consist of multiple words, and
     3965shall have all leading and trailing whitespace removed; booleans shall simply
     3966be either \code{T} or \code{F}.  Time type values will be in the ISO8601
     3967compatible format of "YYYY-MM-DDTHH:MM:SS,sZ".  When parsed, time types shall
     3968be represented as a \code{psTime} object.
    39623969
    39633970Following the value may be an optional comment, preceded by a comment
     
    39843991  1.23+4.56i in the future.}
    39853992
    3986 An additional hurdle is the specification of keys that may be
    3987 non-unique (such as the \code{COMMENT} keyword in a FITS header).
    3988 These keys shall be specified in the configuration file as non-unique
    3989 by specifying the key at the start of the line (possibly preceded by
    3990 whitespace) and specifying the type as a ``multiple symbol'', which we
    3991 choose to be an asterisk, \code{*}.  No other data may be provided on
    3992 this line, though a comment, preceeded by the comment marker, is
    3993 valid.  A warning shall be produced when a key which has not been
    3994 specified to be non-unique is repeated; in this case, the former value
    3995 shall be overwritten if \code{overwrite} is \code{true}, otherwise the
    3996 line shall be ignored and counted as one that could not be parsed.
     3993\tbd{May add null, Not-a-Number (NaN), denormalized, underflow, overflow,
     3994and/or +/-infinity values for selected types.}
     3995
     3996\paragraph{MULTI}
     3997
     3998An additional hurdle is the specification of keys that may be non-unique (such
     3999as the \code{COMMENT} keyword in a FITS header).  These keys shall be specified
     4000in the configuration file as non-unique with a \code{MULTI} declaration.  In
     4001the form \code{[keyword] MULTI}.  No other data may be provided on this line,
     4002though a comment, preceeded by the comment marker, is valid.  A warning shall
     4003be produced when a key which has not been specified to be non-unique is
     4004repeated; in this case, the former value shall be overwritten if
     4005\code{overwrite} is \code{true}, otherwise the line shall be ignored and
     4006counted as one that could not be parsed.  It should be noted that non-unique
     4007keys may be of mixed type (even the \code{TYPE} and \code{METADATA} complex
     4008types). For example:
     4009\begin{verbatim}
     4010comment     MULTI   # a comment
     4011comment     STR     some string
     4012comment     F32     1.23456
     4013comment     BOOL    T
     4014\end{verbatim}
    39974015
    39984016If a line does not conform to the rules laid out here, a warning shall
     
    40294047files.
    40304048
    4031 We extend \code{psMetadataParseConfig} to allow a modest tree
    4032 structure by defining a reserved keyword \code{TYPE}.  Any line in the
    4033 config file which starts with the word \code{TYPE} shall be
    4034 interpretted as defining a new valid type.  The defined type name
    4035 follows the word \code{TYPE}, and is in turn followed by an arbitrary
    4036 number of words.  These words are to be interpreted as the names of an
    4037 embedded \code{psMetadata} entry, where the values are given on any
    4038 line which (following the \code{TYPE} definition) employs the new type
    4039 name.  For example, a new type may be defined as:
     4049\subsubsection{Complex Types}
     4050\paragraph{TYPE}
     4051
     4052We support a modest tree structure by defining a reserved keyword \code{TYPE}.
     4053Any line in the config file which starts with the word \code{TYPE} shall be
     4054interpretted as defining a new valid type.  The defined type name follows the
     4055word \code{TYPE}, and is in turn followed by an arbitrary number of words.
     4056These words are to be interpreted as the names of an embedded \code{psMetadata}
     4057entry, where the values are given on any line which (following the \code{TYPE}
     4058definition) employs the new type name.  For example, a new type may be defined
     4059as:
    40404060\begin{verbatim}
    40414061TYPE      CELL   EXTNAME   BIASSEC  CHIP
     
    40554075Figure~\ref{fig:metadata}.
    40564076
    4057 We further extend \code{psMetadataParseConfig} to allow the definition
    4058 of a \code{psMetadata} entry using a sequence of successive lines to
    4059 define the values of the \code{psMetadataItem} entries.  The initial
    4060 line defines the new \code{psMetadata} entry and its name.  The
    4061 following lines have the same format as the other metadata config file
    4062 entries.  The sequence is terminated with a line with a single word
    4063 \code{END}.  For example, a metadata entry may be defined as:
     4077\paragraph{METADATA}
     4078
     4079Another way to form a tree-like structure is to directly define a
     4080\code{psMetadata} entry using a sequence of successive lines to define the
     4081values of the \code{psMetadataItem} entries.  The initial line defines the new
     4082\code{psMetadata} entry and its name.  The following lines have the same format
     4083as the other metadata config file entries.  The sequence is terminated with a
     4084line with a single word \code{END}.  For example, a metadata entry may be
     4085defined as:
    40644086\begin{verbatim}
    40654087CELL      METADATA
     
    40704092END
    40714093\end{verbatim}
     4094
     4095\subsubsection{Scoping Rules}
     4096
     4097A simple set of ``Scoping Rules'' are required to properly parse a
     4098configuration file.  ``Scope'' refers to the current ``level'' of
     4099\code{METADATA} that a statement appears in.  Statements that are not contained
     4100in a nested \code{METADATA} are said to be in the ``Top level scope''.  Each
     4101level of nested \code{METADATA} statements create a new ``lower level scope''.
     4102
     4103\begin{itemize}
     4104\item
     4105Variable names are unique only to the current level of scope.
     4106
     4107\item
     4108non-unique keywords (\code{MULTI}) apply only to the current scope.  i.e. They
     4109are invalid in ``higher'' or ``lower'' level scopes.
     4110
     4111\item
     4112\code{TYPE} declarations apply only to the current scope.
     4113
     4114\item
     4115\code{METADATA} declarations must begin and end in the same scope.  i.e.  They
     4116may not be declared and end in two different nested METADATA and the same
     4117depth.
     4118\end{itemize}
    40724119
    40734120A series of test inputs is contained in
Note: See TracChangeset for help on using the changeset viewer.