IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6820


Ignore:
Timestamp:
Apr 9, 2006, 8:45:42 AM (20 years ago)
Author:
magnier
Message:

working to non-poisson weights

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rel10_ifa/psModules/src/objects/pmSourceFitModel.c

    r6751 r6820  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.1.2.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-04-01 02:47:20 $
     8 *  @version $Revision: 1.1.2.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-04-09 18:45:42 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6666
    6767    int nParams = PSF ? 4 : params->n;
     68    psF32 dSky = source->moments->dSky;
    6869
    6970    // maximum number of valid pixels
     
    9596            y->data.F32[nPix] = source->pixels->data.F32[i][j];
    9697            // psMinimizeLMChi2 takes wt = 1/dY^2
    97             yErr->data.F32[nPix] = 1.0 / source->weight->data.F32[i][j];
     98            if (POISSON_WEIGHT) {
     99                yErr->data.F32[nPix] = 1.0 / source->weight->data.F32[i][j];
     100            } else {
     101                yErr->data.F32[nPix] = 1.0 / dSky;
     102            }
     103            // XXX EAM : suggestion from RHL is to use the local sky as weight
     104            // to avoid the bias from systematic errors
     105            // here we would just use the source sky variance
    98106            nPix++;
    99107        }
     
    113121
    114122    // XXX EAM : the new minimization API supplies the constraints as a struct
     123    // XXX the chisq if a fcn of source flux. the minimization criterion should
     124    // probably  be scaled somehow by flux.  measure the trend?  it depends on
     125    // the about of systematic error in the models themselves...
    115126    psMinimization *myMin = psMinimizationAlloc(PM_SOURCE_FIT_MODEL_NUM_ITERATIONS,
    116127                            PM_SOURCE_FIT_MODEL_TOLERANCE);
Note: See TracChangeset for help on using the changeset viewer.