IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 17, 2008, 12:16:38 PM (18 years ago)
Author:
Paul Price
Message:

Changing use of psDB* to pmConfig* so that the database handle only has to be set up when required.

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

Legend:

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

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

    r18137 r18163  
    11/*  @file pmFPAHeader.h
    22 *  @brief Functions read FITS headers for FPA components
    3  * 
     3 *
    44 *  @author Paul Price, IfA
    5  * 
    6  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2008-06-14 02:15:05 $
     5 *
     6 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2008-06-17 22:16:38 $
    88 *  Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    2121bool pmFPAReadHeader(pmFPA *fpa,        ///< FPA for which to read header
    2222                     psFits *fits,       ///< FITS file handle
    23                      psDB *db
     23                     pmConfig *config   ///< Configuration
    2424                    );
    2525
     
    3030bool pmChipReadHeader(pmChip *chip,     ///< Chip for which to read header
    3131                      psFits *fits,      ///< FITS file handle
    32                      psDB *db
     32                     pmConfig *config   ///< Configuration
    3333                     );
    3434
     
    3939bool pmCellReadHeader(pmCell *cell,     ///< Cell for which to read header
    4040                      psFits *fits,      ///< FITS file handle
    41                      psDB *db
     41                     pmConfig *config   ///< Configuration
    4242                     );
    4343/// @}
  • trunk/psModules/src/camera/pmFPARead.c

    r18140 r18163  
    8282static bool cellNumReadouts(pmCell *cell,    // Cell of interest
    8383                            psFits *fits,    // FITS file
    84                             psDB *db
     84                            pmConfig *config // Configuration
    8585    )
    8686{
     
    9494        return false;
    9595    }
    96     if (!pmCellReadHeader(cell, fits, db)) {
     96    if (!pmCellReadHeader(cell, fits, config)) {
    9797        psError(PS_ERR_IO, false, "Unable to read header for cell!\n");
    9898        return false;
     
    143143                                  int numScans, // Number of scans to read at a time
    144144                                  fpaReadType type, // Type of image
    145                                   psDB *db // Database handle for concepts
     145                                  pmConfig *config // Configuration
    146146    )
    147147{
     
    153153
    154154    if (!pmConceptsReadCell(readout->parent, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_DATABASE,
    155                             true, db)) {
     155                            true, config)) {
    156156        psError(PS_ERR_IO, false, "Failed to read concepts for cell.");
    157157        return false;
     
    209209                        int numScans,   // Number of scans to read at a time
    210210                        fpaReadType type, // Type of image
    211                         psDB *db        // Database handle for concepts
     211                        pmConfig *config// Configuration
    212212    )
    213213{
     
    229229        return false;
    230230    }
    231     int naxis3 = cellNumReadouts(cell, fits, db); // Number of planes
     231    int naxis3 = cellNumReadouts(cell, fits, config); // Number of planes
    232232    if (z >= naxis3) {
    233233        // No more to read
     
    237237    int next;                           // Next position
    238238    int last;                           // Last position
    239     if (!readoutScanProperties(&next, &last, readout, numScans, type, db)) {
     239    if (!readoutScanProperties(&next, &last, readout, numScans, type, config)) {
    240240        psError(PS_ERR_UNKNOWN, false, "Unable to determine readout properties.");
    241241        return false;
     
    395395                             int overlap, // Number of scans (row/col) to overlap between scans
    396396                             fpaReadType type, // Type of image
    397                              psDB *db   // Database handle for concepts
     397                             pmConfig *config   // Configuration
    398398    )
    399399{
     
    416416    }
    417417
    418     int naxis3 = cellNumReadouts(cell, fits, db); // Number of image planes
     418    int naxis3 = cellNumReadouts(cell, fits, config); // Number of image planes
    419419    if (z >= naxis3) {
    420420        psError(PS_ERR_IO, false, "Desired image plane (%d) exceeds available number (%d).",
     
    425425    int next;                           // Next position
    426426    int last;                           // Last position
    427     if (!readoutScanProperties(&next, &last, readout, numScans, type, db)) {
     427    if (!readoutScanProperties(&next, &last, readout, numScans, type, config)) {
    428428        psError(PS_ERR_UNKNOWN, false, "Unable to determine readout properties.");
    429429        return false;
     
    532532static bool cellRead(pmCell *cell,      // Cell into which to read
    533533                     psFits *fits,      // FITS file from which to read
    534                      psDB *db,          // Database handle, for concepts ingest
     534                     pmConfig *config,  // Configuration
    535535                     fpaReadType type   // Type to read
    536536                    )
     
    578578
    579579    // load in the concept information for this cell
    580     if (!pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, db)) {
     580    if (!pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_DATABASE, true, config)) {
    581581        //psError(PS_ERR_UNKNOWN, false, "Failed to read concepts for cell");
    582582        //return false;
     
    653653static bool chipRead(pmChip *chip,      // Chip into which to read
    654654                     psFits *fits,      // FITS file from which to read
    655                      psDB *db,          // Database handle, for concepts ingest
     655                     pmConfig *config,  // Configuration
    656656                     fpaReadType type   // Type to read
    657657                    )
     
    664664    for (int i = 0; i < cells->n; i++) {
    665665        pmCell *cell = cells->data[i];  // The cell of interest
    666         success |= cellRead(cell, fits, db, type);
     666        success |= cellRead(cell, fits, config, type);
    667667    }
    668668    if (success) {
     
    684684static bool fpaRead(pmFPA *fpa,         // FPA into which to read
    685685                    psFits *fits,       // FITS file from which to read
    686                     psDB *db,           // Database handle, for concepts ingest
     686                    pmConfig *config,   // Configuration
    687687                    fpaReadType type    // Type to read
    688688                   )
     
    695695    for (int i = 0; i < chips->n; i++) {
    696696        pmChip *chip = chips->data[i];  // The cell of interest
    697         success |= chipRead(chip, fits, db, type);
     697        success |= chipRead(chip, fits, config, type);
    698698    }
    699699    if (success) {
     
    720720// pmReadoutReadNext is maintained here (for now) to maintain backwards compatibility.
    721721// pmReadoutReadNext has been replaced by pmReadoutRead, pmReadoutReadChunk, pmReadoutMore
    722 bool pmReadoutReadNext(bool *status, pmReadout *readout, psFits *fits, int z, int numScans, psDB *db)
     722bool pmReadoutReadNext(bool *status, pmReadout *readout, psFits *fits, int z, int numScans, pmConfig *config)
    723723{
    724724    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    741741    }
    742742
    743     if (!pmCellReadHeader(cell, fits, db)) {
     743    if (!pmCellReadHeader(cell, fits, config)) {
    744744        psError(PS_ERR_IO, false, "Unable to read header for cell!\n");
    745745        return false;
     
    896896
    897897
    898 bool pmReadoutMore(pmReadout *readout, psFits *fits, int z, int numScans, psDB *db)
     898bool pmReadoutMore(pmReadout *readout, psFits *fits, int z, int numScans, pmConfig *config)
    899899{
    900900    PS_ASSERT_PTR_NON_NULL(readout, false);
    901901    PS_ASSERT_FITS_NON_NULL(fits, false);
    902902
    903     return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_IMAGE, db);
    904 }
    905 
    906 bool pmReadoutReadChunk(pmReadout *readout, psFits *fits, int z, int numScans, int overlap, psDB *db)
     903    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_IMAGE, config);
     904}
     905
     906bool pmReadoutReadChunk(pmReadout *readout, psFits *fits, int z, int numScans, int overlap, pmConfig *config)
    907907{
    908908    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    911911    PS_ASSERT_INT_NONNEGATIVE(numScans, false);
    912912
    913     return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_IMAGE, db);
    914 }
    915 
    916 bool pmReadoutRead(pmReadout *readout, psFits *fits, int z, psDB *db)
     913    return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_IMAGE, config);
     914}
     915
     916bool pmReadoutRead(pmReadout *readout, psFits *fits, int z, pmConfig *config)
    917917{
    918918    PS_ASSERT_PTR_NON_NULL(readout, false);
    919919    PS_ASSERT_FITS_NON_NULL(fits, false);
    920920
    921     return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_IMAGE, db);
    922 }
    923 
    924 int pmCellNumReadouts(pmCell *cell, psFits *fits, psDB *db)
     921    return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_IMAGE, config);
     922}
     923
     924int pmCellNumReadouts(pmCell *cell, psFits *fits, pmConfig *config)
    925925{
    926926    PS_ASSERT_PTR_NON_NULL(cell, false);
    927927    PS_ASSERT_FITS_NON_NULL(fits, false);
    928928
    929     return cellNumReadouts(cell, fits, db);
    930 }
    931 
    932 bool pmCellRead(pmCell *cell, psFits *fits, psDB *db)
     929    return cellNumReadouts(cell, fits, config);
     930}
     931
     932bool pmCellRead(pmCell *cell, psFits *fits, pmConfig *config)
    933933{
    934934    PS_ASSERT_PTR_NON_NULL(cell, false);
    935935    PS_ASSERT_FITS_NON_NULL(fits, false);
    936936
    937     return cellRead(cell, fits, db, FPA_READ_TYPE_IMAGE);
    938 }
    939 
    940 bool pmChipRead(pmChip *chip, psFits *fits, psDB *db)
     937    return cellRead(cell, fits, config, FPA_READ_TYPE_IMAGE);
     938}
     939
     940bool pmChipRead(pmChip *chip, psFits *fits, pmConfig *config)
    941941{
    942942    PS_ASSERT_PTR_NON_NULL(chip, false);
    943943    PS_ASSERT_FITS_NON_NULL(fits, false);
    944944
    945     return chipRead(chip, fits, db, FPA_READ_TYPE_IMAGE);
    946 }
    947 
    948 bool pmFPARead(pmFPA *fpa, psFits *fits, psDB *db)
     945    return chipRead(chip, fits, config, FPA_READ_TYPE_IMAGE);
     946}
     947
     948bool pmFPARead(pmFPA *fpa, psFits *fits, pmConfig *config)
    949949{
    950950    PS_ASSERT_PTR_NON_NULL(fpa, false);
    951951    PS_ASSERT_FITS_NON_NULL(fits, false);
    952952
    953     return fpaRead(fpa, fits, db, FPA_READ_TYPE_IMAGE);
     953    return fpaRead(fpa, fits, config, FPA_READ_TYPE_IMAGE);
    954954}
    955955
     
    959959//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    960960
    961 bool pmReadoutMoreMask(pmReadout *readout, psFits *fits, int z, int numScans, psDB *db)
     961bool pmReadoutMoreMask(pmReadout *readout, psFits *fits, int z, int numScans, pmConfig *config)
    962962{
    963963    PS_ASSERT_PTR_NON_NULL(readout, false);
    964964    PS_ASSERT_FITS_NON_NULL(fits, false);
    965965
    966     return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_MASK, db);
    967 }
    968 
    969 bool pmReadoutReadChunkMask(pmReadout *readout, psFits *fits, int z, int numScans, int overlap, psDB *db)
     966    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_MASK, config);
     967}
     968
     969bool pmReadoutReadChunkMask(pmReadout *readout, psFits *fits, int z, int numScans, int overlap,
     970                            pmConfig *config)
    970971{
    971972    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    974975    PS_ASSERT_INT_NONNEGATIVE(numScans, false);
    975976
    976     return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_MASK, db);
    977 }
    978 
    979 bool pmReadoutReadMask(pmReadout *readout, psFits *fits, int z, psDB *db)
     977    return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_MASK, config);
     978}
     979
     980bool pmReadoutReadMask(pmReadout *readout, psFits *fits, int z, pmConfig *config)
    980981{
    981982    PS_ASSERT_PTR_NON_NULL(readout, false);
    982983    PS_ASSERT_FITS_NON_NULL(fits, false);
    983984
    984     return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_MASK, db);
    985 }
    986 
    987 bool pmCellReadMask(pmCell *cell, psFits *fits, psDB *db)
     985    return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_MASK, config);
     986}
     987
     988bool pmCellReadMask(pmCell *cell, psFits *fits, pmConfig *config)
    988989{
    989990    PS_ASSERT_PTR_NON_NULL(cell, false);
    990991    PS_ASSERT_FITS_NON_NULL(fits, false);
    991992
    992     return cellRead(cell, fits, db, FPA_READ_TYPE_MASK);
    993 }
    994 
    995 bool pmChipReadMask(pmChip *chip, psFits *fits, psDB *db)
     993    return cellRead(cell, fits, config, FPA_READ_TYPE_MASK);
     994}
     995
     996bool pmChipReadMask(pmChip *chip, psFits *fits, pmConfig *config)
    996997{
    997998    PS_ASSERT_PTR_NON_NULL(chip, false);
    998999    PS_ASSERT_FITS_NON_NULL(fits, false);
    9991000
    1000     return chipRead(chip, fits, db, FPA_READ_TYPE_MASK);
    1001 }
    1002 
    1003 bool pmFPAReadMask(pmFPA *fpa, psFits *fits, psDB *db)
     1001    return chipRead(chip, fits, config, FPA_READ_TYPE_MASK);
     1002}
     1003
     1004bool pmFPAReadMask(pmFPA *fpa, psFits *fits, pmConfig *config)
    10041005{
    10051006    PS_ASSERT_PTR_NON_NULL(fpa, false);
    10061007    PS_ASSERT_FITS_NON_NULL(fits, false);
    10071008
    1008     return fpaRead(fpa, fits, db, FPA_READ_TYPE_MASK);
     1009    return fpaRead(fpa, fits, config, FPA_READ_TYPE_MASK);
    10091010}
    10101011
     
    10131014//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    10141015
    1015 bool pmReadoutMoreWeight(pmReadout *readout, psFits *fits, int z, int numScans, psDB *db)
     1016bool pmReadoutMoreWeight(pmReadout *readout, psFits *fits, int z, int numScans, pmConfig *config)
    10161017{
    10171018    PS_ASSERT_PTR_NON_NULL(readout, false);
    10181019    PS_ASSERT_FITS_NON_NULL(fits, false);
    10191020
    1020     return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_WEIGHT, db);
    1021 }
    1022 
    1023 bool pmReadoutReadChunkWeight(pmReadout *readout, psFits *fits, int z, int numScans, int overlap, psDB *db)
     1021    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_WEIGHT, config);
     1022}
     1023
     1024bool pmReadoutReadChunkWeight(pmReadout *readout, psFits *fits, int z, int numScans, int overlap,
     1025                              pmConfig *config)
    10241026{
    10251027    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    10281030    PS_ASSERT_INT_NONNEGATIVE(numScans, false);
    10291031
    1030     return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_WEIGHT, db);
    1031 }
    1032 
    1033 bool pmReadoutReadWeight(pmReadout *readout, psFits *fits, int z, psDB *db)
     1032    return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_WEIGHT, config);
     1033}
     1034
     1035bool pmReadoutReadWeight(pmReadout *readout, psFits *fits, int z, pmConfig *config)
    10341036{
    10351037    PS_ASSERT_PTR_NON_NULL(readout, false);
    10361038    PS_ASSERT_FITS_NON_NULL(fits, false);
    10371039
    1038     return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_WEIGHT, db);
    1039 }
    1040 
    1041 bool pmCellReadWeight(pmCell *cell, psFits *fits, psDB *db)
     1040    return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_WEIGHT, config);
     1041}
     1042
     1043bool pmCellReadWeight(pmCell *cell, psFits *fits, pmConfig *config)
    10421044{
    10431045    PS_ASSERT_PTR_NON_NULL(cell, false);
    10441046    PS_ASSERT_FITS_NON_NULL(fits, false);
    10451047
    1046     return cellRead(cell, fits, db, FPA_READ_TYPE_WEIGHT);
    1047 }
    1048 
    1049 bool pmChipReadWeight(pmChip *chip, psFits *fits, psDB *db)
     1048    return cellRead(cell, fits, config, FPA_READ_TYPE_WEIGHT);
     1049}
     1050
     1051bool pmChipReadWeight(pmChip *chip, psFits *fits, pmConfig *config)
    10501052{
    10511053    PS_ASSERT_PTR_NON_NULL(chip, false);
    10521054    PS_ASSERT_FITS_NON_NULL(fits, false);
    10531055
    1054     return chipRead(chip, fits, db, FPA_READ_TYPE_WEIGHT);
    1055 }
    1056 
    1057 bool pmFPAReadWeight(pmFPA *fpa, psFits *fits, psDB *db)
     1056    return chipRead(chip, fits, config, FPA_READ_TYPE_WEIGHT);
     1057}
     1058
     1059bool pmFPAReadWeight(pmFPA *fpa, psFits *fits, pmConfig *config)
    10581060{
    10591061    PS_ASSERT_PTR_NON_NULL(fpa, false);
    10601062    PS_ASSERT_FITS_NON_NULL(fits, false);
    10611063
    1062     return fpaRead(fpa, fits, db, FPA_READ_TYPE_WEIGHT);
     1064    return fpaRead(fpa, fits, config, FPA_READ_TYPE_WEIGHT);
    10631065}
    10641066
     
    10671069//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    10681070
    1069 bool pmCellReadHeaderSet(pmCell *cell, psFits *fits, psDB *db)
     1071bool pmCellReadHeaderSet(pmCell *cell, psFits *fits, pmConfig *config)
    10701072{
    10711073    PS_ASSERT_PTR_NON_NULL(cell, false);
    10721074    PS_ASSERT_FITS_NON_NULL(fits, false);
    10731075
    1074     return cellRead(cell, fits, db, FPA_READ_TYPE_HEADER);
    1075 }
    1076 
    1077 bool pmChipReadHeaderSet(pmChip *chip, psFits *fits, psDB *db)
     1076    return cellRead(cell, fits, config, FPA_READ_TYPE_HEADER);
     1077}
     1078
     1079bool pmChipReadHeaderSet(pmChip *chip, psFits *fits, pmConfig *config)
    10781080{
    10791081    PS_ASSERT_PTR_NON_NULL(chip, false);
    10801082    PS_ASSERT_FITS_NON_NULL(fits, false);
    10811083
    1082     return chipRead(chip, fits, db, FPA_READ_TYPE_HEADER);
    1083 }
    1084 
    1085 bool pmFPAReadHeaderSet(pmFPA *fpa, psFits *fits, psDB *db)
     1084    return chipRead(chip, fits, config, FPA_READ_TYPE_HEADER);
     1085}
     1086
     1087bool pmFPAReadHeaderSet(pmFPA *fpa, psFits *fits, pmConfig *config)
    10861088{
    10871089    PS_ASSERT_PTR_NON_NULL(fpa, false);
    10881090    PS_ASSERT_FITS_NON_NULL(fits, false);
    10891091
    1090     return fpaRead(fpa, fits, db, FPA_READ_TYPE_HEADER);
     1092    return fpaRead(fpa, fits, config, FPA_READ_TYPE_HEADER);
    10911093}
    10921094
  • trunk/psModules/src/camera/pmFPARead.h

    r18137 r18163  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2008-06-14 02:15:05 $
     6 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-06-17 22:16:38 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    1111#ifndef PM_FPA_READ_H
    1212#define PM_FPA_READ_H
     13
     14#include <pmConfig.h>
    1315
    1416/// @addtogroup Camera Camera Layout
     
    2022                   int z,               ///< Readout number/plane; zero-offset indexing
    2123                   int numScans,        ///< Number of scans (rows/cols) to read
    22                    psDB *db             ///< Database handle for concepts
     24                   pmConfig *config     ///< Configuration
    2325    );
    2426
     
    3133                        int numScans,   ///< Number of scans (rows/cols) to read
    3234                        int overlap,    ///< Overlap between consecutive reads
    33                         psDB *db        ///< Database handle for concepts
     35                        pmConfig *config ///< Configuration
    3436    );
    3537
     
    3840                   psFits *fits,        ///< FITS file from which to read
    3941                   int z,               ///< Readout number/plane; zero-offset indexing
    40                    psDB *db             ///< Database handle for concepts
     42                   pmConfig *config     ///< Configuration
    4143    );
    4244
     
    5759                       int z,           // Readout number/plane; zero-offset indexing
    5860                       int numRows,      // The number of rows to read
    59                        psDB *db
     61                       pmConfig *config
    6062                      );
    6163
     
    6365///
    6466/// This function is type-independent (doesn't matter if you are interested in the image/mask/weight).
    65 int pmCellNumReadouts(pmCell *cell, psFits *fits, psDB *db);
     67int pmCellNumReadouts(pmCell *cell, psFits *fits, pmConfig *config);
    6668
    6769/// Read an entire cell
     
    7173bool pmCellRead(pmCell *cell,           // Cell to read into
    7274                psFits *fits,           // FITS file from which to read
    73                 psDB *db                // Database handle, for "concepts" ingest
     75                pmConfig *config        // Configuration
    7476               );
    7577
     
    7981bool pmChipRead(pmChip *chip,           // Chip to read into
    8082                psFits *fits,           // FITS file from which to read
    81                 psDB *db                // Database handle, for "concepts" ingest
     83                pmConfig *config        // Configuration
    8284               );
    8385
     
    8789bool pmFPARead(pmFPA *fpa,              // FPA to read into
    8890               psFits *fits,            // FITS file from which to read
    89                psDB *db                 // Database handle, for "concepts" ingest
     91               pmConfig *config         // Configuration
    9092              );
    9193
     
    9799                       int z,           ///< Readout number/plane; zero-offset indexing
    98100                       int numScans,    ///< Number of scans (rows/cols) to read
    99                        psDB *db         ///< Database handle for concepts
     101                       pmConfig *config ///< Configuration
    100102    );
    101103
     
    108110                            int numScans, ///< Number of scans (rows/cols) to read
    109111                            int overlap, ///< Overlap between consecutive reads
    110                             psDB *db    ///< Database handle for concepts
     112                            pmConfig *config ///< Configuration
    111113    );
    112114
     
    115117                       psFits *fits,    ///< FITS file from which to read
    116118                       int z,           ///< Readout number/plane; zero-offset indexing
    117                        psDB *db         ///< Database handle for concepts
     119                       pmConfig *config ///< Configuration
    118120    );
    119121
     
    123125bool pmCellReadMask(pmCell *cell,       // Cell to read into
    124126                    psFits *fits,       // FITS file from which to read
    125                     psDB *db            // Database handle, for "concepts" ingest
     127                    pmConfig *config    // Configuration
    126128                   );
    127129
     
    131133bool pmChipReadMask(pmChip *chip,       // Chip to read into
    132134                    psFits *fits,       // FITS file from which to read
    133                     psDB *db            // Database handle, for "concepts" ingest
     135                    pmConfig *config    // Configuration
    134136                   );
    135137
     
    139141bool pmFPAReadMask(pmFPA *fpa,          // FPA to read into
    140142                   psFits *fits,        // FITS file from which to read
    141                    psDB *db             // Database handle, for "concepts" ingest
     143                   pmConfig *config     // Configuration
    142144                  );
    143145
     
    149151                         int z,         ///< Readout number/plane; zero-offset indexing
    150152                         int numScans,  ///< Number of scans (rows/cols) to read
    151                          psDB *db       ///< Database handle for concepts
     153                         pmConfig *config ///< Configuration
    152154    );
    153155
     
    160162                              int numScans, ///< Number of scans (rows/cols) to read
    161163                              int overlap, ///< Overlap between consecutive reads
    162                               psDB *db  ///< Database handle for concepts
     164                              pmConfig *config ///< Configuration
    163165    );
    164166
     
    167169                         psFits *fits,  ///< FITS file from which to read
    168170                         int z,         ///< Readout number/plane; zero-offset indexing
    169                          psDB *db       ///< Database handle for concepts
     171                         pmConfig *config ///< Configuration
    170172    );
    171173
     
    173175///
    174176/// Same as pmCellRead, but reads into the weight element of the readouts.
    175 bool pmCellReadWeight(pmCell *cell,           // Cell to read into
    176                       psFits *fits,           // FITS file from which to read
    177                       psDB *db                // Database handle, for "concepts" ingest
     177bool pmCellReadWeight(pmCell *cell,     // Cell to read into
     178                      psFits *fits,     // FITS file from which to read
     179                      pmConfig *config  // Configuration
    178180                     );
    179181
     
    181183///
    182184/// Same as pmChipRead, but reads into the weight element of the readouts.
    183 bool pmChipReadWeight(pmChip *chip,           // Chip to read into
    184                       psFits *fits,           // FITS file from which to read
    185                       psDB *db                // Database handle, for "concepts" ingest
     185bool pmChipReadWeight(pmChip *chip,     // Chip to read into
     186                      psFits *fits,     // FITS file from which to read
     187                      pmConfig *config  // Configuration
    186188                     );
    187189
     
    189191///
    190192/// Same as pmFPARead, but reads into the weight element of the readouts.
    191 bool pmFPAReadWeight(pmFPA *fpa,              // FPA to read into
    192                      psFits *fits,            // FITS file from which to read
    193                      psDB *db                 // Database handle, for "concepts" ingest
     193bool pmFPAReadWeight(pmFPA *fpa,        // FPA to read into
     194                     psFits *fits,      // FITS file from which to read
     195                     pmConfig *config   // Configuration
    194196                    );
    195197
     
    197199///
    198200/// Same as pmCellRead, but reads only the headers of the readouts.
    199 bool pmCellReadHeaderSet(pmCell *cell,           // Cell to read into
    200                          psFits *fits,           // FITS file from which to read
    201                          psDB *db                // Database handle, for "concepts" ingest
     201bool pmCellReadHeaderSet(pmCell *cell,  // Cell to read into
     202                         psFits *fits,  // FITS file from which to read
     203                         pmConfig *config // Configuration
    202204    );
    203205
     
    205207///
    206208/// Same as pmChipRead, but reads only the headers of the readouts.
    207 bool pmChipReadHeaderSet(pmChip *chip,           // Chip to read into
    208                       psFits *fits,           // FITS file from which to read
    209                       psDB *db                // Database handle, for "concepts" ingest
     209bool pmChipReadHeaderSet(pmChip *chip,  // Chip to read into
     210                      psFits *fits,     // FITS file from which to read
     211                      pmConfig *config  // Configuration
    210212                     );
    211213
     
    213215///
    214216/// Same as pmFPARead, but reads only the headers of the readouts.
    215 bool pmFPAReadHeaderSet(pmFPA *fpa,              // FPA to read into
    216                         psFits *fits,            // FITS file from which to read
    217                         psDB *db                 // Database handle, for "concepts" ingest
     217bool pmFPAReadHeaderSet(pmFPA *fpa,     // FPA to read into
     218                        psFits *fits,   // FITS file from which to read
     219                        pmConfig *config // Configuration
    218220    );
    219221
  • trunk/psModules/src/camera/pmFPAWrite.c

    r18027 r18163  
    128128static bool cellWrite(pmCell *cell,     // Cell to write
    129129                      psFits *fits,     // FITS file to which to write
    130                       psDB *db,         // Database handle for "concepts" update
     130                      pmConfig *config, // Configuration
    131131                      bool blank,       // Write a blank PHU?
    132132                      fpaWriteType type // Type to write
     
    178178static bool chipWrite(pmChip *chip,     // Chip to write
    179179                      psFits *fits,     // FITS file to which to write
    180                       psDB *db,         // Database handle for "concepts" update
     180                      pmConfig *config, // Configuration
    181181                      bool blank,       // Write a blank PHU?
    182182                      bool recurse,     // Recurse to lower levels?
     
    228228        for (int i = 0; i < cells->n; i++) {
    229229            pmCell *cell = cells->data[i];  // The cell of interest
    230             if (!cellWrite(cell, fits, db, false, type)) {
     230            if (!cellWrite(cell, fits, config, false, type)) {
    231231                psError(PS_ERR_IO, false, "Unable to write Chip.\n");
    232232                return false;
     
    242242static bool fpaWrite(pmFPA *fpa,        // FPA to write
    243243                     psFits *fits,      // FITS file to which to write
    244                      psDB *db,          // Database handle for "concepts" update
     244                     pmConfig *config,  // Configuration
    245245                     bool blank,        // Write a blank PHU?
    246246                     bool recurse,      // Recurse to lower levels?
     
    291291        for (int i = 0; i < chips->n; i++) {
    292292            pmChip *chip = chips->data[i];  // The chip of interest
    293             if (!chipWrite(chip, fits, db, false, true, type)) {
     293            if (!chipWrite(chip, fits, config, false, true, type)) {
    294294                psError(PS_ERR_IO, false, "Unable to write FPA.\n");
    295295                return false;
     
    372372
    373373
    374 bool pmCellWrite(pmCell *cell, psFits *fits, psDB *db, bool blank)
     374bool pmCellWrite(pmCell *cell, psFits *fits, pmConfig *config, bool blank)
    375375{
    376376    PS_ASSERT_PTR_NON_NULL(cell, false);
    377377    PS_ASSERT_PTR_NON_NULL(fits, false);
    378     return cellWrite(cell, fits, db, blank, FPA_WRITE_TYPE_IMAGE);
    379 }
    380 
    381 bool pmChipWrite(pmChip *chip, psFits *fits, psDB *db, bool blank, bool recurse)
     378    return cellWrite(cell, fits, config, blank, FPA_WRITE_TYPE_IMAGE);
     379}
     380
     381bool pmChipWrite(pmChip *chip, psFits *fits, pmConfig *config, bool blank, bool recurse)
    382382{
    383383    PS_ASSERT_PTR_NON_NULL(chip, false);
    384384    PS_ASSERT_PTR_NON_NULL(fits, false);
    385     return chipWrite(chip, fits, db, blank, recurse, FPA_WRITE_TYPE_IMAGE);
    386 }
    387 
    388 bool pmFPAWrite(pmFPA *fpa, psFits *fits, psDB *db, bool blank, bool recurse)
     385    return chipWrite(chip, fits, config, blank, recurse, FPA_WRITE_TYPE_IMAGE);
     386}
     387
     388bool pmFPAWrite(pmFPA *fpa, psFits *fits, pmConfig *config, bool blank, bool recurse)
    389389{
    390390    PS_ASSERT_PTR_NON_NULL(fpa, false);
    391391    PS_ASSERT_PTR_NON_NULL(fits, false);
    392     return fpaWrite(fpa, fits, db, blank, recurse, FPA_WRITE_TYPE_IMAGE);
    393 }
    394 
    395 
    396 bool pmCellWriteMask(pmCell *cell, psFits *fits, psDB *db, bool blank)
     392    return fpaWrite(fpa, fits, config, blank, recurse, FPA_WRITE_TYPE_IMAGE);
     393}
     394
     395
     396bool pmCellWriteMask(pmCell *cell, psFits *fits, pmConfig *config, bool blank)
    397397{
    398398    PS_ASSERT_PTR_NON_NULL(cell, false);
    399399    PS_ASSERT_PTR_NON_NULL(fits, false);
    400     return cellWrite(cell, fits, db, blank, FPA_WRITE_TYPE_MASK);
    401 }
    402 
    403 bool pmChipWriteMask(pmChip *chip, psFits *fits, psDB *db, bool blank, bool recurse)
     400    return cellWrite(cell, fits, config, blank, FPA_WRITE_TYPE_MASK);
     401}
     402
     403bool pmChipWriteMask(pmChip *chip, psFits *fits, pmConfig *config, bool blank, bool recurse)
    404404{
    405405    PS_ASSERT_PTR_NON_NULL(chip, false);
    406406    PS_ASSERT_PTR_NON_NULL(fits, false);
    407     return chipWrite(chip, fits, db, blank, recurse, FPA_WRITE_TYPE_MASK);
    408 }
    409 
    410 bool pmFPAWriteMask(pmFPA *fpa, psFits *fits, psDB *db, bool blank, bool recurse)
     407    return chipWrite(chip, fits, config, blank, recurse, FPA_WRITE_TYPE_MASK);
     408}
     409
     410bool pmFPAWriteMask(pmFPA *fpa, psFits *fits, pmConfig *config, bool blank, bool recurse)
    411411{
    412412    PS_ASSERT_PTR_NON_NULL(fpa, false);
    413413    PS_ASSERT_PTR_NON_NULL(fits, false);
    414     return fpaWrite(fpa, fits, db, blank, recurse, FPA_WRITE_TYPE_MASK);
    415 }
    416 
    417 
    418 bool pmCellWriteWeight(pmCell *cell, psFits *fits, psDB *db, bool blank)
     414    return fpaWrite(fpa, fits, config, blank, recurse, FPA_WRITE_TYPE_MASK);
     415}
     416
     417
     418bool pmCellWriteWeight(pmCell *cell, psFits *fits, pmConfig *config, bool blank)
    419419{
    420420    PS_ASSERT_PTR_NON_NULL(cell, false);
    421421    PS_ASSERT_PTR_NON_NULL(fits, false);
    422     return cellWrite(cell, fits, db, blank, FPA_WRITE_TYPE_WEIGHT);
    423 }
    424 
    425 bool pmChipWriteWeight(pmChip *chip, psFits *fits, psDB *db, bool blank, bool recurse)
     422    return cellWrite(cell, fits, config, blank, FPA_WRITE_TYPE_WEIGHT);
     423}
     424
     425bool pmChipWriteWeight(pmChip *chip, psFits *fits, pmConfig *config, bool blank, bool recurse)
    426426{
    427427    PS_ASSERT_PTR_NON_NULL(chip, false);
    428428    PS_ASSERT_PTR_NON_NULL(fits, false);
    429     return chipWrite(chip, fits, db, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
    430 }
    431 
    432 bool pmFPAWriteWeight(pmFPA *fpa, psFits *fits, psDB *db, bool blank, bool recurse)
     429    return chipWrite(chip, fits, config, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
     430}
     431
     432bool pmFPAWriteWeight(pmFPA *fpa, psFits *fits, pmConfig *config, bool blank, bool recurse)
    433433{
    434434    PS_ASSERT_PTR_NON_NULL(fpa, false);
    435435    PS_ASSERT_PTR_NON_NULL(fits, false);
    436     return fpaWrite(fpa, fits, db, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
     436    return fpaWrite(fpa, fits, config, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
    437437}
    438438
  • trunk/psModules/src/camera/pmFPAWrite.h

    r12705 r18163  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-03-31 04:17:41 $
     6 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-06-17 22:16:38 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    1111#ifndef PM_FPA_WRITE_H
    1212#define PM_FPA_WRITE_H
     13
     14#include <pmConfig.h>
    1315
    1416/// @addtogroup Camera Camera Layout
     
    3234bool pmCellWrite(pmCell *cell,          ///<  Cell to write
    3335                 psFits *fits,          ///<  FITS file to which to write
    34                  psDB *db,              ///<  Database handle for "concepts" update
     36                 pmConfig *config,      ///<  Configuration
    3537                 bool blank             ///<  Write a blank PHU?
    3638                );
     
    4446bool pmChipWrite(pmChip *chip,          ///<  Chip to write
    4547                 psFits *fits,          ///<  FITS file to which to write
    46                  psDB *db,              ///<  Database handle for "concepts" update
     48                 pmConfig *config,      ///<  Configuration
    4749                 bool blank,            ///<  Write a blank PHU?
    4850                 bool recurse           ///<  Recurse to lower levels?
     
    5759bool pmFPAWrite(pmFPA *fpa,             ///<  FPA to write
    5860                psFits *fits,           ///<  FITS file to which to write
    59                 psDB *db,               ///<  Database handle for "concepts" update
     61                pmConfig *config,       ///<  Configuration
    6062                bool blank,             ///<  Write a blank PHU?
    6163                bool recurse            ///<  Recurse to lower levels?
     
    7072bool pmCellWriteMask(pmCell *cell,      ///<  Cell to write
    7173                     psFits *fits,      ///<  FITS file to which to write
    72                      psDB *db,          ///<  Database handle for "concepts" update
     74                     pmConfig *config,  ///<  Configuration
    7375                     bool blank         ///<  Write a blank PHU?
    7476                    );
     
    8385bool pmChipWriteMask(pmChip *chip,      ///<  Chip to write
    8486                     psFits *fits,      ///<  FITS file to which to write
    85                      psDB *db,          ///<  Database handle for "concepts" update
     87                     pmConfig *config,  ///<  Configuration
    8688                     bool blank,        ///<  Write a blank PHU?
    8789                     bool recurse       ///<  Recurse to lower levels?
     
    9799bool pmFPAWriteMask(pmFPA *fpa,         ///<  FPA to write
    98100                    psFits *fits,       ///<  FITS file to which to write
    99                     psDB *db,           ///<  Database handle for "concepts" update
     101                    pmConfig *config,   ///<  Configuration
    100102                    bool blank,         ///<  Write a blank PHU?
    101103                    bool recurse        ///<  Recurse to lower levels?
     
    110112bool pmCellWriteWeight(pmCell *cell,    ///<  Cell to write
    111113                       psFits *fits,    ///<  FITS file to which to write
    112                        psDB *db,        ///<  Database handle for "concepts" update
     114                       pmConfig *config, ///<  Configuration
    113115                       bool blank       ///<  Write a blank PHU?
    114116                      );
     
    123125bool pmChipWriteWeight(pmChip *chip,    ///<  Chip to write
    124126                       psFits *fits,    ///<  FITS file to which to write
    125                        psDB *db,        ///<  Database handle for "concepts" update
     127                       pmConfig *config, ///<  Configuration
    126128                       bool blank,      ///<  Write a blank PHU?
    127129                       bool recurse     ///<  Recurse to lower levels?
     
    137139bool pmFPAWriteWeight(pmFPA *fpa,       ///<  FPA to write
    138140                      psFits *fits,     ///<  FITS file to which to write
    139                       psDB *db,         ///<  Database handle for "concepts" update
     141                      pmConfig *config, ///<  Configuration
    140142                      bool blank,       ///<  Write a blank PHU?
    141143                      bool recurse      ///<  Recurse to lower levels?
  • trunk/psModules/src/camera/pmFPAfileFitsIO.c

    r18139 r18163  
    166166static bool fpaViewReadFitsImage(const pmFPAview *view, // FPA view, specifying the level of interest
    167167                                 pmFPAfile *file, // FPA file of interest
    168                                  psDB *db,
    169                                  bool (*fpaReadFunc)(pmFPA*, psFits*, psDB*), // Function to read FPA
    170                                  bool (*chipReadFunc)(pmChip*, psFits*, psDB*), // Function to read chip
    171                                  bool (*cellReadFunc)(pmCell*, psFits*, psDB*) // Function to read cell
     168                                 pmConfig *config, // Configuration
     169                                 bool (*fpaReadFunc)(pmFPA*, psFits*, pmConfig*), // Function to read FPA
     170                                 bool (*chipReadFunc)(pmChip*, psFits*, pmConfig*), // Function to read chip
     171                                 bool (*cellReadFunc)(pmCell*, psFits*, pmConfig*) // Function to read cell
    172172                                )
    173173{
     
    179179
    180180    if (view->chip == -1) {
    181         return fpaReadFunc(fpa, fits, db);
     181        return fpaReadFunc(fpa, fits, config);
    182182    }
    183183
     
    189189
    190190    if (view->cell == -1) {
    191         return chipReadFunc(chip, fits, db);
     191        return chipReadFunc(chip, fits, config);
    192192    }
    193193
     
    199199
    200200    if (view->readout == -1) {
    201         return cellReadFunc(cell, fits, db);
     201        return cellReadFunc(cell, fits, config);
    202202    }
    203203    psError(PS_ERR_UNKNOWN, true, "Bad view: %d,%d", view->chip, view->cell);
     
    215215
    216216    if (view->nRows == 0) {
    217         pmReadoutRead (readout, fits, db);
     217        pmReadoutRead (readout, fits, config);
    218218    } else {
    219219        pmReadoutReadSegment (readout, fits, view->nRows, view->iRows, NULL, NULL);
     
    228228    PS_ASSERT_PTR_NON_NULL(view, false);
    229229    PS_ASSERT_PTR_NON_NULL(file, false);
    230     return fpaViewReadFitsImage(view, file, config->database, pmFPARead, pmChipRead, pmCellRead);
     230    return fpaViewReadFitsImage(view, file, config, pmFPARead, pmChipRead, pmCellRead);
    231231}
    232232
     
    235235    PS_ASSERT_PTR_NON_NULL(view, false);
    236236    PS_ASSERT_PTR_NON_NULL(file, false);
    237     return fpaViewReadFitsImage(view, file, config->database, pmFPAReadMask, pmChipReadMask, pmCellReadMask);
     237    return fpaViewReadFitsImage(view, file, config, pmFPAReadMask, pmChipReadMask, pmCellReadMask);
    238238}
    239239
     
    242242    PS_ASSERT_PTR_NON_NULL(view, false);
    243243    PS_ASSERT_PTR_NON_NULL(file, false);
    244     return fpaViewReadFitsImage(view, file, config->database, pmFPAReadWeight, pmChipReadWeight, pmCellReadWeight);
     244    return fpaViewReadFitsImage(view, file, config, pmFPAReadWeight, pmChipReadWeight, pmCellReadWeight);
    245245}
    246246
     
    249249    PS_ASSERT_PTR_NON_NULL(view, false);
    250250    PS_ASSERT_PTR_NON_NULL(file, false);
    251     return fpaViewReadFitsImage(view, file, config->database, pmFPAReadDark, pmChipReadDark, pmCellReadDark);
     251    return fpaViewReadFitsImage(view, file, config, pmFPAReadDark, pmChipReadDark, pmCellReadDark);
    252252}
    253253
     
    256256    PS_ASSERT_PTR_NON_NULL(view, false);
    257257    PS_ASSERT_PTR_NON_NULL(file, false);
    258     return fpaViewReadFitsImage(view, file, config->database, pmFPAReadHeaderSet, pmChipReadHeaderSet, pmCellReadHeaderSet);
     258    return fpaViewReadFitsImage(view, file, config, pmFPAReadHeaderSet, pmChipReadHeaderSet, pmCellReadHeaderSet);
    259259}
    260260
     
    267267static bool fpaViewWriteFitsImage(const pmFPAview *view, // FPA view, specifying the level of interest
    268268                                  pmFPAfile *file, // FPA file of interest
    269                                   const pmConfig *config, // Configuration
    270                                   bool (*fpaWriteFunc)(pmFPA*, psFits*, psDB*, bool, bool), // Func for FPA
    271                                   bool (*chipWriteFunc)(pmChip*, psFits*, psDB*, bool, bool), // Func for chip
    272                                   bool (*cellWriteFunc)(pmCell*, psFits*, psDB*, bool) // Func for cell
     269                                  pmConfig *config, // Configuration
     270                                  bool (*fpaWriteFunc)(pmFPA*, psFits*, pmConfig*, bool, bool), // Func FPA
     271                                  bool (*chipWriteFunc)(pmChip*, psFits*, pmConfig*, bool, bool),// Func chip
     272                                  bool (*cellWriteFunc)(pmCell*, psFits*, pmConfig*, bool) // Func cell
    273273                                 )
    274274{
     
    283283    switch (pmFPAviewLevel(view)) {
    284284    case PM_FPA_LEVEL_FPA: {
    285             bool success = fpaWriteFunc(fpa, fits, NULL, false, true);
     285            bool success = fpaWriteFunc(fpa, fits, config, false, true);
    286286            psFree(fpa);
    287287            return success;
     
    289289    case PM_FPA_LEVEL_CHIP: {
    290290            pmChip *chip = pmFPAviewThisChip(view, fpa); // Chip of interest
    291             bool success = chipWriteFunc(chip, fits, NULL, false, true);
     291            bool success = chipWriteFunc(chip, fits, config, false, true);
    292292            psFree(fpa);
    293293            return success;
     
    295295    case PM_FPA_LEVEL_CELL: {
    296296            pmCell *cell = pmFPAviewThisCell(view, fpa); // Cell of interest
    297             bool success = cellWriteFunc(cell, fits, NULL, false);
     297            bool success = cellWriteFunc(cell, fits, config, false);
    298298            psFree(fpa);
    299299            return success;
     
    327327}
    328328
    329 bool pmFPAviewWriteFitsImage(const pmFPAview *view, pmFPAfile *file, const pmConfig *config)
     329bool pmFPAviewWriteFitsImage(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    330330{
    331331    PS_ASSERT_PTR_NON_NULL(view, false);
     
    334334}
    335335
    336 bool pmFPAviewWriteFitsMask(const pmFPAview *view, pmFPAfile *file, const pmConfig *config)
     336bool pmFPAviewWriteFitsMask(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    337337{
    338338    PS_ASSERT_PTR_NON_NULL(view, false);
     
    341341}
    342342
    343 bool pmFPAviewWriteFitsWeight(const pmFPAview *view, pmFPAfile *file, const pmConfig *config)
     343bool pmFPAviewWriteFitsWeight(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    344344{
    345345    PS_ASSERT_PTR_NON_NULL(view, false);
     
    348348}
    349349
    350 bool pmFPAviewWriteFitsDark(const pmFPAview *view, pmFPAfile *file, const pmConfig *config)
     350bool pmFPAviewWriteFitsDark(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    351351{
    352352    PS_ASSERT_PTR_NON_NULL(view, false);
  • trunk/psModules/src/camera/pmFPAfileFitsIO.h

    r18139 r18163  
    55 * @author PAP, IfA
    66 *
    7  * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    8  * @date $Date: 2008-06-14 03:19:31 $
     7 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     8 * @date $Date: 2008-06-17 22:16:38 $
    99 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii
    1010 */
     
    1919bool pmFPAviewReadFitsImage(const pmFPAview *view, ///< View specifying level of interest
    2020                            pmFPAfile *file, ///< FPA file into which to read
    21                             pmConfig *config
     21                            pmConfig *config
    2222                           );
    2323
     
    2525bool pmFPAviewReadFitsMask(const pmFPAview *view, ///< View specifying level of interest
    2626                           pmFPAfile *file, ///< FPA file into which to read
    27                             pmConfig *config
     27                            pmConfig *config
    2828                          );
    2929/// Read a weight map into the current view
    3030bool pmFPAviewReadFitsWeight(const pmFPAview *view,  ///< View specifying level of interest
    3131                             pmFPAfile *file, ///< FPA file into which to read
    32                             pmConfig *config
     32                            pmConfig *config
    3333                            );
    3434
     
    3636bool pmFPAviewReadFitsDark(const pmFPAview *view,  ///< View specifying level of interest
    3737                           pmFPAfile *file, ///< FPA file into which to read
    38                             pmConfig *config
     38                            pmConfig *config
    3939    );
    4040
     
    4242bool pmFPAviewReadFitsHeaderSet(const pmFPAview *view,  ///< View specifying level of interest
    4343                                pmFPAfile *file, ///< FPA file into which to read
    44                             pmConfig *config
     44                            pmConfig *config
    4545    );
    4646
     
    4848bool pmFPAviewWriteFitsImage(const pmFPAview *view, ///< View specifying level of interest
    4949                             pmFPAfile *file, ///< FPA file to write
    50                              const pmConfig *config ///< Configuration
     50                             pmConfig *config ///< Configuration
    5151                            );
    5252
     
    5454bool pmFPAviewWriteFitsMask(const pmFPAview *view, ///< View specifying level of interest
    5555                            pmFPAfile *file, ///< FPA file to write
    56                             const pmConfig *config ///< Configuration
     56                            pmConfig *config ///< Configuration
    5757                           );
    5858
     
    6060bool pmFPAviewWriteFitsWeight(const pmFPAview *view, ///< View specifying level of interest
    6161                              pmFPAfile *file, ///< FPA file to write
    62                               const pmConfig *config ///< Configuration
     62                              pmConfig *config ///< Configuration
    6363                             );
    6464
     
    6666bool pmFPAviewWriteFitsDark(const pmFPAview *view, ///< View specifying level of interest
    6767                            pmFPAfile *file, ///< FPA file to write
    68                             const pmConfig *config ///< Configuration
     68                            pmConfig *config ///< Configuration
    6969    );
    7070
Note: See TracChangeset for help on using the changeset viewer.