Changeset 24951 for branches/czw_branch/cleanup/ppStack
- Timestamp:
- Jul 30, 2009, 5:20:29 PM (17 years ago)
- Location:
- branches/czw_branch/cleanup
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
ppStack/src/ppStackMatch.c (modified) (1 diff)
-
ppStack/src/ppStackThread.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/cleanup
- Property svn:mergeinfo changed
/trunk (added) merged: 24714-24742,24744-24784,24786-24798,24801-24824,24827-24834,24836-24859,24861-24901,24903-24912,24914-24939
- Property svn:mergeinfo changed
-
branches/czw_branch/cleanup/ppStack/src/ppStackMatch.c
r24215 r24951 512 512 psBinaryOp(readout->variance, readout->variance, "*", psScalarAlloc(PS_SQR(norm), PS_TYPE_F32)); 513 513 } 514 514 515 515 // Ensure the background value is zero 516 516 psStats *bg = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); // Statistics for background 517 517 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS); // Random number generator 518 518 if (!psImageBackground(bg, NULL, readout->image, readout->mask, maskVal | maskBad, rng)) { 519 psWarning("Can't measure background for image.");520 psErrorClear();519 psWarning("Can't measure background for image."); 520 psErrorClear(); 521 521 } else { 522 psLogMsg("ppStack", PS_LOG_INFO, "Correcting convolved image background by %lf (+/- %lf)", 523 psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), psStatsGetValue(bg, PS_STAT_ROBUST_STDEV)); 524 (void)psBinaryOp(readout->image, readout->image, "-", 525 psScalarAlloc(psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), PS_TYPE_F32)); 526 } 522 if (!psMetadataLookupBool(NULL, config->arguments, "PPSTACK.SKIP.BG.SUB")) { 523 psLogMsg("ppStack", PS_LOG_INFO, "Correcting convolved image background by %lf (+/- %lf)", 524 psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), psStatsGetValue(bg, PS_STAT_ROBUST_STDEV)); 525 (void)psBinaryOp(readout->image, readout->image, "-", 526 psScalarAlloc(psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), PS_TYPE_F32)); 527 } 528 } 529 527 530 528 531 // Measure the variance level for the weighting -
branches/czw_branch/cleanup/ppStack/src/ppStackThread.c
r23341 r24951 187 187 188 188 189 int zMax = 0; 189 190 bool keepReading = false; 190 if (pmReadoutMore(ro, imageFits, 0, rows, config)) {191 if (pmReadoutMore(ro, imageFits, 0, &zMax, rows, config)) { 191 192 keepReading = true; 192 if (!pmReadoutReadChunk(ro, imageFits, 0, rows, overlap, config)) {193 if (!pmReadoutReadChunk(ro, imageFits, 0, NULL, rows, overlap, config)) { 193 194 psError(PS_ERR_IO, false, "Unable to read chunk %d for file PPSTACK.INPUT %d", 194 195 numChunk, i); … … 198 199 } 199 200 200 if (pmReadoutMoreMask(ro, maskFits, 0, rows, config)) {201 if (pmReadoutMoreMask(ro, maskFits, 0, &zMax, rows, config)) { 201 202 keepReading = true; 202 if (!pmReadoutReadChunkMask(ro, maskFits, 0, rows, overlap, config)) {203 if (!pmReadoutReadChunkMask(ro, maskFits, 0, NULL, rows, overlap, config)) { 203 204 psError(PS_ERR_IO, false, "Unable to read chunk %d for file PPSTACK.INPUT.MASK %d", 204 205 numChunk, i); … … 208 209 } 209 210 210 if (pmReadoutMoreVariance(ro, varianceFits, 0, rows, config)) {211 if (pmReadoutMoreVariance(ro, varianceFits, 0, &zMax, rows, config)) { 211 212 keepReading = true; 212 if (!pmReadoutReadChunkVariance(ro, varianceFits, 0, rows, overlap, config)) {213 if (!pmReadoutReadChunkVariance(ro, varianceFits, 0, NULL, rows, overlap, config)) { 213 214 psError(PS_ERR_IO, false, 214 215 "Unable to read chunk %d for file PPSTACK.INPUT.VARIANCE %d",
Note:
See TracChangeset
for help on using the changeset viewer.
