Changeset 5068 for trunk/psphot/src/pmPSFtry.c
- Timestamp:
- Sep 19, 2005, 12:26:40 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/pmPSFtry.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/pmPSFtry.c
r5058 r5068 183 183 // we use an outlier rejection to avoid this bias 184 184 185 FILE *f; 186 f = fopen ("apresid.dat", "w"); 187 if (f == NULL) psAbort ("pmPSFtry", "can't open output file"); 188 185 189 // rflux = ten(0.4*fitMag); 186 190 psVector *rflux = psVectorAlloc (try->sources->n, PS_TYPE_F64); … … 188 192 if (try->mask->data.U8[i] & PSFTRY_MASK_ALL) continue; 189 193 rflux->data.F64[i] = pow(10.0, 0.4*try->fitMag->data.F64[i]); 194 fprintf (f, "%3d %8.4f %12.5e %8.4f\n", i, try->fitMag->data.F64[i], rflux->data.F64[i], try->metric->data.F64[i]); 190 195 } 196 fclose (f); 191 197 192 198 // find min and max of (1/flux): … … 236 242 // measure statistics only on upper 50% of points 237 243 // this would be easier if we could sort in reverse: 238 //239 // psVectorSort (tmp, tmp);240 // tmp->n = 0.5*tmp->n;241 // stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN);242 // psVectorStats (stats, tmp, NULL, NULL, 0);243 // psTrace ("psphot.metricmodel", 4, "rfBin %d (%g): %d pts, %g\n", i, rfBin->data.F64[i], tmp->n, stats->sampleMedian);244 244 245 245 psVectorSort (tmp, tmp); … … 267 267 268 268 // XXX EAM : this is the intended API (cycle 7? cycle 8?) 269 poly = VectorFitPolynomial1D_EAM (poly, maskB, 1, daBin, NULL, rfBin); 269 psStats *fitstat = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV); 270 poly = VectorClipFitPolynomial1D_EAM (poly, fitstat, maskB, 1, daBin, NULL, rfBin); 271 272 // poly = VectorFitPolynomial1D_EAM (poly, maskB, 1, daBin, NULL, rfBin); 270 273 271 274 // XXX EAM : replace this when the above version is implemented … … 290 293 psFree (poly); 291 294 psFree (stats); 295 psFree (fitstat); 292 296 293 297 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
