Changeset 19474
- Timestamp:
- Sep 10, 2008, 2:38:23 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmPSFtry.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmPSFtry.c
r19103 r19474 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1.6 0$ $Name: not supported by cvs2svn $8 * @date $Date: 2008-0 8-18 00:40:47$7 * @version $Revision: 1.61 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2008-09-11 00:38:23 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 802 802 int nBin = PS_MAX (mag->n / nGroup, 1); 803 803 804 // output vectors for ApResid trend805 psVector *dSo = psVectorAlloc (nBin, PS_TYPE_F32);806 807 804 // use mag to group parameters in sequence 808 805 psVector *index = psVectorSortIndex (NULL, mag); … … 815 812 816 813 int n = 0; 817 for (int i = 0; i < dSo->n; i++) { 814 float min = INFINITY; // Minimum error 815 for (int i = 0; i < nBin; i++) { 818 816 int j; 819 817 for (j = 0; (j < nGroup) && (n < mag->n); j++, n++) { … … 844 842 dEsquare += PS_SQR(psStatsGetValue(statsS, stdevOpt)); 845 843 846 dSo->data.F32[i] = sqrt(dEsquare); 844 if (isfinite(dEsquare)) { 845 float err = sqrtf(dEsquare); 846 if (err < min) { 847 min = err; 848 } 849 } 847 850 } 848 851 psFree (dE0subset); … … 851 854 psFree (mkSubset); 852 855 853 psStats *minStats = psStatsAlloc(PS_STAT_MIN);854 psVectorStats(minStats, dSo, NULL, NULL, 0);855 *errorFloor = minStats->min;856 psFree(minStats);857 858 856 psFree(index); 859 psFree (dSo); 860 861 psFree (statsS); 857 858 psFree(statsS); 862 859 863 860 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
