Changeset 21536 for branches/cnb_branch_20090215/ppStack/src/ppStackLoop.c
- Timestamp:
- Feb 19, 2009, 7:59:50 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branch_20090215/ppStack/src/ppStackLoop.c
r21477 r21536 480 480 psMetadataAddF32(stats, PS_LIST_TAIL, "STAMP.NUM", PS_META_DUPLICATE_OK, 481 481 "Number of stamps", kernels->numStamps); 482 float deconv = psMetadataLookupF32(NULL, readout->analysis, 483 PM_SUBTRACTION_ANALYSIS_DECONV_MAX); // Deconvolution fraction 484 psMetadataAddF32(stats, PS_LIST_TAIL, "KERNEL.DECONV", PS_META_DUPLICATE_OK, 485 "Deconvolution fraction for kernel", deconv); 482 486 psMetadataAddF32(stats, PS_LIST_TAIL, "PPSTACK.WEIGHTING", PS_META_DUPLICATE_OK, 483 487 "Weighting for image", weightings->data.F32[i]); … … 503 507 psStringAppend(&name, "covariance_%d.fits", i); 504 508 writeImage(name, hdu->header, readout->covariance->image, config); 509 pmStackVisualPlotTestImage(readout->covariance->image, name); 505 510 psFree(name); 506 511 } … … 801 806 #ifdef TESTING 802 807 writeImage("combined_initial.fits", NULL, outRO->image, config); 808 pmStackVisualPlotTestImage(outRO->image, "combined_initial.fits"); 803 809 #endif 804 810 … … 884 890 psString name = NULL; // Name of image 885 891 psStringAppend(&name, "inspect_%03d.fits", i); 892 pmStackVisualPlotTestImage(mask, name); 886 893 psFits *fits = psFitsOpen(name, "w"); 887 894 psFree(name); … … 901 908 psString name = NULL; // Name of image 902 909 psStringAppend(&name, "reject_%03d.fits", i); 910 pmStackVisualPlotTestImage(mask, name); 903 911 psFits *fits = psFitsOpen(name, "w"); 904 912 psFree(name); … … 1034 1042 1035 1043 #ifdef TESTING 1044 pmStackVisualPlotTestImage(outRO->image, "combined_initial.fits"); 1036 1045 writeImage("combined_final.fits", NULL, outRO->image, config); 1037 1046 #endif … … 1151 1160 psLogMsg("ppStack", PS_LOG_INFO, "Stage 7 : WCS & JPEGS : %f sec", psTimerClear("PPSTACK_STEPS")); 1152 1161 1153 if (psMetadataLookupBool(&mdok, recipe, "RENORM")) {1154 // Statistics for renormalisation1155 psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,1156 "RENORM.MEAN"));1157 psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,1158 "RENORM.STDEV"));1159 int renormNum = psMetadataLookupS32(&mdok, recipe, "RENORM.NUM"); // Number of samples1160 float renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width of Gaussian phot1161 psImageMaskType maskValue = pmConfigMaskGet("BLANK", config); // Bits to mask1162 if (!pmReadoutVarianceRenormPhot(outRO, maskValue, renormNum, renormWidth,1163 renormMean, renormStdev, NULL)) {1164 psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances.");1165 psFree(outRO);1166 return false;1167 }1168 }1169 1170 psLogMsg("ppStack", PS_LOG_INFO, "Stage 8 : Photometry Renormalization : %f sec", psTimerClear("PPSTACK_STEPS"));1171 1172 1162 if (psMetadataLookupBool(&mdok, recipe, "PHOTOMETRY")) { 1173 1163 psTrace("ppStack", 1, "Photometering stacked image....\n"); … … 1199 1189 } 1200 1190 1201 psLogMsg("ppStack", PS_LOG_INFO, "Stage 9: Photometry Analysis : %f sec", psTimerClear("PPSTACK_STEPS"));1191 psLogMsg("ppStack", PS_LOG_INFO, "Stage 8 : Photometry Analysis : %f sec", psTimerClear("PPSTACK_STEPS")); 1202 1192 1203 1193 psThreadPoolFinalize(); … … 1254 1244 } 1255 1245 1256 psLogMsg("ppStack", PS_LOG_INFO, "Stage 10: Final Output : %f sec", psTimerClear("PPSTACK_STEPS"));1246 psLogMsg("ppStack", PS_LOG_INFO, "Stage 9 : Final Output : %f sec", psTimerClear("PPSTACK_STEPS")); 1257 1247 1258 1248 memDump("finish");
Note:
See TracChangeset
for help on using the changeset viewer.
