IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33621


Ignore:
Timestamp:
Mar 29, 2012, 2:19:40 PM (14 years ago)
Author:
eugene
Message:

only run parallax analysis on objects with large enough parallax factor

Location:
branches/eam_branches/ipp-20111122/Ohana/src/relastro
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/include/relastro.h

    r33570 r33621  
    169169int    PM_TOOFEW;
    170170double PM_DT_MIN;
     171double PAR_FACTOR_MIN;
    171172int    PLOTDELAY;
    172173int    CHIPORDER;
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/ConfigInit.c

    r33448 r33621  
    2929  GetConfig (config, "PM_TOOFEW",              "%d",  0, &PM_TOOFEW);
    3030  GetConfig (config, "POS_TOOFEW",             "%d",  0, &POS_TOOFEW);
     31
     32  GetConfig (config, "PAR_FACTOR_MIN",         "%lf", 0, &PAR_FACTOR_MIN);
    3133
    3234  GetConfig (config, "RELASTRO_MAP_NX",        "%d",  0, &NX_MAP);
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/UpdateObjects.c

    r33606 r33621  
    241241        // fprintf (stderr, "parallax fitting is still untested (%s, %d)\n", __FILE__, __LINE__);
    242242
     243        float pXmin = +2.0;
     244        float pXmax = -2.0;
     245        float pYmin = +2.0;
     246        float pYmax = -2.0;
    243247        for (k = 0; k < N; k++) {
    244248          ParFactor (&pX[k], &pY[k], R[k], D[k], T[k], Tmean);
    245         }
    246         FitPMandPar (&fitPAR, X, dX, Y, dY, T, pX, pY, N, XVERB);
    247         XY_to_RD (&fitPAR.Ro, &fitPAR.Do, fitPAR.Ro, fitPAR.Do, &coords);
    248         catalog[i].average[j].flags |= ID_STAR_FIT_PAR;
    249         Npar ++;
     249          pXmin = MIN (pXmin, pX[k]);
     250          pXmax = MAX (pXmax, pX[k]);
     251          pYmin = MIN (pYmin, pY[k]);
     252          pYmax = MAX (pYmax, pY[k]);
     253        }
     254        float dXRange = pXmax - pXmin;
     255        float dYRange = pYmax - pYmin;
     256        float parRange = hypot (dXRange, dYRange);
     257       
     258        if (parRange >= PAR_FACTOR_MIN) {
     259          FitPMandPar (&fitPAR, X, dX, Y, dY, T, pX, pY, N, XVERB);
     260          XY_to_RD (&fitPAR.Ro, &fitPAR.Do, fitPAR.Ro, fitPAR.Do, &coords);
     261          catalog[i].average[j].flags |= ID_STAR_FIT_PAR;
     262          Npar ++;
     263        }
    250264      }   
    251265
Note: See TracChangeset for help on using the changeset viewer.