Changeset 26007 for branches/pap/ppStack/src/ppStackConvolve.c
- Timestamp:
- Nov 2, 2009, 5:08:31 PM (17 years ago)
- File:
-
- 1 edited
-
branches/pap/ppStack/src/ppStackConvolve.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppStack/src/ppStackConvolve.c
r25955 r26007 9 9 #include "ppStack.h" 10 10 #include "ppStackLoop.h" 11 12 //#define TESTING 13 11 14 12 15 // Update the value of a concept … … 130 133 ppStackWriteImage(options->convMasks->data[i], maskHeader, readout->mask, config); 131 134 psFree(maskHeader); 132 psImageCovarianceTransfer(readout->variance, readout->covariance);133 135 ppStackWriteImage(options->convVariances->data[i], hdu->header, readout->variance, config); 134 136 #ifdef TESTING … … 139 141 pmStackVisualPlotTestImage(readout->covariance->image, name); 140 142 psFree(name); 143 } 144 { 145 int numCols = readout->image->numCols, numRows = readout->image->numRows; 146 psImage *sn = psImageAlloc(numCols, numRows, PS_TYPE_F32); 147 for (int y = 0; y < numRows; y++) { 148 for (int x = 0; x < numCols; x++) { 149 sn->data.F32[y][x] = readout->image->data.F32[y][x] / 150 sqrtf(readout->variance->data.F32[y][x]); 151 } 152 } 153 psString name = NULL; 154 psStringAppend(&name, "signoise_%d.fits", i); 155 ppStackWriteImage(name, hdu->header, sn, config); 156 psFree(name); 157 psFree(sn); 141 158 } 142 159 #endif … … 221 238 numGood = 0; // Number of good images 222 239 for (int i = 0; i < num; i++) { 223 if (options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i] & PPSTACK_MASK_ALL) {240 if (options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i] & PPSTACK_MASK_ALL) { 224 241 continue; 225 242 } … … 245 262 // Correct chi^2 for renormalisation 246 263 psBinaryOp(options->matchChi2, options->matchChi2, "/", renorms); 264 for (int i = 0; i < num; i++) { 265 psLogMsg("ppStack", PS_LOG_INFO, "Additional variance for image %d: %f\n", 266 i, options->matchChi2->data.F32[i]); 267 } 247 268 psFree(renorms); 248 269
Note:
See TracChangeset
for help on using the changeset viewer.
