Changeset 28300 for trunk/ppBackground/src/ppBackgroundLoop.c
- Timestamp:
- Jun 10, 2010, 2:45:18 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ppBackground/src/ppBackgroundLoop.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppBackground/src/ppBackgroundLoop.c
r28296 r28300 86 86 readout->image = psImageAlloc(numCols, numRows, PS_TYPE_F32); 87 87 psImageInit(readout->image, 0.0); 88 readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK); 89 psImageInit(readout->mask, 0); 88 90 89 91 if (!pmPatternRowApply(readout, maskBad) || !pmPatternCellApply(readout, maskBad)) { … … 116 118 } 117 119 118 pmChip *mosaic = pmFPAviewThisChip(view, patternMosaic); // Chip for mosaicked pattern 119 if (!mosaic->hdu && !mosaic->parent->hdu) { 120 pmFPAAddSourceFromView(patternMosaic, view, file->format); 120 if (data->patternName) { 121 pmChip *patternChip = pmFPAviewThisChip(view, patternFile->fpa); // Chip for pattern 122 pmChip *mosaic = pmFPAviewThisChip(view, patternMosaic); // Chip for mosaicked pattern 123 if (!mosaic->hdu && !mosaic->parent->hdu) { 124 pmFPAAddSourceFromView(patternMosaic, view, file->format); 125 } 126 if (!pmChipMosaic(mosaic, patternChip, true, maskBad)) { 127 psError(psErrorCodeLast(), false, "Unable to mosaic pattern correction"); 128 return false; 129 } 130 pmFPAfileActivate(config->files, true, NULL); 131 // pmFPAfileActivate(config->files, false, "PPBACKGROUND.PATTERN"); 121 132 } 122 if (!pmChipMosaic(mosaic, chip, true, maskBad)) {123 psError(psErrorCodeLast(), false, "Unable to mosaic pattern correction");124 return false;125 }126 pmFPAfileActivate(config->files, true, NULL);127 // pmFPAfileActivate(config->files, false, "PPBACKGROUND.PATTERN");128 133 } 129 134 130 pmChip *outChip = pmFPAfileThisChip(config->files, view, "PPBACKGROUND.OUTPUT"); // Chip for output131 135 pmChip *patternChip = patternFile ? pmFPAviewThisChip(view, patternMosaic) : NULL; // Chip with pattern 132 136 pmChip *bgChip = bgFile ? pmFPAviewThisChip(view, bgFile->fpa) : NULL; // Chip with background model 133 if (!ppBackgroundRestore( outChip,chip, bgChip, patternChip, view, config)) {137 if (!ppBackgroundRestore(chip, bgChip, patternChip, view, config)) { 134 138 psError(psErrorCodeLast(), false, "Unable to replace background"); 135 139 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
