IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21144


Ignore:
Timestamp:
Jan 19, 2009, 4:57:24 PM (17 years ago)
Author:
eugene
Message:

bug fixes for mask types

Location:
branches/eam_branch_20081230
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081230/psModules/src/objects/pmPSF_IO.c

    r20937 r21144  
    66 *  @author EAM, IfA
    77 *
    8  *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2008-12-08 02:51:14 $
     8 *  @version $Revision: 1.36.4.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-01-20 02:57:05 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    871871            psFitsReadImageBuffer(psf->residuals->Ry, file->fits, fullImage, 2); // Desired pixels
    872872        }
     873        // XXX notice that we are not saving the resid->mask
    873874    }
    874875
  • branches/eam_branch_20081230/psModules/src/objects/pmResiduals.c

    r21079 r21144  
    44 *
    55 * @author EAM, IfA
    6  * @version $Revision: 1.3.52.1 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2009-01-02 05:13:00 $
     6 * @version $Revision: 1.3.52.2 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2009-01-20 02:57:05 $
    88 * Copyright 2004 IfA, University of Hawaii
    99 */
     
    4343    resid->Ry  = psImageAlloc (nX, nY, PS_TYPE_F32);
    4444    resid->weight = psImageAlloc (nX, nY, PS_TYPE_F32);
    45     resid->mask   = psImageAlloc (nX, nY, PS_TYPE_U8);
     45    resid->mask   = psImageAlloc (nX, nY, PM_TYPE_RESID_MASK);
     46
    4647    // NOTE : the residual mask is internal only : 1 byte is sufficient
    47     // XXX abstract the resid->mask type??
    4848
    4949    resid->xBin = xBin;
  • branches/eam_branch_20081230/psModules/src/objects/pmResiduals.h

    r15562 r21144  
    44 *
    55 * @author EAM, IfA
    6  * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-11-10 01:09:20 $
     6 * @version $Revision: 1.3.52.1 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2009-01-20 02:57:05 $
    88 * Copyright 2004 IfA, University of Hawaii
    99 */
     
    3131bool psMemCheckResiduals(psPtr ptr);
    3232
     33// macros to abstract the resid mask type : these values must be consistent
     34#define PM_TYPE_RESID_MASK PS_TYPE_U8        /**< the psElemType to use for mask image */
     35#define PM_TYPE_RESID_MASK_DATA U8           /**< the data member to use for mask image */
     36#define PM_TYPE_RESID_MASK_NAME "psU8"       /**< the data type for mask as a string */
     37typedef psU8 pmResidMaskType;               ///< the C datatype for a mask image
     38#define PM_NOT_RESID_MASK(A)(UINT8_MAX-(A))
     39
    3340/// @}
    3441# endif
  • branches/eam_branch_20081230/psModules/src/objects/pmSourceFitSet.c

    r21075 r21144  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.12.4.1 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2008-12-31 20:31:29 $
     8 *  @version $Revision: 1.12.4.2 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-01-20 02:57:05 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    281281            for (int j = 0; j < paramOne->n; j++) {
    282282                if (j == PM_PAR_I0) continue;
    283                 constraint->paramMask->data.PS_TYPE_IMAGE_MASK_DATA[n + j] = 1;
     283                constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[n + j] = 1;
    284284            }
    285285            break;
     
    290290                if (j == PM_PAR_YPOS) continue;
    291291                if (j == PM_PAR_I0) continue;
    292                 constraint->paramMask->data.PS_TYPE_IMAGE_MASK_DATA[n + j] = 1;
     292                constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[n + j] = 1;
    293293            }
    294294            break;
    295295          case PM_SOURCE_FIT_EXT:
    296296            // EXT model fits all params (except sky)
    297             constraint->paramMask->data.PS_TYPE_IMAGE_MASK_DATA[n + PM_PAR_SKY] = 1;
     297            constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[n + PM_PAR_SKY] = 1;
    298298            break;
    299299          default:
  • branches/eam_branch_20081230/psphot/src/psphotMakeResiduals.c

    r21090 r21144  
    194194                resid->Rx->data.F32[oy][ox] = 0.0;
    195195                resid->Ry->data.F32[oy][ox] = 0.0;
    196                 resid->mask->data.PS_TYPE_IMAGE_MASK_DATA[oy][ox] = badMask;
     196                resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox] = badMask;
    197197                continue;
    198198            }
     
    228228
    229229                if (fabs(resid->Ro->data.F32[oy][ox]) < pixelSN*fluxStats->sampleStdev/sqrt(nKeep)) {
    230                   resid->mask->data.PS_TYPE_IMAGE_MASK_DATA[oy][ox] = 1;
    231                 }
    232 
    233                 // fprintf (stderr, "res: %2d %2d : %6.4f  %6.4f  %6.4f   %3d  %1d\n", ox, oy, resid->Ro->data.F32[oy][ox], fluxStats->sampleStdev, fluxStats->sampleStdev/sqrt(nKeep), nKeep, resid->mask->data.PS_TYPE_IMAGE_MASK_DATA[oy][ox]);
     230                  resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox] = 1;
     231                }
     232
     233                // fprintf (stderr, "res: %2d %2d : %6.4f  %6.4f  %6.4f   %3d  %1d\n", ox, oy, resid->Ro->data.F32[oy][ox], fluxStats->sampleStdev, fluxStats->sampleStdev/sqrt(nKeep), nKeep, resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox]);
    234234
    235235            } else {
     
    268268
    269269                float dRo = sqrt(A->data.F32[0][0]);
    270                 // fprintf (stderr, "res: %2d %2d : %6.4f  %6.4f  %6.4f   %3d  %1d\n", ox, oy, resid->Ro->data.F32[oy][ox], dRo, dRo/sqrt(nKeep), nKeep, resid->mask->data.PS_TYPE_IMAGE_MASK_DATA[oy][ox]);
     270                // fprintf (stderr, "res: %2d %2d : %6.4f  %6.4f  %6.4f   %3d  %1d\n",
     271                // ox, oy, resid->Ro->data.F32[oy][ox], dRo, dRo/sqrt(nKeep), nKeep, resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox]);
    271272
    272273                if (fabs(resid->Ro->data.F32[oy][ox]) < pixelSN*dRo/sqrt(nKeep)) {
    273                   resid->mask->data.PS_TYPE_IMAGE_MASK_DATA[oy][ox] = 1;
     274                  resid->mask->data.PM_TYPE_RESID_MASK_DATA[oy][ox] = 1;
    274275                }
    275276                //resid->weight->data.F32[oy][ox] = XXX;
Note: See TracChangeset for help on using the changeset viewer.