IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 19, 2005, 12:26:40 PM (21 years ago)
Author:
eugene
Message:

fixing errors related to apResid and skyBias

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/pmPSFtry.c

    r5058 r5068  
    183183  //   we use an outlier rejection to avoid this bias
    184184
     185  FILE *f;
     186  f = fopen ("apresid.dat", "w");
     187  if (f == NULL) psAbort ("pmPSFtry", "can't open output file");
     188
    185189  // rflux = ten(0.4*fitMag);
    186190  psVector *rflux = psVectorAlloc (try->sources->n, PS_TYPE_F64);
     
    188192    if (try->mask->data.U8[i] & PSFTRY_MASK_ALL) continue;
    189193    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]);
    190195  }
     196  fclose (f);
    191197
    192198  // find min and max of (1/flux):
     
    236242    // measure statistics only on upper 50% of points
    237243    // 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);
    244244
    245245    psVectorSort (tmp, tmp);
     
    267267
    268268  // 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);
    270273
    271274  // XXX EAM : replace this when the above version is implemented
     
    290293  psFree (poly);
    291294  psFree (stats);
     295  psFree (fitstat);
    292296
    293297  return true;
Note: See TracChangeset for help on using the changeset viewer.