IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35606


Ignore:
Timestamp:
May 30, 2013, 11:25:36 AM (13 years ago)
Author:
eugene
Message:

do not fit for parallax without >5 measurements; fix rules for min number of detections for proper-motion fit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/UpdateObjects.c

    r35416 r35606  
    9090
    9191      XVERB = FALSE;
     92      fitAve.chisq = NAN;
     93      fitPM.chisq = NAN;
     94      fitPAR.chisq = NAN;
    9295
    9396      if (catalog[i].average[j].Nmeasure == 0) {
     
    198201      Trange = Tmax - Tmin;
    199202      if (Trange < PM_DT_MIN) mode = FIT_AVERAGE;
    200       if ((mode == FIT_PM_ONLY) && (N < PM_TOOFEW)) mode = FIT_AVERAGE;
     203      if (((mode == FIT_PM_ONLY) || (mode == FIT_PM_AND_PAR)) && (N <= PM_TOOFEW)) mode = FIT_AVERAGE;
    201204
    202205      if (FIT_TARGET == TARGET_HIGH_SPEED) {
     
    265268        float parRange = hypot (dXRange, dYRange);
    266269       
    267         if (parRange >= PAR_FACTOR_MIN) {
     270# define PAR_TOOFEW 5
     271        if ((parRange >= PAR_FACTOR_MIN) && (N > PAR_TOOFEW)) {
    268272          FitPMandPar (&fitPAR, X, dX, Y, dY, T, pX, pY, N, XVERB);
     273          if (XVERB) fprintf (stderr, "fitted PM+PAR:  %f - %f : %f %f : %f %f : %f %f : %f vs %f vs %f\n", Tmin, Tmax, fitPAR.Ro, fitPAR.Do, fitPAR.uR, fitPAR.uD, fitPAR.p, fitPAR.dp, fitPAR.chisq, fitPM.chisq, fitAve.chisq);
     274
    269275          XY_to_RD (&fitPAR.Ro, &fitPAR.Do, fitPAR.Ro, fitPAR.Do, &coords);
    270276          catalog[i].average[j].flags |= ID_STAR_FIT_PAR;
     
    315321        break;
    316322      }
    317       if (XVERB) fprintf (stderr, "%f %f -> %f %f (%f,%f) pm=(%f %f)\n",
     323      if (XVERB) fprintf (stderr, "%f %f -> %f %f (%f,%f) pm=(%f %f) plx=(%f +/- %f)\n",
    318324                          catalog[i].average[j].R,
    319325                          catalog[i].average[j].D,
     
    321327                          3600*(catalog[i].average[j].R - fit.Ro),
    322328                          3600*(catalog[i].average[j].D - fit.Do),
    323                           fit.uR,
    324                           fit.uD);
     329                          fit.uR, fit.uD, fit.p, fit.dp);
    325330
    326331      // make sure that the fit succeeded
Note: See TracChangeset for help on using the changeset viewer.