- Timestamp:
- Jul 15, 2010, 6:30:19 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/psModules/src/objects/pmSourceFitModel.c
r28656 r28676 86 86 psVector *yErr = psVectorAllocEmpty(nPix, PS_TYPE_F32); 87 87 88 // XXX for a test, skip the central pixel in the sersic fit 89 bool skipCenter = false && (model->type == pmModelClassGetType("PS_MODEL_SERSIC")); 90 float Xo = model->params->data.F32[PM_PAR_XPOS]; 91 float Yo = model->params->data.F32[PM_PAR_YPOS]; 92 88 93 // fill in the coordinate and value entries 89 94 nPix = 0; … … 109 114 } 110 115 111 psVector *coord = psVectorAlloc(2, PS_TYPE_F32);112 113 116 // Convert i/j to image space: 114 117 // 0.5 PIX: the coordinate values must be in pixel coords, not index 115 coord->data.F32[0] = (psF32) (j + 0.5 + source->pixels->col0); 116 coord->data.F32[1] = (psF32) (i + 0.5 + source->pixels->row0); 118 float Xv = (psF32) (j + 0.5 + source->pixels->col0); 119 float Yv = (psF32) (i + 0.5 + source->pixels->row0); 120 121 // XXX possible skip of center pixel: 122 if (skipCenter) { 123 float r = hypot(Xv - Xo, Yv - Yo); 124 if (r < 0.75) { 125 continue; 126 } 127 } 128 129 psVector *coord = psVectorAlloc(2, PS_TYPE_F32); 130 coord->data.F32[0] = Xv; 131 coord->data.F32[1] = Yv; 117 132 x->data[nPix] = (psPtr *) coord; 118 133 y->data.F32[nPix] = source->pixels->data.F32[i][j];
Note:
See TracChangeset
for help on using the changeset viewer.
