IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 4, 2011, 3:47:03 PM (15 years ago)
Author:
eugene
Message:

fix adjustments to SAT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/ppStack/src/ppStackConvolve.c

    r30801 r30806  
    238238            // M_app = m_inst + ZP + 2.5*log(exptime), where exptime in the output is sumExposure
    239239            psMetadataItem *zpItem = psMetadataLookup(inCell->parent->parent->concepts, "FPA.ZP");
     240            float inZP = zpItem->data.F32;
    240241            zpItem->data.F32 += options->norm->data.F32[i] + 2.5*log10(options->sumExposure);
    241242
     
    244245
    245246            expItem = psMetadataLookup(inCell->concepts, "CELL.EXPOSURE");
     247            float inExptime = expItem->data.F32;
    246248            expItem->data.F32 = options->sumExposure;
    247249
    248250            // flux_out = flux_in * ten(-0.4*norm) -- save the individual saturation values
    249             psMetadataItem *satItem = psMetadataLookup(inCell->concepts, "CELL.EXPOSURE");
     251            psMetadataItem *satItem = psMetadataLookup(inCell->concepts, "CELL.SATURATION");
     252            float inSat = satItem->data.F32;
    250253            satItem->data.F32 *= pow(10.0, -0.4*options->norm->data.F32[i]);
    251254            psVectorAppend (satValues, satItem->data.F32);
     255
     256            psLogMsg("ppStack", PS_LOG_INFO, "image %d mods : zp %f -> %f, exptime %f -> %f, sat %f -> %f",
     257                     i, inZP, zpItem->data.F32, inExptime, expItem->data.F32, inSat, satItem->data.F32);
    252258        }
    253259
     
    311317        // this case, the best value for CELL.SATURATION is the 2nd highest value in the list.
    312318        // If not, it should be the higest value in the list
     319        bool mdok = false;
    313320        bool safe = psMetadataLookupBool(&mdok, recipe, "SAFE"); // Be safe when combining small numbers of pixels
    314321        psVectorSortInPlace(satValues);
     
    327334        UPDATE_CONCEPT(unconvCell, "CELL.SATURATION", satBest);
    328335        UPDATE_CONCEPT(unconvFPA,  "FPA.ZP",        options->zp);
     336
     337        psLogMsg("ppStack", PS_LOG_INFO, "stack adjust metadata values : zp %f, exptime %f, sat %f", options->zp, options->sumExposure, satBest);
    329338
    330339        if (options->stats) {
Note: See TracChangeset for help on using the changeset viewer.