IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38605


Ignore:
Timestamp:
Jul 19, 2015, 12:51:52 PM (11 years ago)
Author:
eugene
Message:

working on relastro

Location:
branches/eam_branches/ipp-20150625/Ohana/src/relastro
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/Makefile

    r38062 r38605  
    2727$(SRC)/FitMosaic.$(ARCH).o           \
    2828$(SRC)/FitPM.$(ARCH).o               \
    29 $(SRC)/FitPar.$(ARCH).o              \
    3029$(SRC)/FitPMandPar.$(ARCH).o         \
     30$(SRC)/FitPosPMfixed.$(ARCH).o       \
    3131$(SRC)/FitSimple.$(ARCH).o           \
    3232$(SRC)/ImageOps.$(ARCH).o            \
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/include/relastro.h

    r38604 r38605  
    143143  double D, dD;
    144144  double T, dT;
    145   double pX;
    146   double pY;
     145  double pR;
     146  double pD;
    147147  double C_blue;
    148148  double C_red;
     
    498498
    499499int sun_ecliptic (double jd, double *lambda, double *beta, double *epsilon, double *Radius);
    500 int ParFactor (double *pR, double *pD, double RA, double Dec, double Time, double Tmean);
     500int ParFactor (double *pR, double *pD, double RA, double Dec, double Time);
    501501int FitPM (FitAstromResult *fit, FitAstromData *data, FitAstromPoint *points, int Npoints);
    502502int FitPMandPar (FitAstromResult *fit, FitAstromData *data, FitAstromPoint *points, int Npoints);
     
    706706double VectorFractionInterpolate (double *values, float fraction, int Npts);
    707707int BootstrapRobustStats (FitAstromResult *result, FitAstromResult *fit, int Nfit, int mode);
    708 int BootstrapResample (FitAstromPoints *sample, FitAstromPoints *points, int Npoints);
     708int BootstrapResample (FitAstromPoint *sample, FitAstromPoint *points, int Npoints);
    709709int CatalogMaxNmeasure (Catalog *catalog, int Ncatalog);
    710710int FitAstromPoints_Project (FitStats *fitStats, double *Tmean, double *Trange, double *parRange);
     
    714714
    715715void FitAstromResultInit (FitAstromResult *fit);
    716 void FitAstromPointInit (FitAstromObject *object);
     716void FitAstromPointInit (FitAstromPoint *object);
    717717void FitAstromDataFree (FitAstromData *fit);
    718718FitAstromData *FitAstromDataInit (int Nterms);
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/FitAstromOps.c

    r38604 r38605  
    118118  object->dD     = 0.0;
    119119  object->dT     = 0.0;
    120   object->pX     = 0.0;
    121   object->pY     = 0.0;
     120  object->pR     = 0.0;
     121  object->pD     = 0.0;
    122122  object->C_blue = 0.0;
    123123  object->C_red  = 0.0;
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/FitPosPMfixed.c

    r38604 r38605  
    55  int i;
    66
    7   double wx, wy, Wx, Wy, Tx, Ty, Tx2, Ty2, Xs, Ys, XT, YT;
     7  double wx, wy, Wx, Wy, Tx, Ty, Xs, Ys;
    88
    99  myAssert (data->Nterms == 2, "invalid fit arrays");
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/ImageOps.c

    r38599 r38605  
    748748    n = measure[0].averef;
    749749
    750     // apply proper-motion from average position to measure epoch:
    751     float dTime = (measure[k].t - catalog[c].average[n].Tmean) / (86400*365.25) ; // time relative to Tmean in years
    752 
    753750    /* apply the current image transformation or use the current value of R+dR, D+dD? */
    754751    ref[i].R = catalog[c].average[n].R;
    755752    ref[i].D = catalog[c].average[n].D;
    756753   
    757     // XXX do this in a better way?
    758     ref[i].R += dTime * catalog[c].average[n].uR / 3600.0 / cos(ref[i].D*RAD_DEG);
    759     ref[i].D += dTime * catalog[c].average[n].uD / 3600.0;
     754    if (USE_GALAXY_MODEL) {
     755      // apply proper-motion from average position to measure epoch:
     756      float dTime = (measure[0].t - catalog[c].average[n].Tmean) / (86400*365.25) ; // time relative to Tmean in years
     757
     758      // XXX do this in a better way?
     759      ref[i].R += dTime * catalog[c].average[n].uR / 3600.0 / cos(ref[i].D*RAD_DEG);
     760      ref[i].D += dTime * catalog[c].average[n].uD / 3600.0;
     761    }
    760762
    761763    // if we are correcting for the Galaxy Motion Model, we assume the mean R,D is at the J2000 epoch position
    762     if (USE_GALAXY_MODEL) {
     764    if (0) {
    763765      myAssert (!isnan(measure[0].RoffGAL), "oops");
    764766      myAssert (!isnan(measure[0].DoffGAL), "oops");
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/UpdateObjects.c

    r38604 r38605  
    4040
    4141      UpdateObjects_Stack(average, secfilt, measure, measureBig, Nsecfilt, fitStatsStack);
    42       UpdateObjects_Chips(average, secfilt, measure, measureBig, Nsecfilt, fitStatsChips, i, m, Nloop);
     42      UpdateObjects_Chips(average, secfilt, measure, measureBig, Nsecfilt, fitStatsChips, i, m);
    4343    }
    4444    if (VERBOSE2) fprintf (stderr, "catalog %d : chips "OFF_T_FMT" ave, "OFF_T_FMT" pm, "OFF_T_FMT" par : Nskip "OFF_T_FMT", Noffset "OFF_T_FMT"\n",  i,  fitStatsChips.Nave,  fitStatsChips.Npm,  fitStatsChips.Npar,  fitStatsChips.Nskip, fitStatsChips.Noffset);
     
    591591  double Tmin  = points[0].T;
    592592  double Tmax  = points[0].T;
    593   double pXmin = +2.0;
    594   double pXmax = -2.0;
    595   double pYmin = +2.0;
    596   double pYmax = -2.0;
     593  double pRmin = +2.0;
     594  double pRmax = -2.0;
     595  double pDmin = +2.0;
     596  double pDmax = -2.0;
    597597
    598598  *Tmean = 0.0;
     
    603603
    604604    // at this point, T is in years since J2000
    605     ParFactor (&points[k].pX, &points[k].pY, points[k].R, points[k].D, points[k].T);
    606     pXmin = MIN (pXmin, points[k].pX);
    607     pXmax = MAX (pXmax, points[k].pX);
    608     pYmin = MIN (pYmin, points[k].pY);
    609     pYmax = MAX (pYmax, points[k].pY);
     605    ParFactor (&points[k].pR, &points[k].pD, points[k].R, points[k].D, points[k].T);
     606    pRmin = MIN (pRmin, points[k].pR);
     607    pRmax = MAX (pRmax, points[k].pR);
     608    pDmin = MIN (pDmin, points[k].pD);
     609    pDmax = MAX (pDmax, points[k].pD);
    610610  }
    611611  *Trange = Tmax - Tmin;
     
    619619  }
    620620
    621   double dXRange = pXmax - pXmin;
    622   double dYRange = pYmax - pYmin;
    623   *parRange = hypot (dXRange, dYRange);
     621  *parRange = hypot (pRmax - pRmin, pDmax - pDmin);
    624622
    625623  /* we need to do the fit in a locally linear space; choose a ref coordinate */
     
    650648}
    651649
    652 int BootstrapResample (FitAstromPoints *sample, FitAstromPoints *points, int Npoints) {
     650int BootstrapResample (FitAstromPoint *sample, FitAstromPoint *points, int Npoints) {
    653651  int i;
    654652
Note: See TracChangeset for help on using the changeset viewer.