IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 19, 2007, 4:40:44 PM (19 years ago)
Author:
Paul Price
Message:

Extensive changes to APIs to allow use of a nominated value to mask
against (the maskVal). Previously, the mask values were either
hard-coded (e.g., PM_MASK_SAT) or taken as anything non-zero. The
code is tested with psModules (which has similar changes) and does not
crash, but neither is it successful in marking all bad pixels. For
this reason, I have left the "gutter" pixels (cell gaps) set to 0
instead of NAN in pmFPAMosaic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotImageMedian.c

    r13866 r13900  
    4040// generate the median in NxN boxes, clipping heavily
    4141// linear interpolation to generate full-scale model
    42 bool psphotImageMedian (pmConfig *config, const pmFPAview *view)
     42bool psphotImageMedian (pmConfig *config, const pmFPAview *view, psMaskType maskVal)
    4343{
    4444    bool status = true;
     
    195195            // XXX don't bother trying if there are no valid pixels...
    196196
    197             if (psImageBackground(stats, subset, submask, 0xff, rng)) {
     197            if (psImageBackground(stats, subset, submask, maskVal, rng)) {
    198198                if (stats->options & PS_STAT_ROBUST_QUARTILE) {
    199199                    modelData[iy][ix] = stats->robustMedian;
     
    205205                psStatsOptions currentOptions = stats->options;
    206206                stats->options = PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV;
    207                 if (!psImageBackground(stats, subset, submask, 0xff, rng)) {
     207                if (!psImageBackground(stats, subset, submask, maskVal, rng)) {
    208208                    psLogMsg ("psphot", PS_LOG_WARN, "Failed to estimate background using ROBUST_MEDIAN for "
    209209                               "(%dx%d, (row0,col0) = (%d,%d)",
Note: See TracChangeset for help on using the changeset viewer.