Changeset 6379 for trunk/psphot/src/pmSourceFitSet.c
- Timestamp:
- Feb 7, 2006, 8:52:03 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/pmSourceFitSet.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/pmSourceFitSet.c
r5993 r6379 105 105 for (psS32 i = 0; i < source->pixels->numRows; i++) { 106 106 for (psS32 j = 0; j < source->pixels->numCols; j++) { 107 // skip masked points 107 108 if (source->mask->data.U8[i][j]) { 108 109 continue; 109 110 } 111 // skip zero-weight points 112 if (source->weight->data.F32[i][j] == 0) { 113 continue; 114 } 110 115 psVector *coord = psVectorAlloc(2, PS_TYPE_F32); 111 116 … … 115 120 x->data[nPix] = (psPtr *) coord; 116 121 y->data.F32[nPix] = source->pixels->data.F32[i][j]; 117 118 122 // psMinimizeLMChi2 takes wt = 1/dY^2 119 if (source->weight->data.F32[i][j] == 0) {120 continue;121 }122 123 yErr->data.F32[nPix] = 1.0 / source->weight->data.F32[i][j]; 123 124 nPix++; … … 131 132 psFree (y); 132 133 psFree (yErr); 134 psFree (params); 135 psFree (dparams); 136 psFree (paramMask); 133 137 return(false); 134 138 } … … 180 184 dparams->data.F32[i] = delta->data.F64[i]; 181 185 } 186 psFree (delta); 182 187 } 183 188 … … 217 222 psFree(covar); 218 223 psFree(paramMask); 224 psFree(params); 225 psFree(dparams); 226 psFree(params_min); 227 psFree(params_max); 228 psFree(beta_lim); 229 230 // free static memory used by pmModelFitSet 231 pmModelFitSetClear (); 219 232 220 233 rc = (onPic && fitStatus);
Note:
See TracChangeset
for help on using the changeset viewer.
