IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10406


Ignore:
Timestamp:
Dec 1, 2006, 2:51:56 PM (20 years ago)
Author:
Paul Price
Message:

Propagating API change to psImageBackground

Location:
trunk/psModules/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPA_JPEG.c

    r10179 r10406  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-11-24 20:54:09 $
     7 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-12-02 00:51:55 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    131131    // XXX we need to decide where the scale will come from in the long term
    132132    psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0);
    133     psStats *stats = psImageBackground(readout->image, NULL, 0, 0.25, 0.75, 10000, PS_STAT_ROBUST_MEDIAN, rng);
     133    psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_QUARTILE);
     134    stats->nSubsample = 10000;
     135    if (!psImageBackground(stats, readout->image, NULL, 0, rng)) {
     136        psError(PS_ERR_UNKNOWN, false, "Unable to write JPEG of readout.\n");
     137        psFree(rng);
     138        psFree(stats);
     139        return false;
     140    }
    134141    psFree(rng);
    135142
  • trunk/psModules/src/detrend/pmMaskBadPixels.c

    r10330 r10406  
    120120
    121121    // XXX note that this now will accept any of several stats options
    122     psStats *stats = psImageBackground(image, mask, maskVal, 0.25, 0.75,
    123                                        frac * image->numCols * image->numRows, PS_STAT_ROBUST_MEDIAN, rng); // Image statistics
    124     if (!stats || !isfinite(stats->robustMedian) || !isfinite(stats->robustUQ) ||
    125             !isfinite(stats->robustLQ)) {
     122    psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_QUARTILE);
     123    stats->nSubsample = frac * image->numCols * image->numRows;
     124    if (!psImageBackground(stats, image, mask, maskVal, rng) ||
     125            !isfinite(stats->robustMedian) || !isfinite(stats->robustUQ) || !isfinite(stats->robustLQ)) {
    126126        psError(PS_ERR_UNKNOWN, false, "Unable to measure image statistics.\n");
    127127        psFree(stats);
Note: See TracChangeset for help on using the changeset viewer.