IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 24, 2007, 12:01:16 PM (19 years ago)
Author:
Paul Price
Message:

Restore combined image to counts, using the total exposure time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackReadout.c

    r13512 r13513  
    4141    psRandom *rng = psRandomAlloc(0, PS_RANDOM_TAUS); // Random number generator
    4242    int fileNum = 0;                    // Number of file
     43    float totExposure = 0.0;            // Total exposure time
    4344    while ((item = psMetadataGetAndIncrement(inputIter))) {
    4445        assert(item->type == PS_DATA_UNKNOWN);
     
    7071            return false;
    7172        }
     73        totExposure += exposure;        // Total exposure time
    7274        (void)psBinaryOp(ro->image, ro->image, "/", psScalarAlloc(exposure, PS_TYPE_F32));
    7375        pmStackData *data = pmStackDataAlloc(ro, seeing ? seeing->data.F32[fileNum] : 0.0,
     
    143145    }
    144146
     147    // Restore image to counts using the total exposure time
     148    (void)psBinaryOp(outRO->image, outRO->image, "*", psScalarAlloc(totExposure, PS_TYPE_F32));
     149    psMetadataAddF32(outRO->parent->concepts, PS_LIST_TAIL, "CELL.EXPOSURE", PS_META_REPLACE,
     150                     "Summed exposure time (sec)", totExposure);
     151
    145152    outRO->data_exists = true;
    146153    outRO->parent->data_exists = true;
Note: See TracChangeset for help on using the changeset viewer.