Changeset 21363 for trunk/psModules/src/objects/pmSourceFitModel.c
- Timestamp:
- Feb 5, 2009, 4:31:25 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceFitModel.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceFitModel.c
r21183 r21363 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $9 * @date $Date: 2009-0 1-27 06:39:38$8 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-06 02:31:25 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 62 62 PS_ASSERT_PTR_NON_NULL(source->pixels, false); 63 63 PS_ASSERT_PTR_NON_NULL(source->maskObj, false); 64 PS_ASSERT_PTR_NON_NULL(source-> weight, false);64 PS_ASSERT_PTR_NON_NULL(source->variance, false); 65 65 66 66 psBool fitStatus = true; … … 84 84 continue; 85 85 } 86 // skip zero- weightpoints87 if (source-> weight->data.F32[i][j] == 0) {86 // skip zero-variance points 87 if (source->variance->data.F32[i][j] == 0) { 88 88 continue; 89 89 } … … 102 102 103 103 // psMinimizeLMChi2 takes wt = 1/dY^2. suggestion from RHL is to use the local sky 104 // as weightto avoid the bias from systematic errors here we would just use the104 // as variance to avoid the bias from systematic errors here we would just use the 105 105 // source sky variance 106 106 if (PM_SOURCE_FIT_MODEL_PIX_WEIGHTS) { 107 yErr->data.F32[nPix] = 1.0 / source-> weight->data.F32[i][j];107 yErr->data.F32[nPix] = 1.0 / source->variance->data.F32[i][j]; 108 108 } else { 109 109 yErr->data.F32[nPix] = 1.0 / PM_SOURCE_FIT_MODEL_WEIGHT;
Note:
See TracChangeset
for help on using the changeset viewer.
