IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 22, 2009, 4:05:27 PM (17 years ago)
Author:
Paul Price
Message:

Adding trace statements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFitsScale.c

    r23259 r24901  
    4646    psAssert(image, "impossible");
    4747    psAssert(options, "impossible");
     48
     49    psTrace("psLib.fits", 3, "Scaling image to preserve dynamic range");
    4850
    4951    double range = pow(2.0, options->bitpix) - 1.0; // Range of values for target BITPIX, reduced by the BLANK
     
    109111    psAssert(options, "impossible");
    110112
     113    psTrace("psLib.fits", 3, "Scaling image by statistics");
     114
    111115    // Measure the mean and stdev
    112116    // psImageBackground automatically excludes pixels that are non-finite, so we don't need to bother about a
     
    131135    }
    132136
     137    psTrace("psLib.fits", 5, "Mean: %lf Stdev: %lf", mean, stdev);
     138
    133139    long range = 1 << options->stdevBits;  // Range of values to carry standard deviation
    134140    *bscale = stdev / (double) range;
     141
     142    psTrace("psLib.fits", 5, "Number of bits: %ld BSCALE: %lf", range, *bscale);
    135143
    136144    double imageVal;                    // Value on image
     
    157165
    158166    *bzero = imageVal - *bscale * diskVal;
     167
     168    psTrace("psLib.fits", 5, "Image %lf corresponds to disk %ld --> BZERO: %lf", imageVal, diskVal, *bzero);
    159169
    160170    return true;
Note: See TracChangeset for help on using the changeset viewer.