Changeset 4977 for trunk/psphot/src/pmObjects_EAM.c
- Timestamp:
- Sep 7, 2005, 6:32:40 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/pmObjects_EAM.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/pmObjects_EAM.c
r4954 r4977 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-09-0 7 03:33:01$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-09-08 04:32:40 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 19 19 #include "psConstants.h" 20 20 #include "pmObjects_EAM.h" 21 #include "pmModelGroup.h" 22 21 23 22 24 /****************************************************************************** … … 653 655 654 656 // 655 // Loop through the subimage mask, initialize mask to 0x01 (invalid pixel) 656 // XXX EAM : use PSPHOT_MASK_INVALID? 657 // Loop through the subimage mask & initialize PSPHOT_MASK_INVALID 657 658 // 658 659 for (psS32 row = 0 ; row < subImageMask->numRows; row++) { 659 660 for (psS32 col = 0 ; col < subImageMask->numCols; col++) { 660 subImageMask->data.U8[row][col] = 0x01;661 subImageMask->data.U8[row][col] = PSPHOT_MASK_INVALID; 661 662 } 662 663 } … … 674 675 for (psS32 row = StartRow; row < EndRow; row++) { 675 676 for (psS32 col = StartCol; col < EndCol; col++) { 676 subImageMask->data.U8[row][col] = 0;677 subImageMask->data.U8[row][col] = PSPHOT_MASK_CLEAR; 677 678 } 678 679 } … … 1116 1117 1117 1118 // XXX EAM : can we use the value of SATURATE if mask is NULL? 1118 # define MASK_SATURATED 0x02 1119 int Nsatpix = psImageCountPixelMask (tmpSrc->mask, MASK_SATURATED); 1119 int Nsatpix = psImageCountPixelMask (tmpSrc->mask, PSPHOT_MASK_SATURATED); 1120 1120 1121 1121 // saturated star (size consistent with PSF or larger) … … 1615 1615 } 1616 1616 1617 psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F 64);1617 psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32); 1618 1618 1619 1619 psTrace (".pmObjects.pmSourceFitModel", 5, "fitting function\n"); … … 1621 1621 for (int i = 0; i < dparams->n; i++) { 1622 1622 if ((paramMask != NULL) && paramMask->data.U8[i]) continue; 1623 dparams->data.F32[i] = sqrt(covar->data.F 64[i][i]);1623 dparams->data.F32[i] = sqrt(covar->data.F32[i][i]); 1624 1624 } 1625 1625 … … 1640 1640 // XXX EAM get the Gauss-Newton distance for fixed model parameters 1641 1641 if (paramMask != NULL) { 1642 psVector *delta = psVectorAlloc (params->n, PS_TYPE_F 64);1642 psVector *delta = psVectorAlloc (params->n, PS_TYPE_F32); 1643 1643 psMinimizeGaussNewtonDelta (delta, params, NULL, x, y, yErr, modelFunc); 1644 1644 for (int i = 0; i < dparams->n; i++) { 1645 1645 if (!paramMask->data.U8[i]) continue; 1646 dparams->data.F32[i] = delta->data.F 64[i];1646 dparams->data.F32[i] = delta->data.F32[i]; 1647 1647 } 1648 1648 psFree (delta);
Note:
See TracChangeset
for help on using the changeset viewer.
