Changeset 19478
- Timestamp:
- Sep 10, 2008, 5:35:30 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_branch_080908/psModules/src/imcombine/pmStack.c
r19454 r19478 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1.38.2. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2008-09-1 0 18:17:54$10 * @version $Revision: 1.38.2.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2008-09-11 03:35:30 $ 12 12 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii 13 13 * … … 265 265 pixelData->data.F32[num] = image->data.F32[yIn][xIn]; 266 266 if (variance) { 267 pixelVariances->data.F32[num] = variance->data.F32[yIn][xIn] * varFactors->data.F32[i];267 pixelVariances->data.F32[num] = variance->data.F32[yIn][xIn]; 268 268 } 269 269 pixelWeights->data.F32[num] = data->weight; … … 312 312 // Use variance to check that the two are consistent 313 313 float diff = pixelData->data.F32[0] - pixelData->data.F32[1]; 314 float sigma2 = pixelVariances->data.F32[0] + pixelVariances->data.F32[1]; 314 float sigma2 = pixelVariances->data.F32[0] * varFactors->data.F32[pixelSources->data.U16[0]] + 315 pixelVariances->data.F32[1] * varFactors->data.F32[pixelSources->data.U16[1]]; 315 316 if (PS_SQR(diff) > PS_SQR(rej) * sigma2) { 316 317 // Not consistent: mark both for inspection … … 341 342 float rej2 = PS_SQR(rej); // Rejection level squared 342 343 for (int i = 0; i < num; i++) { 343 pixelVariances->data.F32[i] *= rej2 ;344 pixelVariances->data.F32[i] *= rej2 * varFactors->data.F32[pixelSources->data.U16[i]];; 344 345 } 345 346 } … … 377 378 if (useVariance) { 378 379 // Comparing squares --- cheaper than lots of sqrts 379 if (PS_SQR(diff) > rej2 * pixelVariances->data.F32[j]) { 380 // pixelVariances includes the variance factor and the rejection limit, from above 381 if (PS_SQR(diff) > pixelVariances->data.F32[j]) { 380 382 MASK_PIXEL_FOR_INSPECTION(); 381 383 }
Note:
See TracChangeset
for help on using the changeset viewer.
