IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2009, 8:40:07 PM (17 years ago)
Author:
eugene
Message:

incorporating changes from 16bit mask upgrades (eam_branch_20081230)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceFitSet.c

    r21163 r21183  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2009-01-24 20:52:26 $
    10  *
     8 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-01-27 06:39:38 $
    1110 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1211 *
     
    394393            for (int j = 0; j < paramOne->n; j++) {
    395394                if (j == PM_PAR_I0) continue;
    396                 constraint->paramMask->data.U8[n + j] = 1;
     395                constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[n + j] = 1;
    397396            }
    398397            break;
     
    403402                if (j == PM_PAR_YPOS) continue;
    404403                if (j == PM_PAR_I0) continue;
    405                 constraint->paramMask->data.U8[n + j] = 1;
     404                constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[n + j] = 1;
    406405            }
    407406            break;
    408407          case PM_SOURCE_FIT_EXT:
    409408            // EXT model fits all params (except sky)
    410             constraint->paramMask->data.U8[n + PM_PAR_SKY] = 1;
     409            constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[n + PM_PAR_SKY] = 1;
    411410            break;
    412411          default:
     
    445444                     psArray *modelSet,
    446445                     pmSourceFitMode mode,
    447                      psMaskType maskVal)
     446                     psImageMaskType maskVal)
    448447{
    449448    psTrace("psModules.objects", 3, "---- %s begin ----\n", __func__);
     
    469468        for (psS32 j = 0; j < source->pixels->numCols; j++) {
    470469            // skip masked points
    471             if (source->maskObj->data.U8[i][j] & maskVal) {
     470            if (source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[i][j] & maskVal) {
    472471                continue;
    473472            }
     
    515514    // create the minimization constraints
    516515    psMinConstraint *constraint = psMinConstraintAlloc();
    517     constraint->paramMask = psVectorAlloc (thisSet->nParamSet, PS_TYPE_U8);
     516    constraint->paramMask = psVectorAlloc (thisSet->nParamSet, PS_TYPE_VECTOR_MASK);
    518517    constraint->checkLimits = pmSourceFitSetCheckLimits;
    519518
     
    528527    if (psTraceGetLevel("psModules.objects") >= 5) {
    529528        for (int i = 0; i < params->n; i++) {
    530             fprintf (stderr, "%d %f %d\n", i, params->data.F32[i], constraint->paramMask->data.U8[i]);
     529            fprintf (stderr, "%d %f %d\n", i, params->data.F32[i], constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i]);
    531530        }
    532531    }
     
    560559    psVector *dparams = psVectorAlloc (thisSet->nParamSet, PS_TYPE_F32);
    561560    for (int i = 0; i < dparams->n; i++) {
    562         if ((constraint->paramMask != NULL) && constraint->paramMask->data.U8[i])
     561        if ((constraint->paramMask != NULL) && constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i])
    563562            continue;
    564563        dparams->data.F32[i] = sqrt(covar->data.F32[i][i]);
     
    568567    if (constraint->paramMask != NULL) {
    569568        psVector *delta = psVectorAlloc (params->n, PS_TYPE_F32);
    570         psVector *altmask = psVectorAlloc (params->n, PS_TYPE_U8);
    571         altmask->data.U8[0] = 1;
     569        psVector *altmask = psVectorAlloc (params->n, PS_TYPE_VECTOR_MASK);
     570        altmask->data.PS_TYPE_VECTOR_MASK_DATA[0] = 1;
    572571        for (int i = 1; i < dparams->n; i++) {
    573             altmask->data.U8[i] = (constraint->paramMask->data.U8[i]) ? 0 : 1;
     572            altmask->data.PS_TYPE_VECTOR_MASK_DATA[i] = (constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) ? 0 : 1;
    574573        }
    575574        psMinimizeGaussNewtonDelta(delta, params, altmask, x, y, yErr, pmSourceFitSetFunction);
    576575
    577576        for (int i = 0; i < dparams->n; i++) {
    578             if (!constraint->paramMask->data.U8[i])
     577            if (!constraint->paramMask->data.PS_TYPE_VECTOR_MASK_DATA[i])
    579578                continue;
    580579            // note that delta is the value *subtracted* from the parameter
Note: See TracChangeset for help on using the changeset viewer.