Changeset 9824
- Timestamp:
- Nov 1, 2006, 2:31:28 PM (20 years ago)
- Location:
- trunk/ppMerge/src
- Files:
-
- 3 edited
-
ppMergeCheckInputs.c (modified) (5 diffs)
-
ppMergeCombine.c (modified) (7 diffs)
-
ppMergeScaleZero.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeCheckInputs.c
r9737 r9824 54 54 continue; 55 55 } 56 psTrace( __func__, 1, "Checking input file %s....\n", name);56 psTrace("ppMerge", 1, "Checking input file %s....\n", name); 57 57 psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read 58 58 if (!inFile) { … … 65 65 psMetadata *header = psFitsReadHeader(NULL, inFile); // The FITS (primary) header 66 66 if (psTraceGetLevel("ppMerge") > 9) { 67 psTrace( __func__, 9, "Primary header:\n");67 psTrace("ppMerge", 9, "Primary header:\n"); 68 68 psMetadataPrint(stdout, header, 9); 69 69 } … … 100 100 // Use the first valid input as the basis for the output --- including the header 101 101 if (!data->out) { 102 psTrace( __func__, 5, "Constructing output using %s as a template.\n", name);102 psTrace("ppMerge", 5, "Constructing output using %s as a template.\n", name); 103 103 data->out = pmFPAConstruct(config->camera); 104 104 pmFPAview *view = pmFPAAddSourceFromHeader(data->out, header, options->format); … … 110 110 psFree(header); 111 111 112 psTrace( __func__, 3, "%s checks out.\n", name);112 psTrace("ppMerge", 3, "%s checks out.\n", name); 113 113 numGood++; 114 114 } … … 131 131 } 132 132 data->numCells = numCells; 133 psTrace( __func__, 3, "Output has %d cells.\n", numCells);133 psTrace("ppMerge", 3, "Output has %d cells.\n", numCells); 134 134 135 psTrace( __func__, 3, "We have %d good inputs.\n", numGood);135 psTrace("ppMerge", 3, "We have %d good inputs.\n", numGood); 136 136 if (numGood > 1) { 137 137 return data; -
trunk/ppMerge/src/ppMergeCombine.c
r9737 r9824 70 70 } 71 71 psFree(leaks); 72 psTrace( __func__, 0, "Memory in use: %zd\n", totalSize);73 psTrace( __func__, 0, "Largest block: %ld\n", largest);74 psTrace( __func__, 0, "sbrk(): %zd\n", sbrk(0));72 psTrace("ppMerge", 0, "Memory in use: %zd\n", totalSize); 73 psTrace("ppMerge", 0, "Largest block: %ld\n", largest); 74 psTrace("ppMerge", 0, "sbrk(): %zd\n", sbrk(0)); 75 75 } 76 76 return; … … 172 172 options->shutterRej, 173 173 options->combine->maskVal); 174 psTrace( __func__, 5, "Chip %d, cell %d\n", view->chip, view->cell);174 psTrace("ppMerge", 5, "Chip %d, cell %d\n", view->chip, view->cell); 175 175 } else { 176 176 psError(PS_ERR_UNKNOWN, true, "Not enough images to combine: %d\n", numRead); … … 219 219 if (numRead > 0) { 220 220 pmReadoutCombine(readout, stack, cellZeros, cellScales, options->combine); 221 psTrace( __func__, 5, "Chip %d, cell %d, scan %d\n", view->chip, view->cell, numScan);221 psTrace("ppMerge", 5, "Chip %d, cell %d, scan %d\n", view->chip, view->cell, numScan); 222 222 } 223 223 numScan++; … … 252 252 if (numRead > 0) { 253 253 pmReadoutCombine(readout, stack, cellZeros, cellScales, options->combine); 254 psTrace( __func__, 5, "Chip %d, cell %d\n", view->chip, view->cell);254 psTrace("ppMerge", 5, "Chip %d, cell %d\n", view->chip, view->cell); 255 255 } 256 256 … … 291 291 // Write the pixels 292 292 if (cell->hdu) { 293 psTrace( __func__, 5, "Writing out cell HDU.\n");293 psTrace("ppMerge", 5, "Writing out cell HDU.\n"); 294 294 pmCellWrite(cell, data->outFile, config->database, false); 295 295 pmCellFreeData(cell); … … 306 306 // Write the pixels 307 307 if (chip->hdu) { 308 psTrace( __func__, 5, "Writing out chip HDU.\n");308 psTrace("ppMerge", 5, "Writing out chip HDU.\n"); 309 309 pmChipWrite(chip, data->outFile, config->database, false, false); 310 310 pmChipFreeData(chip); … … 314 314 if (data->out->hdu) { 315 315 // Write the pixels 316 psTrace( __func__, 5, "Writing out FPA HDU.\n");316 psTrace("ppMerge", 5, "Writing out FPA HDU.\n"); 317 317 pmFPAWrite(data->out, data->outFile, config->database, false, false); 318 318 } -
trunk/ppMerge/src/ppMergeScaleZero.c
r9737 r9824 116 116 fromConcepts = true; 117 117 (*scales)->data.F32[i][cellNum] = scale; 118 psTrace( __func__, 9, "Scale for input %ld, chip %ld, cell %ld: %f\n", i, j, k, scale);118 psTrace("ppMerge", 9, "Scale for input %ld, chip %ld, cell %ld: %f\n", i, j, k, scale); 119 119 } else if (!first && fromConcepts) { 120 120 psLogMsg(__func__, PS_LOG_WARN, "PPMERGE.SCALE and PPMERGE.ZERO have been set " … … 137 137 fromConcepts = true; 138 138 (*zeros)->data.F32[i][cellNum] = zero; 139 psTrace( __func__, 9, "Zero for input %ld, chip %ld, cell %ld: %f\n", i, j, k, zero);139 psTrace("ppMerge", 9, "Zero for input %ld, chip %ld, cell %ld: %f\n", i, j, k, zero); 140 140 } else if (!first && fromConcepts) { 141 141 psLogMsg(__func__, PS_LOG_WARN, "PPMERGE.SCALE and PPMERGE.ZERO have been set " … … 175 175 continue; 176 176 } 177 psTrace( __func__, 9, "Opening %s to get background...\n", name);177 psTrace("ppMerge", 9, "Opening %s to get background...\n", name); 178 178 psFits *inFile = data->files->data[i]; // The FITS file to read 179 179 pmFPA *fpa = data->in->data[i]; // The FPA for this input … … 263 263 psFree(sampleMask); 264 264 background->data.F32[i][cellNum] = getStat(bgStats, options->mean); 265 psTrace( __func__, 3, "Background for %s, cell %d is %f\n", name, cellNum,265 psTrace("ppMerge", 3, "Background for %s, cell %d is %f\n", name, cellNum, 266 266 background->data.F32[i][cellNum]); 267 267 } … … 279 279 if (psTraceGetLevel("ppMerge") > 9) { 280 280 for (int i = 0; i < gains->n; i++) { 281 psTrace( __func__, 10, "Gain for cell %d is %f\n", i, gains->data.F32[i]);281 psTrace("ppMerge", 10, "Gain for cell %d is %f\n", i, gains->data.F32[i]); 282 282 } 283 283 } … … 322 322 for (int i = 0; i < scalesDeref->numRows; i++) { 323 323 for (int j = 0; j < scalesDeref->numCols; j++) { 324 psTrace( __func__, 9, "Scale for exposure %d, cell %d is: %f\n", i, j,324 psTrace("ppMerge", 9, "Scale for exposure %d, cell %d is: %f\n", i, j, 325 325 scalesDeref->data.F32[i][j]); 326 326 } … … 331 331 for (int i = 0; i < zerosDeref->numRows; i++) { 332 332 for (int j = 0; j < zerosDeref->numCols; j++) { 333 psTrace( __func__, 9, "Zero for exposure %d, cell %d is: %f\n", i, j,333 psTrace("ppMerge", 9, "Zero for exposure %d, cell %d is: %f\n", i, j, 334 334 zerosDeref->data.F32[i][j]); 335 335 }
Note:
See TracChangeset
for help on using the changeset viewer.
