Changeset 30400
- Timestamp:
- Jan 27, 2011, 4:47:32 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/ppSub/src/ppSubReadoutSubtract.c
r30285 r30400 31 31 32 32 bool reverse = psMetadataLookupBool(&mdok, config->arguments, "REVERSE"); // Reverse sense of subtraction? 33 bool addPair = psMetadataLookupBool(&mdok, recipe, "ADD.NOT.SUBTRACT"); // add instead of subtracting 33 34 34 35 pmFPAview *view = ppSubViewReadout(); // View to readout … … 47 48 // Do the actual subtraction 48 49 pmReadout *outRO = pmFPAfileThisReadout(config->files, view, "PPSUB.OUTPUT"); 49 outRO->image = (psImage*)psBinaryOp(outRO->image, minuend->image, "-", subtrahend->image); 50 51 if (addPair) { 52 outRO->image = (psImage*)psBinaryOp(outRO->image, minuend->image, "+", subtrahend->image); 53 } else { 54 outRO->image = (psImage*)psBinaryOp(outRO->image, minuend->image, "-", subtrahend->image); 55 } 50 56 outRO->mask = (psImage*)psBinaryOp(outRO->mask, minuend->mask, "|", subtrahend->mask); 51 57 outRO->variance = (psImage*)psBinaryOp(outRO->variance, minuend->variance, "+", subtrahend->variance); … … 70 76 psFree(rng); 71 77 78 // XXX EAM : I suspect that the weighted averaging is giving the wrong answer for 79 // single-direction PSF matching (and maybe DUAL as well). I am testing the difference by 80 // generating A+B images instead of A-B images and then checking the significance of the 81 // sources in the image 82 72 83 // Combine the covariances 73 84 // These are weighted by the appropriate mean variance. This is probably not perfectly correct, but it … … 79 90 covarWeights->data.F32[0] = minuendVar; 80 91 covarWeights->data.F32[1] = subtrahendVar; 92 # if (0) 81 93 outRO->covariance = psImageCovarianceAverageWeighted(covars, covarWeights); 94 # else 95 outRO->covariance = psImageCovarianceAverage(covars); 96 # endif 82 97 psFree(covars); 83 98 psFree(covarWeights);
Note:
See TracChangeset
for help on using the changeset viewer.
