Changeset 15980 for trunk/psModules/src/objects/pmSourceFitSet.c
- Timestamp:
- Jan 2, 2008, 10:39:04 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceFitSet.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceFitSet.c
r15622 r15980 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $9 * @date $Date: 200 7-11-15 23:18:20$8 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2008-01-02 20:39:04 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 120 120 bool pmSourceFitSetJoin (psVector *deriv, psVector *param, pmSourceFitSetData *set) 121 121 { 122 assert (set); 123 assert (set->paramSet->n == set->derivSet->n); 124 122 PS_ASSERT_PTR_NON_NULL(set, false); 123 PS_ASSERT_PTR_NON_NULL(set->paramSet, false); 124 PS_ASSERT_PTR_NON_NULL(set->derivSet, false); 125 PS_ASSERT_VECTORS_SIZE_EQUAL(set->paramSet, set->derivSet, false); 125 126 int n = 0; 127 int sum = 0; 128 for (int i = 0; i < set->paramSet->n; i++) { 129 sum+= set->paramSet->n; 130 } 131 132 // Must assert that the deriv and param psVectors are large enough, or else 133 // a seg fault occurs. 134 // XXX: Put the correct error call in here: 135 if (0) { 136 if (deriv->n < sum || param->n < sum) { 137 PS_ASSERT_PTR_NON_NULL(0, false); 138 } 139 } 140 126 141 for (int i = 0; i < set->paramSet->n; i++) { 127 142 … … 150 165 bool pmSourceFitSetSplit (pmSourceFitSetData *set, const psVector *deriv, const psVector *param) 151 166 { 152 assert (param); 153 assert (set); 154 assert (set->paramSet->n == set->derivSet->n); 167 PS_ASSERT_VECTOR_NON_NULL(param, false); 168 PS_ASSERT_PTR_NON_NULL(set, false); 169 PS_ASSERT_PTR_NON_NULL(set->paramSet, false); 170 PS_ASSERT_PTR_NON_NULL(set->derivSet, false); 171 PS_ASSERT_VECTORS_SIZE_EQUAL(set->paramSet, set->derivSet, false); 155 172 156 173 int n = 0; … … 175 192 psMinimization *myMin, int nPix, bool fitStatus) 176 193 { 177 assert (set); 194 PS_ASSERT_PTR_NON_NULL(set, false); 195 PS_ASSERT_PTR_NON_NULL(set->paramSet, false); 196 PS_ASSERT_VECTOR_NON_NULL(dparam, false); 197 PS_ASSERT_VECTOR_NON_NULL(param, false); 198 PS_ASSERT_PTR_NON_NULL(source, false); 199 PS_ASSERT_PTR_NON_NULL(source->pixels, false); 200 PS_ASSERT_PTR_NON_NULL(myMin, false); 201 178 202 bool onPic = true; 179 203 … … 216 240 psF32 pmSourceFitSetFunction(psVector *deriv, const psVector *param, const psVector *x) 217 241 { 218 assert (thisSet);242 PS_ASSERT_PTR_NON_NULL(thisSet, NAN); 219 243 float chisqSum = 0.0; 220 244 float chisqOne = 0.0;
Note:
See TracChangeset
for help on using the changeset viewer.
