Changeset 25355
- Timestamp:
- Sep 13, 2009, 4:53:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/psModules/src/objects/pmModel.c
r23187 r25355 56 56 57 57 tmp->type = type; 58 tmp->chisq = 0.0; 59 tmp->chisqNorm = 0.0; 58 tmp->mag = NAN; 59 tmp->chisq = NAN; 60 tmp->chisqNorm = NAN; 60 61 tmp->nDOF = 0; 61 62 tmp->nPix = 0; … … 189 190 psVector *params = model->params; 190 191 191 psS32imageCol;192 psS32imageRow;193 psF32pixelValue;192 float imageCol; 193 float imageRow; 194 float pixelValue; 194 195 195 196 // save original values; restore before returning … … 255 256 continue; 256 257 257 // XXX should we use using 0.5 pixel offset?258 258 // Convert to coordinate in parent image, with offset (dx,dy) 259 imageCol = ix + image->col0 - dx; 260 imageRow = iy + image->row0 - dy; 261 262 x->data.F32[0] = (float) imageCol; 263 x->data.F32[1] = (float) imageRow; 259 // 0.5 PIX: the model take pixel coordinates so convert the pixel index here 260 imageCol = ix + 0.5 + image->col0 - dx; 261 imageRow = iy + 0.5 + image->row0 - dy; 262 263 x->data.F32[0] = imageCol; 264 x->data.F32[1] = imageRow; 264 265 265 266 pixelValue = 0.0;
Note:
See TracChangeset
for help on using the changeset viewer.
