pmFPARead.h

Go to the documentation of this file.
00001 /* @file pmFPARead.h
00002  * @brief Functions to read FPA components from a FITS file
00003  *
00004  * @author Paul Price, IfA
00005  *
00006  * @version $Revision: 1.6 $ $Name:  $
00007  * @date $Date: 2007/01/24 02:54:14 $
00008  * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
00009  */
00010 
00011 #ifndef PM_FPA_READ_H
00012 #define PM_FPA_READ_H
00013 
00014 /// @addtogroup Camera Camera Layout
00015 /// @{
00016 
00017 #include <pslib.h>
00018 #include "pmFPA.h"
00019 
00020 /// Read a readout incrementally
00021 ///
00022 /// Multiple calls to this function moves through a readout within a cell incrementally.  It is required to
00023 /// pass the readout previously acquired (or a newly-allocated one) in order to preserve state information
00024 /// (where the read is at).  Only a maximum of numRows rows are read at a time.  Returns true if pixels are
00025 /// read, and false otherwise.  To facilitate looping, no error is generated for reading a plane that doesn't
00026 /// exist.  Note that this function doesn't put pixels in the HDU.  It is therefore NOT COMPATIBLE with
00027 /// pmCellWrite, pmChipWrite, and pmFPAWrite (or any function that uses or creates an HDU for that matter).
00028 /// Use pmReadoutWriteNext to write the data that's read by this function.  This function is intended for
00029 /// reading in many readouts into memory at once (e.g., for stacking) where the input is not written out.
00030 bool pmReadoutReadNext(pmReadout *readout, // Readout into which to read
00031                        psFits *fits,    // FITS file from which to read
00032                        int z,           // Readout number/plane; zero-offset indexing
00033                        int numRows      // The number of rows to read
00034                       );
00035 
00036 /// Read an entire cell
00037 ///
00038 /// Reads the appropriate HDU, ingests concepts from the header, and portions pixels into readouts.  Pixels
00039 /// are converted to F32.
00040 bool pmCellRead(pmCell *cell,           // Cell to read into
00041                 psFits *fits,           // FITS file from which to read
00042                 psDB *db                // Database handle, for "concepts" ingest
00043                );
00044 
00045 /// Read a chip
00046 ///
00047 /// Iterates over component cells, reading each with pmCellRead.
00048 bool pmChipRead(pmChip *chip,           // Chip to read into
00049                 psFits *fits,           // FITS file from which to read
00050                 psDB *db                // Database handle, for "concepts" ingest
00051                );
00052 
00053 /// Read an FPA
00054 ///
00055 /// Iterates over component chips, reading each with pmChipRead.
00056 bool pmFPARead(pmFPA *fpa,              // FPA to read into
00057                psFits *fits,            // FITS file from which to read
00058                psDB *db                 // Database handle, for "concepts" ingest
00059               );
00060 
00061 /// Read an entire cell into the mask
00062 ///
00063 /// Same as pmCellRead, but reads into the mask element of the readouts.
00064 bool pmCellReadMask(pmCell *cell,           // Cell to read into
00065                     psFits *fits,           // FITS file from which to read
00066                     psDB *db                // Database handle, for "concepts" ingest
00067                    );
00068 
00069 /// Read an entire chip into the mask
00070 ///
00071 /// Same as pmChipRead, but reads into the mask element of the readouts.
00072 bool pmChipReadMask(pmChip *chip,           // Chip to read into
00073                     psFits *fits,           // FITS file from which to read
00074                     psDB *db                // Database handle, for "concepts" ingest
00075                    );
00076 
00077 /// Read an entire FPA into the mask
00078 ///
00079 /// Same as pmFPARead, but reads into the mask element of the readouts.
00080 bool pmFPAReadMask(pmFPA *fpa,              // FPA to read into
00081                    psFits *fits,            // FITS file from which to read
00082                    psDB *db                 // Database handle, for "concepts" ingest
00083                   );
00084 
00085 /// Read an entire cell into the weight
00086 ///
00087 /// Same as pmCellRead, but reads into the weight element of the readouts.
00088 bool pmCellReadWeight(pmCell *cell,           // Cell to read into
00089                       psFits *fits,           // FITS file from which to read
00090                       psDB *db                // Database handle, for "concepts" ingest
00091                      );
00092 
00093 /// Read an entire chip into the weight
00094 ///
00095 /// Same as pmChipRead, but reads into the weight element of the readouts.
00096 bool pmChipReadWeight(pmChip *chip,           // Chip to read into
00097                       psFits *fits,           // FITS file from which to read
00098                       psDB *db                // Database handle, for "concepts" ingest
00099                      );
00100 
00101 /// Read an entire FPA into the weight
00102 ///
00103 /// Same as pmFPARead, but reads into the weight element of the readouts.
00104 bool pmFPAReadWeight(pmFPA *fpa,              // FPA to read into
00105                      psFits *fits,            // FITS file from which to read
00106                      psDB *db                 // Database handle, for "concepts" ingest
00107                     );
00108 
00109 /// Read a FITS table into the cell
00110 ///
00111 /// Given a name, which is combined with the chip and cell to identify the extension name ("NAME_CHIP_CELL"),
00112 /// read the FITS table into the cell analysis metadata (with key being the provided name).  The header is
00113 /// also read and included in the cell analysis metadata under "name.HEADER".
00114 int pmCellReadTable(pmCell *cell,       ///< Cell for which to read table
00115                     psFits *fits,       ///< FITS file from which the table
00116                     const char *name    ///< Specifies the extension name, and target in the analysis metadata
00117                    );
00118 
00119 /// Read a FITS table into the component cells
00120 ///
00121 /// Iterates over component cells, calling pmCellReadTable.
00122 int pmChipReadTable(pmChip *chip,       ///< Cell for which to read table
00123                     psFits *fits,       ///< FITS file from which the table
00124                     const char *name    ///< Specifies the extension name, and target in the analysis metadata
00125                    );
00126 
00127 /// Read a FITS table into the component cells
00128 ///
00129 /// Iterates over component chips, calling pmChipReadTable.
00130 int pmFPAReadTable(pmFPA *fpa,          ///< Cell for which to read table
00131                    psFits *fits,        ///< FITS file from which the table
00132                    const char *name     ///< Specifies the extension name, and target in the analysis metadata
00133                   );
00134 /// @}
00135 #endif

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