IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10180


Ignore:
Timestamp:
Nov 24, 2006, 10:55:48 AM (19 years ago)
Author:
magnier
Message:

mask fitted parameters when measuring GaussNewtonDelta

File:
1 edited

Legend:

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

    r10077 r10180  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-11-18 09:52:14 $
     8 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-11-24 20:55:48 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    207207
    208208    // get the Gauss-Newton distance for fixed model parameters
     209    // XXX I need to hold the fitted parameters fixed!
    209210    if (paramMask != NULL) {
    210211        psVector *delta = psVectorAlloc (params->n, PS_TYPE_F64);
    211         psMinimizeGaussNewtonDelta(delta, params, NULL, x, y, yErr, modelFunc);
     212        psVector *altmask = psVectorAlloc (params->n, PS_TYPE_U8);
     213        for (int i = 0; i < dparams->n; i++) {
     214            if (paramMask->data.U8[i]) {
     215                altmask->data.U8[i] = 0;
     216            } else {
     217                altmask->data.U8[i] = 1;
     218            }
     219        }
     220        psMinimizeGaussNewtonDelta(delta, params, altmask, x, y, yErr, modelFunc);
    212221        for (int i = 0; i < dparams->n; i++) {
    213222            if (!paramMask->data.U8[i])
     
    216225        }
    217226        psFree (delta);
     227        psFree (altmask);
    218228    }
    219229
Note: See TracChangeset for help on using the changeset viewer.