Changeset 2070
- Timestamp:
- Oct 12, 2004, 4:34:41 PM (22 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 5 edited
-
ChangeLogSDRS.tex (modified) (3 diffs)
-
Metadata.pdf (modified) ( previous)
-
Metadata.ps (modified) ( previous)
-
Metadata.sxd (modified) ( previous)
-
psLibSDRS.tex (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogSDRS.tex
r2047 r2070 1 %%% $Id: ChangeLogSDRS.tex,v 1.3 3 2004-10-11 23:43:15 price Exp $1 %%% $Id: ChangeLogSDRS.tex,v 1.34 2004-10-13 02:34:41 eugene Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 301 301 \end{itemize} 302 302 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)} 304 304 305 305 \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. 308 307 \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 311 309 \code{psImage} in response to bug 191. 312 310 \item Added \code{psTimeTable}. … … 321 319 \item Removed \code{psListRemoveNext} and \code{psListRemoveAfter}. 322 320 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 325 332 \item Moved \code{psImageReadSection} and \code{psImageWriteSection} to FITS I/O Functions section and modified names. 326 333 \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} 335 338 \item Added \code{psTimeAlloc}. 336 339 \item Adding \code{errors} to \code{psVectorStats}. -
trunk/doc/pslib/psLibSDRS.tex
r2047 r2070 1 %%% $Id: psLibSDRS.tex,v 1.13 6 2004-10-11 23:43:03 price Exp $1 %%% $Id: psLibSDRS.tex,v 1.137 2004-10-13 02:34:41 eugene Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 30 30 DR & 2004 Mar 29 & Draft \\ \hline 31 31 00 & 2004 Apr 1 & First version, sent to MHPCC \\ \hline 32 01 & 2004 May 19 & Extensive modifications, see appendix\\ \hline32 01 & 2004 May 19 & Extensive modifications, see Appendix B \\ \hline 33 33 02 & 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 34 03 & 2004 Jul 06 & \\ \hline 35 04 & 2004 Jul 13 & See Appendix B for a change log. \\ \hline 36 05 & 2004 Aug 16 & draft for start of cycle 3 \\ \hline 37 06 & 2004 Aug 19 & revision for cycle 3 \\ \hline 38 07 & 2004 Sep 07 & final for cycle 3 \\ \hline 39 08 & 2004 Oct 12 & draft for start of cycle 4 \\ 38 40 \RevisionsEnd 39 41 … … 1233 1235 PS_TYPE_C32, ///< Complex numbers consisting of floats 1234 1236 PS_TYPE_C64, ///< Complex numbers consisting of doubles 1237 PS_TYPE_BOOL ///< Boolean value 1235 1238 } psElemType; 1236 1239 \end{verbatim} … … 1386 1389 dimensionality must be 2. 1387 1390 1391 \subsection{Math Casting} 1392 1393 We define a basic data type which only contains the type information. 1394 This structure should be used to cast an unknown \code{psMath} data 1395 structure (\code{psImage}, \code{psVector}, \code{psScalar}) so the 1396 data type testing may be safely performed. 1397 1398 \begin{verbatim} 1399 typedef struct { 1400 psType type; ///< data type information 1401 } psMath; 1402 \end{verbatim} 1403 1388 1404 \subsection{Simple Arrays} 1389 1405 … … 1860 1876 psStats *psVectorStats(psStats *stats, 1861 1877 const psVector *in, 1862 const psVector *errors,1878 const psVector *errors, 1863 1879 const psVector *mask, 1864 1880 unsigned int maskVal 1865 );1881 ); 1866 1882 \end{verbatim} 1867 1883 % … … 3662 3678 \begin{verbatim} 3663 3679 typedef struct { 3664 const int id;///< unique ID for this item3665 c onst char *name;///< Name of item3680 int id; ///< unique ID for this item 3681 char *name; ///< Name of item 3666 3682 psMetadataType type; ///< type of this item 3683 psElemType ptype; ///< primitive data type 3667 3684 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 3673 3691 } data; ///< value of metadata 3674 3692 char *comment; ///< optional comment ("", not NULL) 3675 psList *items; ///< list of psMetadataItems with the same name3676 3693 } psMetadataItem; 3677 3694 \end{verbatim} … … 3682 3699 given by the union \code{data}, and may be of type \code{psS32}, 3683 3700 \code{psF32}, \code{psF64}, or an arbitrary rich structure pointed at 3684 by the \code{void} pointer \code{ void}. A character string comment3701 by the \code{void} pointer \code{V}. A character string comment 3685 3702 associated with this metadata item may be stored in the element 3686 \code{comment}. The \code{type} entry specifies the type of the data3687 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 3704 type of the data being represented, given by the enumerated type 3705 \code{psMetadataType}: 3706 % 3707 \begin{verbatim} 3708 typedef 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) 3701 3718 PS_META_NTYPE ///< Number of types; must be last 3702 3719 } psMetadataType; 3703 3720 \end{verbatim} 3721 If the data is a PSLib primitive data value, the primitive data type 3722 is given by the value of \code{ptype}. 3704 3723 3705 3724 A collection of metadata is represented by the \code{psMetadata} structure: … … 3963 3982 \begin{verbatim} 3964 3983 Double F64 1.23456789 # This is a comment 3965 Float F32 0.98765 #This is a comment too3984 Float F32 0.98765 # This is a comment too 3966 3985 String STR This is the string that forms the value #comment 3967 3986 … … 3983 4002 than the above example, but PSLib must be able to parse such ugly 3984 4003 files. 4004 4005 We extend \code{psMetadataParseConfig} to allow a modest tree 4006 structure by defining a reserved keyword \code{TYPE}. Any line in the 4007 config file which starts with the word \code{TYPE} shall be 4008 interpretted as defining a new valid type. The defined type name 4009 follows the word \code{TYPE}, and is in turn followed by an arbitrary 4010 number of words. These words are to be interpreted as the names of an 4011 embedded \code{psMetadata} entry, where the values are given on any 4012 line which (following the \code{TYPE} definition) employs the new type 4013 name. For example, a new type may be defined as: 4014 \begin{verbatim} 4015 TYPE CELL EXTNAME BIASSEC CHIP 4016 CELL.00 CELL CCD00 BSEC-00 CHIP.00 4017 CELL.01 CELL CCD01 BSEC-01 CHIP.00 4018 \end{verbatim} 4019 4020 When \code{psMetadataParseConfig} encounters the \code{TYPE} line, it 4021 should construct a \code{psMetadata} container and fill it with 4022 \code{psMetadataItems} having the names \code{EXTNAME, BIASSEC, CHIP}, 4023 with type \code{PS_META_STR}, but data allocated. When it next 4024 encounters an entry of type \code{CELL}, it should then use the given 4025 name (e.g., \code{CELL.00}) for the \code{psMetadataItem}, and copy 4026 the \code{psMetadata} data onto the \code{psMetadataItem.data.md} 4027 entry, filling in the values from the rest of the line (\code{CCD00, 4028 BSEC-00, CHIP.00}). This hierarchical structure is illustrated in 4029 Figure~\ref{fig:metadata}. 3985 4030 3986 4031 A BNF-like grammar of the configuration file is contained in … … 4039 4084 \begin{verbatim} 4040 4085 bool psFitsWriteHeader(psMetadata *output, const char *filename); 4041 bool psFits ReadHeaderPtr(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 t he header and data must agree for the file to be valid...}4086 bool psFitsWriteHeaderPtr(psMetadata *output, const psFits *fd); 4087 \end{verbatim} 4088 Write metadata into the header of a FITS image file. The header is 4089 written to the end of the given file. \tbd{Allow for overwriting a 4090 specific header? dangerous in anycase: the header and data must agree 4091 for the file to be valid...} \tbd{consistency check?} \tbd{function 4092 to remove non-FITS header entries?} 4048 4093 4049 4094 \subsubsection{FITS Image I/O Functions}
Note:
See TracChangeset
for help on using the changeset viewer.
