IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 12, 2009, 5:44:35 PM (17 years ago)
Author:
eugene
Message:

various fringe fixes

File:
1 edited

Legend:

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

    r24118 r24782  
    9494    psVector *scales = NULL, *zeros = NULL; ///< Scale and zeroes for combination
    9595    psArray *shutters = NULL;           ///< Shutter correction data
     96    psImage *zeroSet = NULL;
    9697    switch (type) {
    9798      case PPMERGE_TYPE_FRINGE:
    98         zeros = psMetadataLookupPtr(NULL, arguments, "ZEROS");
    99         if (!zeros) {
     99        zeroSet = psMetadataLookupPtr(NULL, arguments, "ZEROS");
     100        if (!zeroSet) {
    100101            psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find ZEROS");
    101102            goto ERROR;
    102103        }
     104        // the zeros vector is passed to pmReadoutCombine for each set of inputs per cell
     105        zeros = psVectorAlloc(zeroSet->numRows, PS_TYPE_F32);
    103106        // Flow through
    104107      case PPMERGE_TYPE_FLAT:
     
    140143    pmFPA *outFPA = output->fpa;        ///< Output FPA
    141144    pmHDU *lastHDU = NULL;              // Last HDU that was updated
     145
    142146    int cellNum = 0;                    ///< Index of cell
    143147    if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
     
    194198            }
    195199
     200            if (zeroSet) {
     201              for (int i = 0; i < zeroSet->numRows; i++) {
     202                zeros->data.F32[i] = zeroSet->data.F32[i][cellNum];
     203              }
     204            }
     205
    196206            ppMergeFileGroup *fileGroup = NULL;
    197207            psArray *fileGroups = psArrayAlloc(nThreads + 1);
     
    335345
    336346            psFree(fileGroups);
     347            psFree(zeros);
    337348
    338349            // XXX eventually need to keep both the shutter and the pattern, as we do with dark
Note: See TracChangeset for help on using the changeset viewer.