pmFPAConstruct.h

Go to the documentation of this file.
00001 /* @file pmFPAConstruct.h
00002  * @brief Functions to create an FPA, and add data sources to it.
00003  *
00004  * @author Paul Price, IfA
00005  *
00006  * @version $Revision: 1.7 $ $Name:  $
00007  * @date $Date: 2007/01/24 03:11:19 $
00008  * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
00009  */
00010 
00011 #ifndef PM_FPA_CONSTRUCT_H
00012 #define PM_FPA_CONSTRUCT_H
00013 
00014 /// @addtogroup Camera Camera Layout
00015 /// @{
00016 
00017 #include <pslib.h>
00018 #include "pmFPA.h"
00019 #include "pmFPAview.h"
00020 
00021 /// Construct an FPA instance on the basis of a camera configuration
00022 ///
00023 /// This is the function that creates the FPA hierarchy on the basis of the camera configuration.  The "FPA"
00024 /// entry in the camera configuration specifies the chips (each of type STR) with their component cells listed
00025 /// as the corresponding values (whitespace separated).  The FPA hierarchy is created devoid of any
00026 /// input/output sources (i.e., HDUs).
00027 pmFPA *pmFPAConstruct(const psMetadata *camera ///< The camera configuration
00028                      );
00029 
00030 /// Add an (input or output) source to the focal plane hierarchy, specified by a view
00031 ///
00032 /// Given an FPA, add an HDU by specifying where it goes (i.e., by an FPAview).  The camera format
00033 /// configuration is required in order to describe how the FPA is laid out in terms of disk files.
00034 bool pmFPAAddSourceFromView(pmFPA *fpa,   ///< The FPA
00035                             const pmFPAview *phuView, ///< The view, corresponding to the PHU
00036                             const psMetadata *format ///< Format of file
00037                            );
00038 
00039 /// Add an (input or output) source to the focal plane hierarchy, specified by a (primary) header
00040 ///
00041 /// Given an FPA, add an HDU by specifying a primary header, which is used to determine the FITS file
00042 /// contents, and therefore the proper location for the HDU.  The camera format configuration is required in
00043 /// order to describe how the FPA is laid out in terms of disk files.
00044 pmFPAview *pmFPAAddSourceFromHeader(pmFPA *fpa, ///< The FPA
00045                                     psMetadata *phu, ///< Primary header of file
00046                                     const psMetadata *format ///< Format of file
00047                                    );
00048 
00049 /// Identify a source in the focal plane hierarchy, specified by a (primary) header
00050 ///
00051 /// This is the same as pmFPAAddSourceFromHeader, except the input is not added into the FPA hierarchy.
00052 /// This function serves only to identify where in the hierarchy it should go, not prepare for reading, etc.
00053 pmFPAview *pmFPAIdentifySourceFromHeader(pmFPA *fpa, psMetadata *phu, const psMetadata *format);
00054 
00055 /// Print a representation of the FPA, including its headers and concepts.
00056 ///
00057 /// This function is intended for testing and development purposes.
00058 void pmFPAPrint(FILE *fd,               ///< File descriptor to which to print
00059                 const pmFPA *fpa,       ///< FPA to print
00060                 bool header,            ///< Print headers?
00061                 bool concepts           ///< Print concepts?
00062                );
00063 
00064 /// Return the PHU level for an FPA, given the format
00065 pmFPALevel pmFPAPHULevel(const psMetadata *format);
00066 
00067 /// Return the Extensions level for an FPA, given the format
00068 pmFPALevel pmFPAExtensionsLevel(const psMetadata *format);
00069 
00070 /// @}
00071 
00072 #endif

Generated on Fri Feb 2 22:35:28 2007 for Pan-STARRS Module Library by  doxygen 1.5.1