Changeset 32663
- Timestamp:
- Nov 14, 2011, 7:54:29 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20111110/Ohana/src
- Files:
-
- 9 edited
-
kapa2/src/Sections.c (modified) (2 diffs)
-
kapa2/src/bDrawIt.c (modified) (1 diff)
-
libdvo/src/dbExtractMeasures.c (modified) (1 diff)
-
libkapa/src/PSRotFont.c (modified) (1 diff)
-
relastro/include/relastro.h (modified) (1 diff)
-
relastro/src/FitPM.c (modified) (2 diffs)
-
relastro/src/FitPMandPar.c (modified) (2 diffs)
-
relastro/src/UpdateObjects.c (modified) (5 diffs)
-
relastro/src/args.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111110/Ohana/src/kapa2/src/Sections.c
r32660 r32663 240 240 int SectionMinBoundary (Graphic *graphic) { 241 241 242 int i; 242 243 int Xs = graphic->dx; 243 244 int Ys = graphic->dy; … … 248 249 // image status (should not include the imtool portion) 249 250 for (i = 0; i < Nsections; i++) { 250 Xs = PS_MIN (Xs, sections[i][0].x);251 Ys = PS_MIN (Ys, sections[i][0].y);252 Xe = PS_MAX (Xe, sections[i][0].x + sections[i][0].dx);253 Ye = PS_MAX (Ye, sections[i][0].y + sections[i][0].dy);251 Xs = MIN (Xs, sections[i][0].x); 252 Ys = MIN (Ys, sections[i][0].y); 253 Xe = MAX (Xe, sections[i][0].x + sections[i][0].dx); 254 Ye = MAX (Ye, sections[i][0].y + sections[i][0].dy); 254 255 } 255 256 -
branches/eam_branches/ipp-20111110/Ohana/src/kapa2/src/bDrawIt.c
r32660 r32663 13 13 black = KapaColorByName ("black"); 14 14 15 SectionMinBoundary (graphic);15 // SectionMinBoundary (graphic); 16 16 17 17 // if we want to trim, we'll need to carry about the start in graphic coords and -
branches/eam_branches/ipp-20111110/Ohana/src/libdvo/src/dbExtractMeasures.c
r31635 r32663 245 245 break; 246 246 case MEAS_PAR: /* OK */ 247 value.Flt = average[0]. R;247 value.Flt = average[0].P; 248 248 break; 249 249 case MEAS_PAR_ERR: /* OK */ 250 value.Flt = average[0]. D;250 value.Flt = average[0].dP; 251 251 break; 252 252 case MEAS_CHISQ_POS: /* OK */ -
branches/eam_branches/ipp-20111110/Ohana/src/libkapa/src/PSRotFont.c
r30603 r32663 32 32 dY = currentfont[65].ascent; 33 33 34 /*** 35 36 update this to use the following PS code: 37 38 /ceshow { % (string) fontsize fontname x y 39 gsave 40 moveto findfont exch scalefont setfont % s 41 gsave 42 dup false charpath flattenpath pathbbox % s x0 y0 x1 y1 43 grestore 44 3 -1 roll sub % s x0 x1 dy 45 3 1 roll sub % s dy -dx 46 2 div exch % s -dx/2 dy 47 -2 div % s -dx/2 -dy/2 48 rmoveto show 49 grestore 50 } bind def 51 52 ***/ 53 34 54 /* apply appropriate offset */ 35 55 Xoff = Yoff = 0; -
branches/eam_branches/ipp-20111110/Ohana/src/relastro/include/relastro.h
r32346 r32663 317 317 int sun_ecliptic (double jd, double *lambda, double *beta, double *epsilon); 318 318 int ParFactor (double *pR, double *pD, double R, double D, double T, double Tmean); 319 int FitPM (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts );319 int FitPM (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts, int XVERB); 320 320 int FitPar (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *pR, double *pD, int Npts); 321 int FitPMandPar (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, double *pR, double *pD, int Npts );321 int FitPMandPar (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, double *pR, double *pD, int Npts, int XVERB); 322 322 323 323 Mosaic *getMosaicForImage (off_t N); -
branches/eam_branches/ipp-20111110/Ohana/src/relastro/src/FitPM.c
r32346 r32663 2 2 3 3 /* do we want an init function which does the alloc and a clear function to free? */ 4 int FitPM (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts ) {4 int FitPM (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts, int XVERB) { 5 5 6 6 int i; … … 77 77 chisq += SQ(X[i] - Xf) / SQ(dX[i]); 78 78 chisq += SQ(Y[i] - Yf) / SQ(dY[i]); 79 if (XVERB) fprintf (stderr, "chisq contrib : %f %f : %f %f : %f %f : %f %f : %f\n", Xf, Yf, X[i] - Xf, Y[i] - Yf, dX[i], dY[i], (X[i] - Xf) / dX[i], (Y[i] - Yf) / dY[i], chisq); 79 80 } 80 81 fit[0].Nfit = Npts; -
branches/eam_branches/ipp-20111110/Ohana/src/relastro/src/FitPMandPar.c
r32661 r32663 2 2 3 3 /* do we want an init function which does the alloc and a clear function to free? */ 4 int FitPMandPar (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, double *pR, double *pD, int Npts ) {4 int FitPMandPar (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, double *pR, double *pD, int Npts, int XVERB) { 5 5 6 6 int i; … … 103 103 chisq += SQ(X[i] - Xf) / SQ(dX[i]); 104 104 chisq += SQ(Y[i] - Yf) / SQ(dY[i]); 105 if (XVERB) fprintf (stderr, "chisq contrib : %f %f : %f %f : %f %f : %f %f : %f\n", Xf, Yf, X[i] - Xf, Y[i] - Yf, dX[i], dY[i], (X[i] - Xf) / dX[i], (Y[i] - Yf) / dY[i], chisq); 106 105 107 } 106 108 fit[0].Nfit = Npts; -
branches/eam_branches/ipp-20111110/Ohana/src/relastro/src/UpdateObjects.c
r32346 r32663 84 84 /* calculate the average value of R,D for a single star */ 85 85 86 XVERB = FALSE; 87 86 88 // skip objects which are known to be problematic 87 89 // XXX include this code or not? … … 196 198 } 197 199 198 XVERB = (catalog[i].measure[m].dM < 0.01) && (N == 6) && (mode == FIT_PM_ONLY); 200 // XVERB |= (catalog[i].averge[j].objID == 0xc90) && (catalog[i].average[j].catID == 0x2a1e); 201 XVERB |= (catalog[i].average[j].objID == OBJ_ID_SRC) && (catalog[i].average[j].catID == CAT_ID_SRC); 202 XVERB |= (catalog[i].average[j].objID == OBJ_ID_DST) && (catalog[i].average[j].catID == CAT_ID_DST); 203 // XVERB = (catalog[i].measure[m].dM < 0.01) && (N == 6) && (mode == FIT_PM_ONLY); 199 204 200 205 // to judge the quality of the PM and PAR fits, we need to fit all three models and compare Chisq … … 211 216 } 212 217 213 FitPM (&fitPM, X, dX, Y, dY, T, N );214 215 if (XVERB) fprintf (stderr, "fitted : %f - %f : %f %f : %f %f : %f vs %f\n", Tmin, Tmax, fitPM.Ro, fitPM.Do, fitPM.uR, fitPM.uD, fitPM.chisq, fitAve.chisq);218 FitPM (&fitPM, X, dX, Y, dY, T, N, XVERB); 219 220 if (XVERB) fprintf (stderr, "fitted PM: %f - %f : %f %f : %f %f : %f vs %f\n", Tmin, Tmax, fitPM.Ro, fitPM.Do, fitPM.uR, fitPM.uD, fitPM.chisq, fitAve.chisq); 216 221 217 222 // project Ro, Do back to RA,DEC … … 230 235 ParFactor (&pX[k], &pY[k], R[k], D[k], T[k], Tmean); 231 236 } 232 FitPMandPar (&fitPAR, X, dX, Y, dY, T, pX, pY, N );237 FitPMandPar (&fitPAR, X, dX, Y, dY, T, pX, pY, N, XVERB); 233 238 XY_to_RD (&fitPAR.Ro, &fitPAR.Do, fitPAR.Ro, fitPAR.Do, &coords); 234 239 catalog[i].average[j].flags |= ID_STAR_FIT_PAR; … … 275 280 break; 276 281 } 277 if (XVERB) fprintf (stderr, " A%f %f -> %f %f (%f,%f) pm=(%f %f)\n",282 if (XVERB) fprintf (stderr, "%f %f -> %f %f (%f,%f) pm=(%f %f)\n", 278 283 catalog[i].average[j].R, 279 284 catalog[i].average[j].D, -
branches/eam_branches/ipp-20111110/Ohana/src/relastro/src/args.c
r32346 r32663 14 14 FIT_MODE = FIT_AVERAGE; 15 15 16 OBJ_ID_SRC = OBJ_ID_DST = 0; 17 CAT_ID_SRC = CAT_ID_DST = 0; 18 16 19 if ((N = get_argument (argc, argv, "-merge-source"))) { 17 20 if (N > argc - 6) usage_merge_source(); … … 40 43 remove_argument (N, &argc, argv); 41 44 FIT_TARGET = TARGET_OBJECTS; 45 } 46 47 if ((N = get_argument (argc, argv, "-testobj1"))) { 48 if (N > argc - 3) usage (); 49 remove_argument (N, &argc, argv); 50 OBJ_ID_SRC = strtol(argv[N], &endptr, 0); 51 if (*endptr) usage (); 52 remove_argument (N, &argc, argv); 53 CAT_ID_SRC = strtol(argv[N], &endptr, 0); 54 if (*endptr) usage (); 55 remove_argument (N, &argc, argv); 56 } 57 58 if ((N = get_argument (argc, argv, "-testobj2"))) { 59 if (N > argc - 3) usage (); 60 remove_argument (N, &argc, argv); 61 OBJ_ID_DST = strtol(argv[N], &endptr, 0); 62 if (*endptr) usage (); 63 remove_argument (N, &argc, argv); 64 CAT_ID_DST = strtol(argv[N], &endptr, 0); 65 if (*endptr) usage (); 66 remove_argument (N, &argc, argv); 42 67 } 43 68
Note:
See TracChangeset
for help on using the changeset viewer.
