Changeset 6820
- Timestamp:
- Apr 9, 2006, 8:45:42 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/objects/pmSourceFitModel.c
r6751 r6820 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.1.2. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-04-0 1 02:47:20$8 * @version $Revision: 1.1.2.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-04-09 18:45:42 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 66 66 67 67 int nParams = PSF ? 4 : params->n; 68 psF32 dSky = source->moments->dSky; 68 69 69 70 // maximum number of valid pixels … … 95 96 y->data.F32[nPix] = source->pixels->data.F32[i][j]; 96 97 // 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 98 106 nPix++; 99 107 } … … 113 121 114 122 // 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... 115 126 psMinimization *myMin = psMinimizationAlloc(PM_SOURCE_FIT_MODEL_NUM_ITERATIONS, 116 127 PM_SOURCE_FIT_MODEL_TOLERANCE);
Note:
See TracChangeset
for help on using the changeset viewer.
