IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18137 for trunk/psModules


Ignore:
Timestamp:
Jun 13, 2008, 4:16:47 PM (18 years ago)
Author:
eugene
Message:

supplying db handle to concept loading functions

Location:
trunk/psModules/src/camera
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAHeader.c

    r18031 r18137  
    1717//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    1818
    19 bool pmCellReadHeader(pmCell *cell, psFits *fits)
     19bool pmCellReadHeader(pmCell *cell, psFits *fits, psDB *db)
    2020{
    2121    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    2323
    2424    if (!cell->hdu) {
    25         return pmChipReadHeader(cell->parent, fits);
     25        return pmChipReadHeader(cell->parent, fits, db);
    2626    }
    2727    if (!pmHDUReadHeader(cell->hdu, fits)) {
     
    3030    }
    3131
    32     return pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, false, NULL);
     32    return pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, false, db);
    3333}
    3434
    3535
    36 bool pmChipReadHeader(pmChip *chip, psFits *fits)
     36bool pmChipReadHeader(pmChip *chip, psFits *fits, psDB *db)
    3737{
    3838    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    4040
    4141    if (!chip->hdu) {
    42         return pmFPAReadHeader(chip->parent, fits);
     42        return pmFPAReadHeader(chip->parent, fits, db);
    4343    }
    4444    if (!pmHDUReadHeader(chip->hdu, fits)) {
     
    4747    }
    4848
    49     if (!pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, true, NULL)) {
     49    if (!pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, true, db)) {
    5050        psError(PS_ERR_UNKNOWN, false, "Unable to read concepts for chip.\n");
    5151        return false;
     
    5656
    5757
    58 bool pmFPAReadHeader(pmFPA *fpa, psFits *fits)
     58bool pmFPAReadHeader(pmFPA *fpa, psFits *fits, psDB *db)
    5959{
    6060    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    6969    }
    7070
    71     if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, NULL)) {
     71    if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, db)) {
    7272        psError(PS_ERR_UNKNOWN, false, "Unable to read concepts for FPA.\n");
    7373        return false;
  • trunk/psModules/src/camera/pmFPAHeader.h

    r11253 r18137  
    44 *  @author Paul Price, IfA
    55 *
    6  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2007-01-24 02:54:14 $
     6 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2008-06-14 02:15:05 $
    88 *  Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    2020/// was already there.  No iteration to lower levels is performed.
    2121bool pmFPAReadHeader(pmFPA *fpa,        ///< FPA for which to read header
    22                      psFits *fits       ///< FITS file handle
     22                     psFits *fits,       ///< FITS file handle
     23                     psDB *db
    2324                    );
    2425
     
    2829/// was already there.  No iteration to lower levels is performed.
    2930bool pmChipReadHeader(pmChip *chip,     ///< Chip for which to read header
    30                       psFits *fits      ///< FITS file handle
     31                      psFits *fits,      ///< FITS file handle
     32                     psDB *db
    3133                     );
    3234
     
    3638/// was already there.  No iteration to lower levels is performed.
    3739bool pmCellReadHeader(pmCell *cell,     ///< Cell for which to read header
    38                       psFits *fits      ///< FITS file handle
     40                      psFits *fits,      ///< FITS file handle
     41                     psDB *db
    3942                     );
    4043/// @}
  • trunk/psModules/src/camera/pmFPARead.c

    r18030 r18137  
    8181// In the process, reads the header and concepts
    8282static bool cellNumReadouts(pmCell *cell,    // Cell of interest
    83                             psFits *fits     // FITS file
     83                            psFits *fits,    // FITS file
     84                            psDB *db
    8485    )
    8586{
     
    9394        return false;
    9495    }
    95     if (!pmCellReadHeader(cell, fits)) {
     96    if (!pmCellReadHeader(cell, fits, db)) {
    9697        psError(PS_ERR_IO, false, "Unable to read header for cell!\n");
    9798        return false;
     
    228229        return false;
    229230    }
    230     int naxis3 = cellNumReadouts(cell, fits); // Number of planes
     231    int naxis3 = cellNumReadouts(cell, fits, db); // Number of planes
    231232    if (z >= naxis3) {
    232233        // No more to read
     
    415416    }
    416417
    417     int naxis3 = cellNumReadouts(cell, fits); // Number of image planes
     418    int naxis3 = cellNumReadouts(cell, fits, db); // Number of image planes
    418419    if (z >= naxis3) {
    419420        psError(PS_ERR_IO, false, "Desired image plane (%d) exceeds available number (%d).",
     
    719720// pmReadoutReadNext is maintained here (for now) to maintain backwards compatibility.
    720721// pmReadoutReadNext has been replaced by pmReadoutRead, pmReadoutReadChunk, pmReadoutMore
    721 bool pmReadoutReadNext(bool *status, pmReadout *readout, psFits *fits, int z, int numScans)
     722bool pmReadoutReadNext(bool *status, pmReadout *readout, psFits *fits, int z, int numScans, psDB *db)
    722723{
    723724    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    740741    }
    741742
    742     if (!pmCellReadHeader(cell, fits)) {
     743    if (!pmCellReadHeader(cell, fits, db)) {
    743744        psError(PS_ERR_IO, false, "Unable to read header for cell!\n");
    744745        return false;
     
    921922}
    922923
    923 int pmCellNumReadouts(pmCell *cell, psFits *fits)
     924int pmCellNumReadouts(pmCell *cell, psFits *fits, psDB *db)
    924925{
    925926    PS_ASSERT_PTR_NON_NULL(cell, false);
    926927    PS_ASSERT_FITS_NON_NULL(fits, false);
    927928
    928     return cellNumReadouts(cell, fits);
     929    return cellNumReadouts(cell, fits, db);
    929930}
    930931
  • trunk/psModules/src/camera/pmFPARead.h

    r18030 r18137  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2008-06-09 22:59:02 $
     6 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-06-14 02:15:05 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    5656                       psFits *fits,    // FITS file from which to read
    5757                       int z,           // Readout number/plane; zero-offset indexing
    58                        int numRows      // The number of rows to read
     58                       int numRows,      // The number of rows to read
     59                       psDB *db
    5960                      );
    6061
     
    6263///
    6364/// This function is type-independent (doesn't matter if you are interested in the image/mask/weight).
    64 int pmCellNumReadouts(pmCell *cell, psFits *fits);
     65int pmCellNumReadouts(pmCell *cell, psFits *fits, psDB *db);
    6566
    6667/// Read an entire cell
Note: See TracChangeset for help on using the changeset viewer.