IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33580


Ignore:
Timestamp:
Mar 21, 2012, 1:16:44 PM (14 years ago)
Author:
eugene
Message:

reduce verbosity so client output does not overwhelm; add -update-offsets option; relastro_client does not have PARALLEL set

Location:
branches/eam_branches/ipp-20111122/Ohana/src/relastro/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/ImageOps.c

    r33568 r33580  
    431431  }     
    432432
     433  int NoffRAave = 0;  int NoffRAori = 0;
     434  int NoffDECave = 0; int NoffDECori = 0;
     435
    433436  for (i = 0; i < N_onImage[im]; i++) {
    434437    m = ImageToMeasure[im][i];
     
    459462    // NOTE: This should never happen, or our StarMap tests are not working
    460463    if (fabs(dR) > 3.0*ADDSTAR_RADIUS) {
    461       fprintf (stderr, "measurement is far from average location (R): %f %f (%f %f)\n", catalog[c].average[n].R, catalog[c].average[n].D, dR, dD);
    462       dump_measures (&catalog[c].average[n], catalog[c].measure);
     464      NoffRAave ++;
     465      if (VERBOSE2) {
     466        fprintf (stderr, "measurement is far from average location (R): %f %f (%f %f)\n", catalog[c].average[n].R, catalog[c].average[n].D, dR, dD);
     467        dump_measures (&catalog[c].average[n], catalog[c].measure);
     468      }
    463469      // abort ();
    464470    }
    465471    if (fabs(dD) > 3.0*ADDSTAR_RADIUS) {
    466       fprintf (stderr, "measurement is far from average location (D): %f %f (%f %f)\n", catalog[c].average[n].R, catalog[c].average[n].D, dR, dD);
    467       dump_measures (&catalog[c].average[n], catalog[c].measure);
     472      NoffDECave ++;
     473      if (VERBOSE2) {
     474        fprintf (stderr, "measurement is far from average location (D): %f %f (%f %f)\n", catalog[c].average[n].R, catalog[c].average[n].D, dR, dD);
     475        dump_measures (&catalog[c].average[n], catalog[c].measure);
     476      }
    468477      // abort ();
    469478    }
     
    471480    // complain if the new location is far from the old location
    472481    if (fabs(catalog[c].measureT[m].dR - dR) > DPOS_MAX_ASEC) {
    473       fprintf (stderr, "measurement is far from original location (R): %f %f (%f %f)\n", catalog[c].average[n].R, catalog[c].average[n].D, dR, dD);
    474       dump_measures (&catalog[c].average[n], catalog[c].measure);
     482      NoffRAori ++;
     483      if (VERBOSE2) {
     484        fprintf (stderr, "measurement is far from original location (R): %f %f (%f %f)\n", catalog[c].average[n].R, catalog[c].average[n].D, dR, dD);
     485        dump_measures (&catalog[c].average[n], catalog[c].measure);
     486      }
    475487      // abort();
    476488    }
    477489    if (fabs(measure[0].dD - dD) > DPOS_MAX_ASEC) {
    478       fprintf (stderr, "measurement is far from original location (D): %f %f (%f %f)\n", catalog[c].average[n].R, catalog[c].average[n].D, dR, dD);
    479       dump_measures (&catalog[c].average[n], catalog[c].measure);
    480       // abort();
     490      NoffDECori ++;
     491      if (VERBOSE2) {
     492        fprintf (stderr, "measurement is far from original location (D): %f %f (%f %f)\n", catalog[c].average[n].R, catalog[c].average[n].D, dR, dD);
     493        dump_measures (&catalog[c].average[n], catalog[c].measure);
     494      }      // abort();
    481495    }
    482496
     
    502516  }
    503517
     518  int Noff = NoffRAave + NoffDECave + NoffRAori + NoffDECori;
     519  if (VERBOSE && (Noff > 0)) fprintf (stderr, "Noff ave RA %d, Noff ave DEC %d, Noff ori RA %d, Noff ori DEC %d\n", NoffRAave, NoffDECave, NoffRAori, NoffDECori);
    504520  saveOffsets (dPos, nPos, im);
    505521
     
    739755  assert(catalog[0].Nsecfilt == Nsecfilt);
    740756
    741   if (VERBOSE) fprintf (stderr, "marking poor measures\n");
     757  if (VERBOSE2) fprintf (stderr, "marking poor measures\n");
    742758  Nmax = 0;
    743759  for (i = 0; i < catalog[0].Naverage; i++) {
     
    831847  assert(catalog[0].Nsecfilt == Nsecfilt);
    832848
    833   if (VERBOSE) fprintf (stderr, "marking poor measures\n");
     849  if (VERBOSE2) fprintf (stderr, "marking poor measures\n");
    834850  Nmax = 0;
    835851  for (i = 0; i < catalog[0].Naverage; i++) {
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/UpdateObjectOffsets.c

    r33547 r33580  
    2424
    2525    // does this host ID match the desired location for the table?
    26     if (PARALLEL && !HostTableTestHost(skylist[0].regions[i], hostID)) continue;
     26    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    2727
    2828    // define the catalog file name
     
    3737    catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
    3838
    39     if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) {
     39    if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE2, "w")) {
    4040      fprintf (stderr, "ERROR: failure reading catalog %s\n", catalog.filename);
    4141      exit (1);
    4242    }
    4343    if (!catalog.Naves_disk) {
    44       if (VERBOSE) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
     44      if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
    4545      dvo_catalog_unlock (&catalog);
    4646      dvo_catalog_free (&catalog);
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/UpdateObjects.c

    r33571 r33580  
    8383  for (i = 0; i < Ncatalog; i++) {
    8484
    85     if (VERBOSE) fprintf (stderr, "astrometrize catalog %d : "OFF_T_FMT" ave, "OFF_T_FMT" meas\n", i,  catalog[i].Naverage,  catalog[i].Nmeasure);
     85    if (VERBOSE2) fprintf (stderr, "astrometrize catalog %d : "OFF_T_FMT" ave, "OFF_T_FMT" meas\n", i,  catalog[i].Naverage,  catalog[i].Nmeasure);
    8686
    8787    Nave = Npar = Npm = Nskip = 0;
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/args.c

    r33571 r33580  
    4444    remove_argument (N, &argc, argv);
    4545    FIT_TARGET = TARGET_UPDATE_OBJECTS;
     46  }
     47
     48  if ((N = get_argument (argc, argv, "-update-offsets"))) {
     49    remove_argument (N, &argc, argv);
     50    FIT_TARGET = TARGET_UPDATE_OFFSETS;
    4651  }
    4752
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/bcatalog.c

    r33568 r33580  
    128128    LimitDensityCatalog_ByNmeasure (subcatalog, catalog);
    129129  } else {
    130     if (VERBOSE) {
     130    if (VERBOSE2) {
    131131      char *basename = filebasename (catalog[0].filename);
    132132      fprintf (stderr, "subset of "OFF_T_FMT" ("OFF_T_FMT" total) stars, "OFF_T_FMT" ("OFF_T_FMT" total) measures for catalog %s\n",
     
    230230  }
    231231
    232   if (VERBOSE) {
     232  if (VERBOSE2) {
    233233    char *basename = filebasename (oldcatalog[0].filename);
    234234    fprintf (stderr, "limited to "OFF_T_FMT" ("OFF_T_FMT" subset, "OFF_T_FMT" total) stars, "OFF_T_FMT" ("OFF_T_FMT" subset, "OFF_T_FMT" total) measures for catalog %s\n",
     
    275275  off_t Nmax = MaxDensityValue * AREA;
    276276  if (subcatalog[0].Naverage <= Nmax) {
    277     if (VERBOSE) {
     277    if (VERBOSE2) {
    278278      fprintf (stderr, "subcatalog has less than the max density\n");
    279279    }
     
    328328  }
    329329
    330   if (VERBOSE) {
     330  if (VERBOSE2) {
    331331    fprintf (stderr, "limited to "OFF_T_FMT" of "OFF_T_FMT" stars ("OFF_T_FMT" of "OFF_T_FMT" measures) for catalog %s\n",
    332332             Nmax, subcatalog[0].Naverage, Nmeasure, subcatalog[0].Nmeasure,  catalog[0].filename);
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/high_speed_catalogs.c

    r33547 r33580  
    2323
    2424    // does this host ID match the desired location for the table?
    25     if (PARALLEL && !HostTableTestHost(skylist[0].regions[i], hostID)) continue;
     25    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    2626
    2727    // set up the basic catalog info
     
    3434    catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
    3535
    36     if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "r")) {
     36    if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE2, "r")) {
    3737      fprintf (stderr, "ERROR: failure reading catalog %s\n", catalog.filename);
    3838      exit (1);
    3939    }
    4040    if (!catalog.Naves_disk) {
    41       if (VERBOSE) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
     41      if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
    4242      dvo_catalog_unlock (&catalog);
    4343      dvo_catalog_free (&catalog);
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/high_speed_objects.c

    r33540 r33580  
    3737  catalogOut.catmode   = dvo_catalog_catmode (CATMODE);      // set the default catmode from config data
    3838
    39   if (!dvo_catalog_open (&catalogOut, region, VERBOSE,"w")) {
     39  if (!dvo_catalog_open (&catalogOut, region, VERBOSE2,"w")) {
    4040    fprintf (stderr, "ERROR: failure to open catalog file %s\n",
    4141             filename);
     
    274274
    275275  fprintf (stderr, "found %d matches\n", Nmatch);
    276   dvo_catalog_save (&catalogOut, VERBOSE);
     276  dvo_catalog_save (&catalogOut, VERBOSE2);
    277277  dvo_catalog_unlock (&catalogOut);
    278278  dvo_catalog_free (&catalogOut);
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/load_catalogs.c

    r33568 r33580  
    2424
    2525    // does this host ID match the desired location for the table?
    26     if (PARALLEL && !HostTableTestHost(skylist[0].regions[i], hostID)) continue;
     26    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    2727
    2828    // we only allow output if we do not use a subset.  in this case,
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/relastro.c

    r33448 r33580  
    3232      exit (0);
    3333
     34    case TARGET_UPDATE_OFFSETS:
     35      // iterate over catalogs to make detection coordinates consistant
     36      UpdateObjectOffsets (skylist, 0, NULL);
     37
    3438    default:
    3539      fprintf (stderr, "impossible!\n");
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/relastro_merge_source.c

    r33448 r33580  
    4747  catalog_src.Nsecfilt  = GetPhotcodeNsecfilt ();
    4848
    49   if (!dvo_catalog_open (&catalog_src, region_src, VERBOSE, "w")) {
     49  if (!dvo_catalog_open (&catalog_src, region_src, VERBOSE2, "w")) {
    5050    fprintf (stderr, "ERROR: failure reading catalog %s\n", catalog_src.filename);
    5151    exit (1);
     
    122122    resort_catalog (&catalog_src);
    123123
    124     dvo_catalog_save (&catalog_src, VERBOSE);
     124    dvo_catalog_save (&catalog_src, VERBOSE2);
    125125    dvo_catalog_unlock (&catalog_src);
    126126    dvo_catalog_free (&catalog_src);
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/relastro_objects.c

    r33547 r33580  
    3535
    3636    // does this host ID match the desired location for the table?
    37     if (PARALLEL && !HostTableTestHost(skylist[0].regions[i], hostID)) continue;
     37    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    3838
    3939    // set up the basic catalog info
     
    4747
    4848    // loads Average, Measure, SecFilt
    49     if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) {
     49    if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE2, "w")) {
    5050      fprintf (stderr, "ERROR: failure reading catalog %s\n", catalog.filename);
    5151      exit (1);
    5252    }
    5353    if (!catalog.Naves_disk) {
    54       if (VERBOSE) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
     54      if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
    5555      dvo_catalog_unlock (&catalog);
    5656      dvo_catalog_free (&catalog);
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/save_catalogs.c

    r12731 r33580  
    88  for (i = 0; i < Ncatalog; i++) {
    99
    10     if (VERBOSE) fprintf (stderr, "saving catalog %s\n", catalog[i].filename);
    11     dvo_catalog_save (&catalog[i], VERBOSE);
     10    if (VERBOSE2) fprintf (stderr, "saving catalog %s\n", catalog[i].filename);
     11    dvo_catalog_save (&catalog[i], VERBOSE2);
    1212    dvo_catalog_unlock (&catalog[i]);
    1313    dvo_catalog_free (&catalog[i]);
Note: See TracChangeset for help on using the changeset viewer.