IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 3, 2006, 6:12:17 PM (20 years ago)
Author:
Paul Price
Message:

Fixes for compilation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeBackground.c

    r7061 r7064  
    3434
    3535// Get the scale and zero for each chip of each input
    36 bool ppMergeScaleZero(ppImage **scales, // The scales for each integration/cell
    37                       ppImage **zeros, // The zeroes for each integration/cell
     36bool ppMergeScaleZero(psImage **scales, // The scales for each integration/cell
     37                      psImage **zeros, // The zeroes for each integration/cell
    3838                      ppMergeData *data,// The data
    3939                      const ppMergeOptions *options, // The options
     
    7676        psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read
    7777        if (!inFile) {
    78             psErrorPrint(PS_ERR_IO, false, "Unable to open input file %s --- ignored.\n", name);
     78            psLogMsg(__func__, PS_LOG_WARN, "Unable to open input file %s --- ignored.\n", name);
    7979            status = false;
    8080            continue;
    8181        }
    8282
    83         pmFPA *fpa = in->data[i];      // The FPA for this input
     83        pmFPA *fpa = data->in->data[i]; // The FPA for this input
    8484        int cellNum = -1;               // Number of the cell
    8585        psArray *chips = fpa->chips;    // Array of chips
     
    106106                if (options->exptime) {
    107107                    bool mdok = true;   // Status of MD lookup
    108                     exptime->data.F64[i][cellNum] = psMetadataLookup(&mdok, cell->concepts, "CELL.EXPOSURE");
     108                    exptime->data.F64[i][cellNum] = psMetadataLookupF32(&mdok, cell->concepts,
     109                                                                        "CELL.EXPOSURE");
    109110                    if (!mdok || isnan(exptime->data.F64[i][cellNum])) {
    110111                        psLogMsg(__func__, PS_LOG_WARN, "CELL.EXPOSURE for file %s chip %d cell %d is not "
     
    139140                    if (options->scale) {
    140141                        bool mdok = true;   // Status of MD lookup
    141                         gain->data.F32[cellNum] = psMetadataLookupF32(&mdok, cell->concepts, "CELL.GAIN");
    142                         if (!mdok || isnan(gain->data.F32[cellNum])) {
     142                        gains->data.F32[cellNum] = psMetadataLookupF32(&mdok, cell->concepts, "CELL.GAIN");
     143                        if (!mdok || isnan(gains->data.F32[cellNum])) {
    143144                            psLogMsg(__func__, PS_LOG_WARN, "CELL.GAIN for file %s chip %d cell %d is not "
    144145                                     "set.\n", name, j, k);
    145                             gain->data.F32[cellNum] = NAN;
     146                            gains->data.F32[cellNum] = NAN;
    146147                            status = false;
    147148                        }
     
    150151                    // Get the background
    151152                    psImageStats(bgStats, image, readout->mask, options->maskVal);
    152                     background[i][cellNum] = getStat(bgStats, options->background);
    153                 }
    154 
    155                 psCellFreeData(cell);
     153                    background->data.F64[i][cellNum] = getStat(bgStats, options->background);
     154                }
     155
     156                pmCellFreeData(cell);
    156157            }
    157             psChipFreeData(chip);
    158         }
    159         psFPAFreeData(fpa);
     158            pmChipFreeData(chip);
     159        }
     160        pmFPAFreeData(fpa);
    160161        psFitsClose(inFile);
    161162    }
Note: See TracChangeset for help on using the changeset viewer.