Changeset 20752 for trunk/ppStack/src/ppStackMatch.c
- Timestamp:
- Nov 13, 2008, 10:25:27 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackMatch.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackMatch.c
r20713 r20752 222 222 psFitsClose(fits); 223 223 } 224 #endif 224 { 225 psString name = NULL; 226 psStringAppend(&name, "real_%03d.fits", numInput); 227 psFits *fits = psFitsOpen(name, "w"); 228 psFree(name); 229 psFitsWriteImage(fits, NULL, readout->image, 0, NULL); 230 psFitsClose(fits); 231 } 232 #endif 233 234 // Renormalise the variances if desired 235 if (renorm) { 236 // Statistics for renormalisation 237 psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe, 238 "RENORM.MEAN")); 239 psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe, 240 "RENORM.STDEV")); 241 242 if (!pmReadoutWeightRenormPixels(readout, maskBad, renormMean, renormStdev, rng)) { 243 psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances."); 244 psFree(output); 245 return false; 246 } 247 } 225 248 226 249 if (threads > 0) { … … 240 263 return false; 241 264 } 265 266 #ifdef TESTING 267 { 268 psString name = NULL; 269 psStringAppend(&name, "conv_%03d.fits", numInput); 270 psFits *fits = psFitsOpen(name, "w"); 271 psFree(name); 272 psFitsWriteImage(fits, NULL, output->image, 0, NULL); 273 psFitsClose(fits); 274 } 275 { 276 psString name = NULL; 277 psStringAppend(&name, "diff_%03d.fits", numInput); 278 psFits *fits = psFitsOpen(name, "w"); 279 psFree(name); 280 psBinaryOp(fake->image, output->image, "-", fake->image); 281 psFitsWriteImage(fits, NULL, fake->image, 0, NULL); 282 psFitsClose(fits); 283 } 284 #endif 285 242 286 psFree(fake); 243 287 psFree(optWidths);
Note:
See TracChangeset
for help on using the changeset viewer.
