IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28219


Ignore:
Timestamp:
Jun 4, 2010, 11:21:31 AM (16 years ago)
Author:
eugene
Message:

cleanup the output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relastro/src/high_speed_objects.c

    r28207 r28219  
    44# define NEXT_J { j++; continue; }
    55
     6// XXX these were used to spot-check specific objects
    67# define REF_RA1 192.455781
    78# define REF_DEC1 2.563102
     
    1516  int *slowMoving, *groupA, *groupB, status, foundA, foundB, Nmatch, valid;
    1617  double *X1, *Y1;
    17   double dX, dY, dR, RADIUS2, radius, yJ;
     18  double dX, dY, dR, RADIUS2, yJ;
    1819  Coords tcoords;
    1920
    20   int ycode, yNsec, zcode, zNsec, jcode, jNsec, USNO_R, USNO_N, Nsecfilt;
     21  int zcode, zNsec, ycode, yNsec, jcode, jNsec, hcode, hNsec, kcode, kNsec, USNO_R, USNO_N, Nsecfilt;
    2122
    2223  Nsecfilt = GetPhotcodeNsecfilt();
     
    3031  jcode = GetPhotcodeCodebyName("J");
    3132  jNsec = GetPhotcodeNsec(jcode);
     33 
     34  hcode = GetPhotcodeCodebyName("H");
     35  hNsec = GetPhotcodeNsec(hcode);
     36 
     37  kcode = GetPhotcodeCodebyName("K");
     38  kNsec = GetPhotcodeNsec(kcode);
    3239 
    3340  USNO_R = GetPhotcodeCodebyName("USNO_RED");
     
    5764  Nslow = 0;
    5865
     66  fprintf (stdout, "#      RA_A  DEC_A              RA_B  DEC_B      :     pmx     pmy      dR  :    z      dz       y      dy       J      dJ       H      dH       K      dK\n");
     67  //................270.2346670  20.2471540  270.2170434  20.2717396 :  -59.11   88.78   106.66 :   0.000  0.000   19.582  0.112   16.041  0.110   15.388  0.098   14.858  0.001
     68
    5969  // mark (exclude) objects with both sets of target photcodes
    6070  for (i = 0; i < catalog[0].Naverage; i++) {
    6171
    62     if (i % 100 == 0) fprintf (stderr, ".");
    63 
    64     radius = hypot((REF_DEC1 - catalog[0].average[i].D), (REF_RA1 - catalog[0].average[i].R));
    65     if (radius < 0.0001) {
    66       fprintf (stderr, "found it\n");
    67     }
    68     radius = hypot((REF_DEC2 - catalog[0].average[i].D), (REF_RA2 - catalog[0].average[i].R));
    69     if (radius < 0.0001) {
    70       fprintf (stderr, "found it\n");
    71     }
     72    // if (i % 100 == 0) fprintf (stderr, ".");
     73
     74    // radius = hypot((REF_DEC1 - catalog[0].average[i].D), (REF_RA1 - catalog[0].average[i].R));
     75    // if (radius < 0.0001) {
     76    //   fprintf (stderr, "found it\n");
     77    // }
     78    // radius = hypot((REF_DEC2 - catalog[0].average[i].D), (REF_RA2 - catalog[0].average[i].R));
     79    // if (radius < 0.0001) {
     80    //   fprintf (stderr, "found it\n");
     81    // }
    7282
    7383    // do any of the measures for this object match group A?
     
    106116      valid &= (catalog[0].secfilt[i*Nsecfilt + yNsec].M < 1.0);
    107117      valid &= (catalog[0].secfilt[i*Nsecfilt + zNsec].M < 1.0);
    108       // XXX ignoring the color restriction for now
     118      // XXX color restrictions are applied in the pair-wise matching below
    109119     
    110120      // measure-based tests:
     
    187197    Nslow ++;
    188198  }
    189   fprintf (stderr, "%lld of %lld are slow; %lld in group A, %lld in group B\n", (long long) Nslow, (long long) catalog[0].Naverage, (long long) NgroupA, (long long) NgroupB);
     199  fprintf (stderr, "%lld of %lld are slow or invalid; %lld in group A, %lld in group B\n", (long long) Nslow, (long long) catalog[0].Naverage, (long long) NgroupA, (long long) NgroupB);
    190200   
    191201  // double loop over unmarked objects (sorted in RA / X)
     
    229239    nj = N1[j];
    230240
    231     if (ni == 131030) {
    232       fprintf (stderr, "got 2mass\n");
    233     }
    234     if (nj == 53581) {
    235       fprintf (stderr, "got ps1\n");
    236     }
     241    // if (ni == 131030) {
     242    //   fprintf (stderr, "got 2mass\n");
     243    // }
     244    // if (nj == 53581) {
     245    //   fprintf (stderr, "got ps1\n");
     246    // }
    237247
    238248    if (slowMoving[ni]) NEXT_I;
     
    273283      Nmatch ++;
    274284
    275       if (1) fprintf (stderr, "match %d = %lld %lld : %f %f : %f %f : %f\n",
    276                       Nmatch, (long long) i, (long long) J,
    277                       catalog[0].average[ni].R, catalog[0].average[ni].D,
    278                       catalog[0].average[nj].R, catalog[0].average[nj].D,
    279                       sqrt(dR));
     285      // for the moment, just write the matches to stdout:
     286      float pmx = -dX; // proper-motion displacement in ra  direction (B - A) [arcsec]
     287      float pmy = -dY; // proper-motion displacement in dec direction (B - A) [arcsec]
     288      fprintf (stdout, "%11.7f %11.7f  %11.7f %11.7f : %7.2f %7.2f  %7.2f : %7.3f %6.3f  %7.3f %6.3f  %7.3f %6.3f  %7.3f %6.3f  %7.3f %6.3f\n",
     289               catalog[0].average[ni].R, catalog[0].average[ni].D,
     290               catalog[0].average[nj].R, catalog[0].average[nj].D,
     291               pmx, pmy, sqrt(dR),
     292               catalog[0].secfilt[nj*Nsecfilt + zNsec].M,
     293               catalog[0].secfilt[nj*Nsecfilt + zNsec].dM,
     294               catalog[0].secfilt[nj*Nsecfilt + yNsec].M,
     295               catalog[0].secfilt[nj*Nsecfilt + yNsec].dM,
     296               catalog[0].secfilt[ni*Nsecfilt + jNsec].M,
     297               catalog[0].secfilt[ni*Nsecfilt + jNsec].dM,
     298               catalog[0].secfilt[ni*Nsecfilt + hNsec].M,
     299               catalog[0].secfilt[ni*Nsecfilt + hNsec].dM,
     300               catalog[0].secfilt[ni*Nsecfilt + kNsec].M,
     301               catalog[0].secfilt[ni*Nsecfilt + kNsec].dM);
    280302    }
    281303    i++;
Note: See TracChangeset for help on using the changeset viewer.