Changeset 5593 for trunk/psphot/src/pmObjects_EAM.c
- Timestamp:
- Nov 25, 2005, 1:13:43 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/pmObjects_EAM.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/pmObjects_EAM.c
r5351 r5593 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-1 0-17 19:04:33 $8 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-11-25 23:13:43 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 999 999 int Ncr = 0; 1000 1000 int Nsatstar = 0; 1001 // psRegion allArray;1001 psRegion allArray = psRegionSet (0, 0, 0, 0); 1002 1002 1003 1003 psVector *starsn = psVectorAlloc (sources->n, PS_TYPE_F32); … … 1031 1031 1032 1032 // XXX EAM : can we use the value of SATURATE if mask is NULL? 1033 // XXX EAM *** serious errors in psImageCountPixelMask: inconsistent with psRegion and subimage 1034 // allArray = psRegionSet (1, tmpSrc->mask->numCols, 1, tmpSrc->mask->numRows); 1035 // int Nsatpix = psImageCountPixelMask (tmpSrc->mask, allArray, PSPHOT_MASK_SATURATED); 1036 int Nsatpix = psImageCountPixelMask_EAM (tmpSrc->mask, PSPHOT_MASK_SATURATED); 1033 // allArray = psRegionSet (0, 0, 0, 0); 1034 int Nsatpix = psImageCountPixelMask (tmpSrc->mask, allArray, PSPHOT_MASK_SATURATED); 1037 1035 1038 1036 // saturated star (size consistent with PSF or larger) … … 1648 1646 Ro = 1.0 + fabs (y->data.F32[tmpCnt] - ymodel) / sqrt(PS_SQR(ymodel - So) + PS_SQR(So)); 1649 1647 1650 // psMinimizeLMChi2 _EAMtakes wt = 1/dY^21648 // psMinimizeLMChi2 takes wt = 1/dY^2 1651 1649 if (source->weight->data.F32[i][j] == 0) { 1652 1650 yErr->data.F32[tmpCnt] = 0.0; … … 1701 1699 1702 1700 psTrace (".pmObjects.pmSourceFitModel", 5, "fitting function\n"); 1703 fitStatus = psMinimizeLMChi2_EAM(myMin, covar, params, paramMask, x, y, yErr, modelFunc); 1701 1702 fitStatus = psMinimizeLMChi2 (myMin, covar, params, paramMask, x, y, yErr, modelFunc); 1704 1703 for (int i = 0; i < dparams->n; i++) { 1705 1704 if ((paramMask != NULL) && paramMask->data.U8[i]) continue; 1706 1705 dparams->data.F32[i] = sqrt(covar->data.F64[i][i]); 1707 1706 } 1708 1709 1707 // XXX EAM: we need to do something (give an error?) if rc is false 1710 1708 // XXX EAM: psMinimizeLMChi2 does not check convergence … … 1724 1722 if (paramMask != NULL) { 1725 1723 psVector *delta = psVectorAlloc (params->n, PS_TYPE_F64); 1726 psMinimizeGaussNewtonDelta _EAM(delta, params, NULL, x, y, yErr, modelFunc);1724 psMinimizeGaussNewtonDelta (delta, params, NULL, x, y, yErr, modelFunc); 1727 1725 for (int i = 0; i < dparams->n; i++) { 1728 1726 if (!paramMask->data.U8[i]) continue;
Note:
See TracChangeset
for help on using the changeset viewer.
