IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 19, 2007, 4:22:26 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 under psphot (which has similar changes) and does not
crash, but neither is it successful in marking all bad pixels (EAM
will investigate). 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/psModules/src/objects/pmSourceFitModel.c

    r13803 r13898  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-06-13 23:41:51 $
     8 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-06-20 02:22:26 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5252bool pmSourceFitModel (pmSource *source,
    5353                       pmModel *model,
    54                        pmSourceFitMode mode)
     54                       pmSourceFitMode mode,
     55                       psMaskType maskVal)
    5556{
    5657    psTrace("psModules.objects", 5, "---- %s begin ----\n", __func__);
     
    7778        for (psS32 j = 0; j < source->pixels->numCols; j++) {
    7879            // skip masked points
    79             if (source->maskObj->data.U8[i][j]) {
     80            if (source->maskObj->data.U8[i][j] & maskVal) {
    8081                continue;
    8182            }
     
    324325bool pmSourceFitSet (pmSource *source,
    325326                     psArray *modelSet,
    326                      pmSourceFitMode mode)
     327                     pmSourceFitMode mode,
     328                     psMaskType maskVal)
    327329{
    328330    psTrace("psModules.objects", 3, "---- %s begin ----\n", __func__);
     
    349351        for (psS32 j = 0; j < source->pixels->numCols; j++) {
    350352            // skip masked points
    351             if (source->maskObj->data.U8[i][j]) {
     353            if (source->maskObj->data.U8[i][j] & maskVal) {
    352354                continue;
    353355            }
     
    524526
    525527        // set the model success or failure status
    526         model->flags |= PM_MODEL_STATUS_FITTED;
    527         if (!fitStatus) model->flags |= PM_MODEL_STATUS_NONCONVERGE;
     528        model->flags |= PM_MODEL_STATUS_FITTED;
     529        if (!fitStatus) model->flags |= PM_MODEL_STATUS_NONCONVERGE;
    528530
    529531        // models can go insane: reject these
Note: See TracChangeset for help on using the changeset viewer.