- Timestamp:
- Jan 28, 2010, 4:16:19 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/ppSub/src/ppSubMatchPSFs.c
r26667 r26703 22 22 #include "ppSub.h" 23 23 24 #define COVAR_FRAC 0.01 // Truncation fraction for covariance matrix 25 24 26 // Normalise a region on an image 25 27 static void normaliseRegion(psImage *image, // Image to normalise … … 38 40 } 39 41 42 #if 0 40 43 // Measure the PSF for an image 41 44 static float subImagePSF(ppSubData *data, // Processing data … … 85 88 return fwhm; 86 89 } 90 #endif 87 91 88 92 // Scale the kernel parameters according to the PSFs … … 114 118 } 115 119 120 #if 0 116 121 // Input images 117 122 pmReadout *inRO = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); // Input readout … … 133 138 float inFWHM = subImagePSF(data, inRO, inSources); // FWHM for input 134 139 float refFWHM = subImagePSF(data, refRO, refSources); // FWHM for reference 140 #else 141 float inFWHM = 7.631371; 142 float refFWHM = 10.005879; 143 #endif 144 135 145 psLogMsg("ppSub", PS_LOG_INFO, "Input FWHM: %f\nReference FWHM: %f\n", inFWHM, refFWHM); 136 146 if (!isfinite(inFWHM) || !isfinite(refFWHM)) { … … 252 262 float rej = psMetadataLookupF32(NULL, recipe, "REJ"); // Rejection threshold 253 263 float kernelErr = psMetadataLookupF32(NULL, recipe, "KERNEL.ERR"); // Relative systematic error in kernel 264 float normFrac = psMetadataLookupF32(NULL, recipe, "NORM.FRAC"); // Fraction of window for normalisn windw 254 265 float sysErr = psMetadataLookupF32(NULL, recipe, "SYS.ERR"); // Relative systematic error in images 255 266 float skyErr = psMetadataLookupF32(NULL, recipe, "SKY.ERR"); // Additional error in sky … … 306 317 } 307 318 319 if (inRO->covariance) { 320 psImageCovarianceTruncate(inRO->covariance, COVAR_FRAC); 321 } 322 if (refRO->covariance) { 323 psImageCovarianceTruncate(refRO->covariance, COVAR_FRAC); 324 } 325 308 326 // Match the PSFs 309 327 bool success = false; // Operation was successful? … … 315 333 spacing, threshold, sources, data->stamps, type, size, order, 316 334 widths, orders, inner, ringsOrder, binning, penalty, optimum, 317 optWidths, optOrder, optThresh, iter, rej, sysErr, skyErr, kernelErr, maskVal, 318 maskBad, maskPoor, poorFrac, badFrac, subMode); 335 optWidths, optOrder, optThresh, iter, rej, normFrac, 336 sysErr, skyErr, kernelErr, maskVal, maskBad, maskPoor, 337 poorFrac, badFrac, subMode); 319 338 } 320 339 … … 407 426 pmConceptsCopyFPA(refConv->parent->parent->parent, refRO->parent->parent->parent, true, true); 408 427 428 if (inConv->covariance) { 429 psImageCovarianceTruncate(inConv->covariance, COVAR_FRAC); 430 } 431 if (refConv->covariance) { 432 psImageCovarianceTruncate(refConv->covariance, COVAR_FRAC); 433 } 434 409 435 if (inConv->variance) { 410 436 psImageCovarianceTransfer(inConv->variance, inConv->covariance);
Note:
See TracChangeset
for help on using the changeset viewer.
