Changeset 21223 for trunk/psModules/test/objects/tap_pmSourceUtils.c
- Timestamp:
- Jan 29, 2009, 10:46:54 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/objects/tap_pmSourceUtils.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/objects/tap_pmSourceUtils.c
r15985 r21223 168 168 src->moments = pmMomentsAlloc(); 169 169 170 src->moments->Sx = 1.0; 171 src->moments->y = 2.0; 172 src->moments->Sxy = 3.0; 170 src->moments->Mx = 1.0; 171 src->moments->My = 1.0; 172 src->moments->Mxx = 2.0; 173 src->moments->Mxy= 2.0; 174 src->moments->Myy = 2.0; 175 src->moments->Mxxx = 3.0; 176 src->moments->Mxxy = 3.0; 177 src->moments->Mxyy = 3.0; 178 src->moments->Myyy = 3.0; 179 src->moments->Mxxxx = 4.0; 180 src->moments->Mxxxy = 4.0; 181 src->moments->Mxxyy = 4.0; 182 src->moments->Mxyyy = 4.0; 183 src->moments->Myyyy = 4.0; 184 src->moments->Sum = 2.0; 185 src->moments->Peak = 3.0; 173 186 src->moments->Sky = 4.0; 174 src->moments-> Peak= 5.0;175 src->moments-> x= 6.0;176 src->moments-> y= 7.0;187 src->moments->dSky = 5.0; 188 src->moments->SN = 6.0; 189 src->moments->nPixels = 7.0; 177 190 178 191 pmModelType type = pmModelClassGetType("PS_MODEL_GAUSS"); … … 183 196 psF32 *PAR = model->params->data.F32; 184 197 psEllipseMoments emoments; 185 emoments.x2 = src->moments-> Sx;186 emoments.y2 = src->moments-> Sy;187 emoments.xy = src->moments-> Sxy;198 emoments.x2 = src->moments->Mx; 199 emoments.y2 = src->moments->My; 200 emoments.xy = src->moments->Mxy; 188 201 // force the axis ratio to be < 20.0 189 202 psEllipseAxes axes = psEllipseMomentsToAxes (emoments, 20.0); … … 191 204 ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_SKY], src->moments->Sky), "pmSourceModelGuess() returned set model->params[PM_PAR_SKY] correctly"); 192 205 ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_I0], src->moments->Peak - src->moments->Sky), "pmSourceModelGuess() returned set model->params[PM_PAR_IO] correctly"); 193 ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_XPOS], src->moments-> x), "pmSourceModelGuess() returned set model->params[PM_PAR_XPOS] correctly");194 ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_YPOS], src->moments-> y), "pmSourceModelGuess() returned set model->params[PM_PAR_YPOS] correctly");206 ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_XPOS], src->moments->Mx), "pmSourceModelGuess() returned set model->params[PM_PAR_XPOS] correctly"); 207 ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_YPOS], src->moments->My), "pmSourceModelGuess() returned set model->params[PM_PAR_YPOS] correctly"); 195 208 ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_SXX], PS_MAX(0.5, M_SQRT2*shape.sx)), "pmSourceModelGuess() returned set model->params[PM_PAR_SXX] correctly"); 196 209 ok(TEST_FLOATS_EQUAL(PAR[PM_PAR_SYY], PS_MAX(0.5, M_SQRT2*shape.sy)), "pmSourceModelGuess() returned set model->params[PM_PAR_SYY] correctly");
Note:
See TracChangeset
for help on using the changeset viewer.
