- Timestamp:
- Feb 28, 2011, 2:44:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourcePhotometry.c
r29935 r30763 422 422 *pixWeightNotPoor = notPoorSum / modelSum; 423 423 424 if (false && isfinite(*pixWeightNotBad) && isfinite(*pixWeightNotPoor)) { 425 psAssert (*pixWeightNotBad <= *pixWeightNotPoor, "error: all bad pixels should also be poor"); 426 } 427 424 428 return (true); 425 429 } … … 674 678 675 679 // determine chisq, etc for linear normalization-only fit 676 bool pmSourceChisq (pmModel *model, psImage *image, psImage *mask, psImage *variance, psImageMaskType maskVal, const float covarFactor )680 bool pmSourceChisq (pmModel *model, psImage *image, psImage *mask, psImage *variance, psImageMaskType maskVal, const float covarFactor, int nParams) 677 681 { 678 682 PS_ASSERT_PTR_NON_NULL(model, false); … … 689 693 if (variance->data.F32[j][i] <= 0) 690 694 continue; 691 dC += PS_SQR (image->data.F32[j][i]) / (covarFactor * variance->data.F32[j][i]); 695 // dC += PS_SQR (image->data.F32[j][i]) / (covarFactor * variance->data.F32[j][i]); 696 dC += PS_SQR (image->data.F32[j][i]) / variance->data.F32[j][i]; 692 697 Npix ++; 693 698 } 694 699 } 700 695 701 model->nPix = Npix; 696 model->nDOF = Npix - 1;702 model->nDOF = Npix - nParams - 1; 697 703 model->chisq = dC; 704 model->chisqNorm = dC / model->nDOF; 698 705 699 706 return (true);
Note:
See TracChangeset
for help on using the changeset viewer.
