IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 7, 2008, 5:16:12 PM (18 years ago)
Author:
Paul Price
Message:

Adding functions to read readouts into image/mask/weight. Reworking how readouts are read incrementally --- new functions pmReadoutReadChunk and pmReadoutMore will eventually replace pmReadoutReadNext. pmReadoutReadNext is kept for now, but I expect to retire it once I've checked that pmReadoutReadChunk and pmReadoutMore work. The idea behind having pmReadoutMore and pmReadoutReadChunk (two functions) instead of a single function is that pmReadoutMore can provide the check to see if more is desired to read, while pmReadoutReadChunk can do the work; this way the status information (was there an error reading, or was there just nothing to read) is easier. I don't believe I'm breaking anything by checking this in because I've just added new functions, but I could be wrong.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPARead.h

    r13768 r16365  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-06-12 22:22:33 $
     6 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-02-08 03:16:12 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    1515/// @{
    1616
    17 /// Read a readout incrementally
     17/// Check to see if there is more to read when reading a readout incrementally
     18bool pmReadoutMore(pmReadout *readout,  ///< Readout of interest
     19                   psFits *fits,        ///< FITS file from which to read
     20                   int z,               ///< Readout number/plane; zero-offset indexing
     21                   int numScans         ///< Number of scans (rows/cols) to read
     22    );
     23
     24/// Read a chunk of a readout.
     25///
     26/// Allows reading the readout incrementally
     27bool pmReadoutReadChunk(pmReadout *readout,  ///< Readout of interest
     28                        psFits *fits,        ///< FITS file from which to read
     29                        int z,               ///< Readout number/plane; zero-offset indexing
     30                        int numScans         ///< Number of scans (rows/cols) to read
     31    );
     32
     33/// Read the entire readout
     34bool pmReadoutRead(pmReadout *readout,  ///< Readout of interest
     35                   psFits *fits,        ///< FITS file from which to read
     36                   int z               ///< Readout number/plane; zero-offset indexing
     37    );
     38
     39/// Read a readout incrementally --- this is maintained temporarily only for backwards compatibility; it has
     40/// been replaced by pmReadoutRead, pmReadoutReadChunk and pmReadoutMore.
    1841///
    1942/// Multiple calls to this function moves through a readout within a cell incrementally.  It is required to
     
    2548/// Use pmReadoutWriteNext to write the data that's read by this function.  This function is intended for
    2649/// reading in many readouts into memory at once (e.g., for stacking) where the input is not written out.
    27 bool pmReadoutReadNext(bool *status,    // non-error exit condition?
    28                        pmReadout *readout, // Readout into which to read
     50bool pmReadoutReadNext(bool *status,    // non-error exit condition?
     51                       pmReadout *readout, // Readout into which to read
    2952                       psFits *fits,    // FITS file from which to read
    3053                       int z,           // Readout number/plane; zero-offset indexing
    3154                       int numRows      // The number of rows to read
    3255                      );
     56
     57/// Return the number of readouts within a cell
     58///
     59/// This function is type-independent (doesn't matter if you are interested in the image/mask/weight).
     60int pmCellNumReadouts(pmCell *cell, psFits *fits);
    3361
    3462/// Read an entire cell
     
    5785              );
    5886
     87// Mask functions follow
     88
     89/// Check to see if there is more to read when reading a readout incrementally into the mask
     90bool pmReadoutMoreMask(pmReadout *readout, ///< Readout of interest
     91                       psFits *fits,    ///< FITS file from which to read
     92                       int z,           ///< Readout number/plane; zero-offset indexing
     93                       int numScans     ///< Number of scans (rows/cols) to read
     94    );
     95
     96/// Read a chunk of a readout into the mask
     97///
     98/// Allows reading the readout incrementally
     99bool pmReadoutReadChunkMask(pmReadout *readout, ///< Readout of interest
     100                            psFits *fits, ///< FITS file from which to read
     101                            int z,      ///< Readout number/plane; zero-offset indexing
     102                            int numScans ///< Number of scans (rows/cols) to read
     103    );
     104
     105/// Read the entire readout into the mask
     106bool pmReadoutReadMask(pmReadout *readout, ///< Readout of interest
     107                       psFits *fits,    ///< FITS file from which to read
     108                       int z            ///< Readout number/plane; zero-offset indexing
     109    );
     110
    59111/// Read an entire cell into the mask
    60112///
    61113/// Same as pmCellRead, but reads into the mask element of the readouts.
    62 bool pmCellReadMask(pmCell *cell,           // Cell to read into
    63                     psFits *fits,           // FITS file from which to read
    64                     psDB *db                // Database handle, for "concepts" ingest
     114bool pmCellReadMask(pmCell *cell,       // Cell to read into
     115                    psFits *fits,       // FITS file from which to read
     116                    psDB *db            // Database handle, for "concepts" ingest
    65117                   );
    66118
     
    68120///
    69121/// Same as pmChipRead, but reads into the mask element of the readouts.
    70 bool pmChipReadMask(pmChip *chip,           // Chip to read into
    71                     psFits *fits,           // FITS file from which to read
    72                     psDB *db                // Database handle, for "concepts" ingest
     122bool pmChipReadMask(pmChip *chip,       // Chip to read into
     123                    psFits *fits,       // FITS file from which to read
     124                    psDB *db            // Database handle, for "concepts" ingest
    73125                   );
    74126
     
    76128///
    77129/// Same as pmFPARead, but reads into the mask element of the readouts.
    78 bool pmFPAReadMask(pmFPA *fpa,              // FPA to read into
    79                    psFits *fits,            // FITS file from which to read
    80                    psDB *db                 // Database handle, for "concepts" ingest
     130bool pmFPAReadMask(pmFPA *fpa,          // FPA to read into
     131                   psFits *fits,        // FITS file from which to read
     132                   psDB *db             // Database handle, for "concepts" ingest
    81133                  );
     134
     135// Weight functions follow
     136
     137/// Check to see if there is more to read when reading a readout incrementally into the weight
     138bool pmReadoutMoreWeight(pmReadout *readout, ///< Readout of interest
     139                         psFits *fits,  ///< FITS file from which to read
     140                         int z,         ///< Readout number/plane; zero-offset indexing
     141                         int numScans   ///< Number of scans (rows/cols) to read
     142    );
     143
     144/// Read a chunk of a readout into the weight
     145///
     146/// Allows reading the readout incrementally
     147bool pmReadoutReadChunkWeight(pmReadout *readout, ///< Readout of interest
     148                            psFits *fits, ///< FITS file from which to read
     149                            int z,      ///< Readout number/plane; zero-offset indexing
     150                            int numScans ///< Number of scans (rows/cols) to read
     151    );
     152
     153/// Read the entire readout into the weight
     154bool pmReadoutReadWeight(pmReadout *readout, ///< Readout of interest
     155                         psFits *fits,  ///< FITS file from which to read
     156                         int z          ///< Readout number/plane; zero-offset indexing
     157    );
    82158
    83159/// Read an entire cell into the weight
     
    109185/// Same as pmCellRead, but reads only the headers of the readouts.
    110186bool pmCellReadHeaderSet(pmCell *cell,           // Cell to read into
    111                         psFits *fits,           // FITS file from which to read
    112                         psDB *db                // Database handle, for "concepts" ingest
     187                        psFits *fits,           // FITS file from which to read
     188                        psDB *db                // Database handle, for "concepts" ingest
    113189    );
    114190
     
    125201/// Same as pmFPARead, but reads only the headers of the readouts.
    126202bool pmFPAReadHeaderSet(pmFPA *fpa,              // FPA to read into
    127                         psFits *fits,            // FITS file from which to read
    128                         psDB *db                 // Database handle, for "concepts" ingest
     203                        psFits *fits,            // FITS file from which to read
     204                        psDB *db                 // Database handle, for "concepts" ingest
    129205    );
    130206
Note: See TracChangeset for help on using the changeset viewer.