IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32663


Ignore:
Timestamp:
Nov 14, 2011, 7:54:29 AM (15 years ago)
Author:
eugene
Message:

updates to relastro to examine parallax issues; updates to kapa for windowing ps/png boxes

Location:
branches/eam_branches/ipp-20111110/Ohana/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111110/Ohana/src/kapa2/src/Sections.c

    r32660 r32663  
    240240int SectionMinBoundary (Graphic *graphic) {
    241241
     242    int i;
    242243    int Xs = graphic->dx;
    243244    int Ys = graphic->dy;
     
    248249    // image status (should not include the imtool portion)
    249250    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);
    254255    }
    255256
  • branches/eam_branches/ipp-20111110/Ohana/src/kapa2/src/bDrawIt.c

    r32660 r32663  
    1313  black = KapaColorByName ("black");
    1414
    15   SectionMinBoundary (graphic);
     15  // SectionMinBoundary (graphic);
    1616
    1717  // 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  
    245245      break;
    246246    case MEAS_PAR: /* OK */
    247       value.Flt = average[0].R;
     247      value.Flt = average[0].P;
    248248      break;
    249249    case MEAS_PAR_ERR: /* OK */
    250       value.Flt = average[0].D;
     250      value.Flt = average[0].dP;
    251251      break;
    252252    case MEAS_CHISQ_POS: /* OK */
  • branches/eam_branches/ipp-20111110/Ohana/src/libkapa/src/PSRotFont.c

    r30603 r32663  
    3232  dY = currentfont[65].ascent;
    3333 
     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
    3454  /* apply appropriate offset */
    3555  Xoff = Yoff = 0;
  • branches/eam_branches/ipp-20111110/Ohana/src/relastro/include/relastro.h

    r32346 r32663  
    317317int sun_ecliptic (double jd, double *lambda, double *beta, double *epsilon);
    318318int 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);
     319int FitPM (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts, int XVERB);
    320320int 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);
     321int FitPMandPar (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, double *pR, double *pD, int Npts, int XVERB);
    322322
    323323Mosaic *getMosaicForImage (off_t N);
  • branches/eam_branches/ipp-20111110/Ohana/src/relastro/src/FitPM.c

    r32346 r32663  
    22
    33/* 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) {
     4int FitPM (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts, int XVERB) {
    55
    66  int i;
     
    7777    chisq += SQ(X[i] - Xf) / SQ(dX[i]);
    7878    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);
    7980  }
    8081  fit[0].Nfit = Npts;
  • branches/eam_branches/ipp-20111110/Ohana/src/relastro/src/FitPMandPar.c

    r32661 r32663  
    22
    33/* 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) {
     4int FitPMandPar (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, double *pR, double *pD, int Npts, int XVERB) {
    55
    66  int i;
     
    103103    chisq += SQ(X[i] - Xf) / SQ(dX[i]);
    104104    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
    105107  }
    106108  fit[0].Nfit = Npts;
  • branches/eam_branches/ipp-20111110/Ohana/src/relastro/src/UpdateObjects.c

    r32346 r32663  
    8484      /* calculate the average value of R,D for a single star */
    8585
     86      XVERB = FALSE;
     87
    8688      // skip objects which are known to be problematic
    8789      // XXX include this code or not?
     
    196198      }
    197199     
    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);
    199204
    200205      // to judge the quality of the PM and PAR fits, we need to fit all three models and compare Chisq
     
    211216        }         
    212217
    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);
    216221
    217222        // project Ro, Do back to RA,DEC
     
    230235          ParFactor (&pX[k], &pY[k], R[k], D[k], T[k], Tmean);
    231236        }
    232         FitPMandPar (&fitPAR, X, dX, Y, dY, T, pX, pY, N);
     237        FitPMandPar (&fitPAR, X, dX, Y, dY, T, pX, pY, N, XVERB);
    233238        XY_to_RD (&fitPAR.Ro, &fitPAR.Do, fitPAR.Ro, fitPAR.Do, &coords);
    234239        catalog[i].average[j].flags |= ID_STAR_FIT_PAR;
     
    275280        break;
    276281      }
    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",
    278283                          catalog[i].average[j].R,
    279284                          catalog[i].average[j].D,
  • branches/eam_branches/ipp-20111110/Ohana/src/relastro/src/args.c

    r32346 r32663  
    1414  FIT_MODE = FIT_AVERAGE;
    1515
     16  OBJ_ID_SRC = OBJ_ID_DST = 0;
     17  CAT_ID_SRC = CAT_ID_DST = 0;
     18
    1619  if ((N = get_argument (argc, argv, "-merge-source"))) {
    1720    if (N > argc - 6) usage_merge_source();
     
    4043    remove_argument (N, &argc, argv);
    4144    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);
    4267  }
    4368
Note: See TracChangeset for help on using the changeset viewer.