Changeset 15945 for trunk/ppImage/src/ppImageReplaceBackground.c
- Timestamp:
- Dec 27, 2007, 6:45:24 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageReplaceBackground.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageReplaceBackground.c
r15928 r15945 28 28 psMaskType maskVal = options->satMask | options->badMask | options->flatMask | options->blankMask; 29 29 30 float meanValue = psMetadataLookupF32 (&status, recipe, "SKY_MEAN"); 31 30 32 // iterate over the cells and readout for this chip 31 33 while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) { 32 psLogMsg ("ppImagePhotom", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);34 psLogMsg ("ppImagePhotom", 5, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process); 33 35 if (! cell->process || ! cell->file_exists) { continue; } 34 36 … … 46 48 } 47 49 if (!modelReadout) { 48 psphot ImageMedian (config, view, maskVal);50 psphotModelBackground (config, view, "PPIMAGE.CHIP", maskVal); 49 51 modelFile = psMetadataLookupPtr(&status, config->files, "PSPHOT.BACKMDL"); 50 52 assert (modelFile); 51 modelReadout = pmFPAviewThisReadout (view, modelFile->fpa); 53 if (modelFile->mode == PM_FPA_MODE_INTERNAL) { 54 modelReadout = modelFile->readout; 55 } else { 56 modelReadout = pmFPAviewThisReadout (view, modelFile->fpa); 57 } 52 58 assert (modelReadout); 53 59 } … … 62 68 for (int ix = 0; ix < image->numCols; ix++) { 63 69 if (!(mask->data.U8[iy][ix] && maskVal)) continue; 64 image->data.F32[iy][ix] = psImageUnbinPixel_V2(ix, iy, model, binning); 70 if (1) { 71 image->data.F32[iy][ix] = meanValue; 72 } else { 73 image->data.F32[iy][ix] = psImageUnbinPixel_V2(ix, iy, model, binning); 74 } 65 75 } 66 76 } 67 77 } 68 78 } 79 pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL"); 80 pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL.STDEV"); 69 81 return true; 70 82 }
Note:
See TracChangeset
for help on using the changeset viewer.
