Changeset 5603
- Timestamp:
- Nov 25, 2005, 4:48:02 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel8_b1/psModules/src/objects/pmObjects.c
r5255 r5603 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $9 * @date $Date: 2005-1 0-10 19:53:40$8 * @version $Revision: 1.2.6.1 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-11-26 02:48:02 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 769 769 for (psS32 row = 0; row < source->pixels->numRows ; row++) { 770 770 for (psS32 col = 0; col < source->pixels->numCols ; col++) { 771 if ((source->mask != NULL) && (source->mask->data.U8[row][col])) 771 if ((source->mask != NULL) && (source->mask->data.U8[row][col])) { 772 772 continue; 773 } 773 774 774 775 psF32 xDiff = col + source->pixels->col0 - xPeak; … … 777 778 // XXX EAM : calculate xDiff, yDiff up front; 778 779 // radius is just a function of (xDiff, yDiff) 779 if (!VALID_RADIUS(xDiff, yDiff, R2)) 780 if (!VALID_RADIUS(xDiff, yDiff, R2)) { 780 781 continue; 782 } 781 783 782 784 psF32 pDiff = source->pixels->data.F32[row][col] - sky; … … 784 786 // XXX EAM : check for valid S/N in pixel 785 787 // XXX EAM : should this limit be user-defined? 786 if (pDiff / sqrt(source->weight->data.F32[row][col]) < 1) 788 if (pDiff / sqrt(source->weight->data.F32[row][col]) < 1) { 787 789 continue; 790 } 788 791 789 792 Sum += pDiff; … … 1065 1068 int Ncr = 0; 1066 1069 int Nsatstar = 0; 1070 psRegion allArray = psRegionSet (0, 0, 0, 0); 1067 1071 1068 1072 psVector *starsn = psVectorAlloc (sources->n, PS_TYPE_F32); … … 1096 1100 1097 1101 // XXX EAM : can we use the value of SATURATE if mask is NULL? 1098 // 1099 // XXX: Must verify this region (the region argument was added to psImageCountPixelMask() 1100 // after EAM wrote this code. 1101 // 1102 psRegion tmpRegion = psRegionSet(0, tmpSrc->mask->numCols, 0, tmpSrc->mask->numRows); 1103 int Nsatpix = psImageCountPixelMask(tmpSrc->mask, tmpRegion, PSPHOT_MASK_SATURATED); 1102 int Nsatpix = psImageCountPixelMask (tmpSrc->mask, allArray, PSPHOT_MASK_SATURATED); 1104 1103 1105 1104 // saturated star (size consistent with PSF or larger) … … 1759 1758 ymodel = modelFunc (NULL, model->params, coord); 1760 1759 1761 // this test enhances the weight based on deviation from the model flux1760 // this test modifies the weight based on deviation from the model flux 1762 1761 Ro = 1.0 + fabs (y->data.F32[tmpCnt] - ymodel) / sqrt(PS_SQR(ymodel - So) + PS_SQR(So)); 1763 1762 1764 // psMinimizeLMChi2 _EAMtakes wt = 1/dY^21763 // psMinimizeLMChi2 takes wt = 1/dY^2 1765 1764 if (source->weight->data.F32[i][j] == 0) { 1766 1765 yErr->data.F32[tmpCnt] = 0.0;
Note:
See TracChangeset
for help on using the changeset viewer.
