IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2009, 3:11:32 PM (17 years ago)
Author:
eugene
Message:

check in changes from genes development branch : extensive changes to moments calculation, psf model generation, aperture residuals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceFitModel.c

    r23989 r25754  
    9696
    9797            // Convert i/j to image space:
    98             coord->data.F32[0] = (psF32) (j + source->pixels->col0);
    99             coord->data.F32[1] = (psF32) (i + source->pixels->row0);
     98            // 0.5 PIX: the coordinate values must be in pixel coords, not index           
     99            coord->data.F32[0] = (psF32) (j + 0.5 + source->pixels->col0);
     100            coord->data.F32[1] = (psF32) (i + 0.5 + source->pixels->row0);
    100101            x->data[nPix] = (psPtr *) coord;
    101102            y->data.F32[nPix] = source->pixels->data.F32[i][j];
     
    175176            continue;
    176177        dparams->data.F32[i] = sqrt(covar->data.F32[i][i]);
    177         if (psTraceGetLevel("psModules.objects") >= 4) {
    178             fprintf (stderr, "%f +/- %f\n", params->data.F32[i], dparams->data.F32[i]);
    179         }
     178        psTrace ("psModules.objects", 4, "%f +/- %f", params->data.F32[i], dparams->data.F32[i]);
    180179    }
    181180    psTrace ("psModules.objects", 4, "niter: %d, chisq: %f", myMin->iter, myMin->value);
     
    186185    model->nPix  = y->n;
    187186    model->nDOF  = y->n - nParams;
     187    model->chisqNorm = model->chisq / model->nDOF;
    188188    model->flags |= PM_MODEL_STATUS_FITTED;
    189189    if (!fitStatus) model->flags |= PM_MODEL_STATUS_NONCONVERGE;
Note: See TracChangeset for help on using the changeset viewer.