Changeset 15562 for trunk/psModules/src/objects/pmSourceFitSet.c
- Timestamp:
- Nov 9, 2007, 3:09:20 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceFitSet.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceFitSet.c
r15055 r15562 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $9 * @date $Date: 2007- 09-28 00:39:41$8 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-11-10 01:09:20 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 79 79 } 80 80 81 bool psMemCheckSourceFitSetData(psPtr ptr) 82 { 83 PS_ASSERT_PTR(ptr, false); 84 return ( psMemGetDeallocator(ptr) == (psFreeFunc) pmSourceFitSetDataFree); 85 } 86 87 81 88 // this function is called with the full set of parameters and the beta values in a single vector 82 bool pmSourceFitSetCheckLimits (psMinConstraintMode mode, int nParam, float *params, float *betas) 83 { 84 assert (thisSet); 89 bool pmSourceFitSetCheckLimits (psMinConstraintMode mode, int nParam, float *params, 90 float *betas) 91 { 92 PS_ASSERT_PTR_NON_NULL(thisSet, false); 85 93 86 94 // nParam is the parameter in the full sequence. determine which single model this comes from … … 109 117 110 118 // merge parameters from FitSet models into single param and deriv vectors 111 bool pmSourceFitSetJoin (psVector *deriv, psVector *param, pmSourceFitSetData *set) { 112 113 assert (set); 119 bool pmSourceFitSetJoin (psVector *deriv, psVector *param, pmSourceFitSetData *set) 120 { 121 PS_ASSERT_PTR_NON_NULL(set, false); 122 PS_ASSERT_PTR_NON_NULL(param, false); 123 114 124 assert (set->paramSet->n == set->derivSet->n); 115 125 … … 138 148 // distribute parameters from single param and deriv vectors into FitSet models 139 149 bool pmSourceFitSetSplit (pmSourceFitSetData *set, const psVector *deriv, const psVector *param) { 140 141 assert (set); 150 PS_ASSERT_PTR_NON_NULL(set, false); 151 PS_ASSERT_PTR_NON_NULL(param, false); 152 142 153 assert (set->paramSet->n == set->derivSet->n); 143 154 … … 159 170 } 160 171 161 bool pmSourceFitSetValues (pmSourceFitSetData *set, const psVector *dparam, const psVector *param, pmSource *source, psMinimization *myMin, int nPix, bool fitStatus) { 162 172 bool pmSourceFitSetValues (pmSourceFitSetData *set, const psVector *dparam, 173 const psVector *param, pmSource *source, 174 psMinimization *myMin, int nPix, bool fitStatus) 175 { 176 PS_ASSERT_PTR_NON_NULL(set, false); 163 177 bool onPic = true; 164 165 assert (set);166 178 167 179 int n = 0; … … 203 215 psF32 pmSourceFitSetFunction(psVector *deriv, const psVector *param, const psVector *x) 204 216 { 217 PS_ASSERT_PTR_NON_NULL(thisSet, NAN); 205 218 float chisqSum = 0.0; 206 219 float chisqOne = 0.0; 207 208 assert (thisSet);209 220 pmSourceFitSetSplit (thisSet, deriv, param); 210 221 … … 225 236 226 237 // XXX allow the mode to be a function of the object (eg, S/N) 227 bool pmSourceFitSetMasks (psMinConstraint *constraint, pmSourceFitSetData *set, pmSourceFitMode mode) { 238 bool pmSourceFitSetMasks (psMinConstraint *constraint, pmSourceFitSetData *set, 239 pmSourceFitMode mode) 240 { 241 PS_ASSERT_PTR_NON_NULL(set, false); 242 PS_ASSERT_PTR_NON_NULL(constraint, false); 228 243 229 244 // unmask everyone
Note:
See TracChangeset
for help on using the changeset viewer.
