IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9824


Ignore:
Timestamp:
Nov 1, 2006, 2:31:28 PM (20 years ago)
Author:
Paul Price
Message:

Fixing up trace components.

Location:
trunk/ppMerge/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeCheckInputs.c

    r9737 r9824  
    5454            continue;
    5555        }
    56         psTrace(__func__, 1, "Checking input file %s....\n", name);
     56        psTrace("ppMerge", 1, "Checking input file %s....\n", name);
    5757        psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read
    5858        if (!inFile) {
     
    6565        psMetadata *header = psFitsReadHeader(NULL, inFile); // The FITS (primary) header
    6666        if (psTraceGetLevel("ppMerge") > 9) {
    67             psTrace(__func__, 9, "Primary header:\n");
     67            psTrace("ppMerge", 9, "Primary header:\n");
    6868            psMetadataPrint(stdout, header, 9);
    6969        }
     
    100100        // Use the first valid input as the basis for the output --- including the header
    101101        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);
    103103            data->out = pmFPAConstruct(config->camera);
    104104            pmFPAview *view = pmFPAAddSourceFromHeader(data->out, header, options->format);
     
    110110        psFree(header);
    111111
    112         psTrace(__func__, 3, "%s checks out.\n", name);
     112        psTrace("ppMerge", 3, "%s checks out.\n", name);
    113113        numGood++;
    114114    }
     
    131131    }
    132132    data->numCells = numCells;
    133     psTrace(__func__, 3, "Output has %d cells.\n", numCells);
     133    psTrace("ppMerge", 3, "Output has %d cells.\n", numCells);
    134134
    135     psTrace(__func__, 3, "We have %d good inputs.\n", numGood);
     135    psTrace("ppMerge", 3, "We have %d good inputs.\n", numGood);
    136136    if (numGood > 1) {
    137137        return data;
  • trunk/ppMerge/src/ppMergeCombine.c

    r9737 r9824  
    7070        }
    7171        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));
    7575    }
    7676    return;
     
    172172                                                                options->shutterRej,
    173173                                                                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);
    175175                } else {
    176176                    psError(PS_ERR_UNKNOWN, true, "Not enough images to combine: %d\n", numRead);
     
    219219                    if (numRead > 0) {
    220220                        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);
    222222                    }
    223223                    numScan++;
     
    252252                if (numRead > 0) {
    253253                    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);
    255255                }
    256256
     
    291291            // Write the pixels
    292292            if (cell->hdu) {
    293                 psTrace(__func__, 5, "Writing out cell HDU.\n");
     293                psTrace("ppMerge", 5, "Writing out cell HDU.\n");
    294294                pmCellWrite(cell, data->outFile, config->database, false);
    295295                pmCellFreeData(cell);
     
    306306        // Write the pixels
    307307        if (chip->hdu) {
    308             psTrace(__func__, 5, "Writing out chip HDU.\n");
     308            psTrace("ppMerge", 5, "Writing out chip HDU.\n");
    309309            pmChipWrite(chip, data->outFile, config->database, false, false);
    310310            pmChipFreeData(chip);
     
    314314    if (data->out->hdu) {
    315315        // Write the pixels
    316         psTrace(__func__, 5, "Writing out FPA HDU.\n");
     316        psTrace("ppMerge", 5, "Writing out FPA HDU.\n");
    317317        pmFPAWrite(data->out, data->outFile, config->database, false, false);
    318318    }
  • trunk/ppMerge/src/ppMergeScaleZero.c

    r9737 r9824  
    116116                        fromConcepts = true;
    117117                        (*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);
    119119                    } else if (!first && fromConcepts) {
    120120                        psLogMsg(__func__, PS_LOG_WARN, "PPMERGE.SCALE and PPMERGE.ZERO have been set "
     
    137137                        fromConcepts = true;
    138138                        (*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);
    140140                    } else if (!first && fromConcepts) {
    141141                        psLogMsg(__func__, PS_LOG_WARN, "PPMERGE.SCALE and PPMERGE.ZERO have been set "
     
    175175            continue;
    176176        }
    177         psTrace(__func__, 9, "Opening %s to get background...\n", name);
     177        psTrace("ppMerge", 9, "Opening %s to get background...\n", name);
    178178        psFits *inFile = data->files->data[i]; // The FITS file to read
    179179        pmFPA *fpa = data->in->data[i]; // The FPA for this input
     
    263263                    psFree(sampleMask);
    264264                    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,
    266266                            background->data.F32[i][cellNum]);
    267267                }
     
    279279        if (psTraceGetLevel("ppMerge") > 9) {
    280280            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]);
    282282            }
    283283        }
     
    322322        for (int i = 0; i < scalesDeref->numRows; i++) {
    323323            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,
    325325                        scalesDeref->data.F32[i][j]);
    326326            }
     
    331331        for (int i = 0; i < zerosDeref->numRows; i++) {
    332332            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,
    334334                        zerosDeref->data.F32[i][j]);
    335335            }
Note: See TracChangeset for help on using the changeset viewer.