Changeset 38605
- Timestamp:
- Jul 19, 2015, 12:51:52 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150625/Ohana/src/relastro
- Files:
-
- 6 edited
-
Makefile (modified) (1 diff)
-
include/relastro.h (modified) (4 diffs)
-
src/FitAstromOps.c (modified) (1 diff)
-
src/FitPosPMfixed.c (modified) (1 diff)
-
src/ImageOps.c (modified) (1 diff)
-
src/UpdateObjects.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150625/Ohana/src/relastro/Makefile
r38062 r38605 27 27 $(SRC)/FitMosaic.$(ARCH).o \ 28 28 $(SRC)/FitPM.$(ARCH).o \ 29 $(SRC)/FitPar.$(ARCH).o \30 29 $(SRC)/FitPMandPar.$(ARCH).o \ 30 $(SRC)/FitPosPMfixed.$(ARCH).o \ 31 31 $(SRC)/FitSimple.$(ARCH).o \ 32 32 $(SRC)/ImageOps.$(ARCH).o \ -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/include/relastro.h
r38604 r38605 143 143 double D, dD; 144 144 double T, dT; 145 double p X;146 double p Y;145 double pR; 146 double pD; 147 147 double C_blue; 148 148 double C_red; … … 498 498 499 499 int 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);500 int ParFactor (double *pR, double *pD, double RA, double Dec, double Time); 501 501 int FitPM (FitAstromResult *fit, FitAstromData *data, FitAstromPoint *points, int Npoints); 502 502 int FitPMandPar (FitAstromResult *fit, FitAstromData *data, FitAstromPoint *points, int Npoints); … … 706 706 double VectorFractionInterpolate (double *values, float fraction, int Npts); 707 707 int BootstrapRobustStats (FitAstromResult *result, FitAstromResult *fit, int Nfit, int mode); 708 int BootstrapResample (FitAstromPoint s *sample, FitAstromPoints*points, int Npoints);708 int BootstrapResample (FitAstromPoint *sample, FitAstromPoint *points, int Npoints); 709 709 int CatalogMaxNmeasure (Catalog *catalog, int Ncatalog); 710 710 int FitAstromPoints_Project (FitStats *fitStats, double *Tmean, double *Trange, double *parRange); … … 714 714 715 715 void FitAstromResultInit (FitAstromResult *fit); 716 void FitAstromPointInit (FitAstrom Object *object);716 void FitAstromPointInit (FitAstromPoint *object); 717 717 void FitAstromDataFree (FitAstromData *fit); 718 718 FitAstromData *FitAstromDataInit (int Nterms); -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/FitAstromOps.c
r38604 r38605 118 118 object->dD = 0.0; 119 119 object->dT = 0.0; 120 object->p X= 0.0;121 object->p Y= 0.0;120 object->pR = 0.0; 121 object->pD = 0.0; 122 122 object->C_blue = 0.0; 123 123 object->C_red = 0.0; -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/FitPosPMfixed.c
r38604 r38605 5 5 int i; 6 6 7 double wx, wy, Wx, Wy, Tx, Ty, Tx2, Ty2, Xs, Ys, XT, YT;7 double wx, wy, Wx, Wy, Tx, Ty, Xs, Ys; 8 8 9 9 myAssert (data->Nterms == 2, "invalid fit arrays"); -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/ImageOps.c
r38599 r38605 748 748 n = measure[0].averef; 749 749 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 years752 753 750 /* apply the current image transformation or use the current value of R+dR, D+dD? */ 754 751 ref[i].R = catalog[c].average[n].R; 755 752 ref[i].D = catalog[c].average[n].D; 756 753 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 } 760 762 761 763 // 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) { 763 765 myAssert (!isnan(measure[0].RoffGAL), "oops"); 764 766 myAssert (!isnan(measure[0].DoffGAL), "oops"); -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/UpdateObjects.c
r38604 r38605 40 40 41 41 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); 43 43 } 44 44 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); … … 591 591 double Tmin = points[0].T; 592 592 double Tmax = points[0].T; 593 double p Xmin = +2.0;594 double p Xmax = -2.0;595 double p Ymin = +2.0;596 double p Ymax = -2.0;593 double pRmin = +2.0; 594 double pRmax = -2.0; 595 double pDmin = +2.0; 596 double pDmax = -2.0; 597 597 598 598 *Tmean = 0.0; … … 603 603 604 604 // at this point, T is in years since J2000 605 ParFactor (&points[k].p X, &points[k].pY, points[k].R, points[k].D, points[k].T);606 p Xmin = MIN (pXmin, points[k].pX);607 p Xmax = MAX (pXmax, points[k].pX);608 p Ymin = MIN (pYmin, points[k].pY);609 p Ymax = 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); 610 610 } 611 611 *Trange = Tmax - Tmin; … … 619 619 } 620 620 621 double dXRange = pXmax - pXmin; 622 double dYRange = pYmax - pYmin; 623 *parRange = hypot (dXRange, dYRange); 621 *parRange = hypot (pRmax - pRmin, pDmax - pDmin); 624 622 625 623 /* we need to do the fit in a locally linear space; choose a ref coordinate */ … … 650 648 } 651 649 652 int BootstrapResample (FitAstromPoint s *sample, FitAstromPoints*points, int Npoints) {650 int BootstrapResample (FitAstromPoint *sample, FitAstromPoint *points, int Npoints) { 653 651 int i; 654 652
Note:
See TracChangeset
for help on using the changeset viewer.
