IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38616


Ignore:
Timestamp:
Jul 22, 2015, 11:38:27 AM (11 years ago)
Author:
eugene
Message:

report number of bad objIDs, etc; check if detection is mis-located; mute ohana_memcheck a bit

Location:
branches/eam_branches/ipp-20150625/Ohana/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/addstar/Makefile

    r38596 r38616  
    3939# programs in 'SERVER' use the client-server concept and are out of date
    4040
    41 INSTALL = addstar sedstar loadgalphot loadstarpar loadstarpar_client loadICRF loadICRF_client load2mass loadwise loadtycho loadsupercos skycells mkcmf dumpskycells findskycell
     41INSTALL = addstar sedstar loadstarpar loadstarpar_client loadICRF loadICRF_client load2mass loadwise loadtycho loadsupercos skycells mkcmf dumpskycells findskycell
    4242SERVER  = addstar_client addstarc addstard addstart
    4343
  • branches/eam_branches/ipp-20150625/Ohana/src/addstar/src/loadgalphot_readstars.c

    r38606 r38616  
    231231    stars[i].galphot.modelType = MODEL_TYPE_gal[i];
    232232    stars[i].galphot.detID     = ID_gal[i];
    233     stars[i].galphot.phtocode  = options->photcode;
     233    stars[i].galphot.photcode  = options->photcode;
    234234
    235235    // I have a grid of measurements with (Flux, dFlux, Chisq) at each point
  • branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/dvoverify.c

    r38553 r38616  
    7878  SkyListFree (skylist);
    7979
    80   ohana_memcheck (TRUE);
    81   ohana_memdump (TRUE);
     80  ohana_memcheck (VERBOSE);
     81  ohana_memdump (VERBOSE);
    8282  exit (0);
    8383}
  • branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/dvoverify_args.c

    r38553 r38616  
    5050    free (filename);
    5151
    52     ohana_memcheck (TRUE);
    53     ohana_memdump (TRUE);
     52    ohana_memcheck (VERBOSE);
     53    ohana_memdump (VERBOSE);
    5454
    5555    if (!isGood) exit (1);
  • branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/dvoverify_utils.c

    r38553 r38616  
    312312  // check measure <-> average links
    313313  {
    314     int objIDsOK = TRUE;
    315     int catIDsOK = TRUE;
    316     int averefOK = TRUE;
     314    int NobjIDsBAD = 0;
     315    int NcatIDsBAD = 0;
     316    int NaverefBAD = 0;
    317317
    318318    for (i = 0; i < catalog.Naverage; i++) {
    319319      m = catalog.average[i].measureOffset;
    320320      for (j = 0; j < catalog.average[i].Nmeasure; j++) {
    321         objIDsOK &= (catalog.average[i].objID == catalog.measure[m+j].objID);
    322         catIDsOK &= (catalog.average[i].catID == catalog.measure[m+j].catID);
    323         averefOK &= (catalog.measure[m+j].averef == i);
     321        if (catalog.average[i].objID != catalog.measure[m+j].objID) {
     322          NobjIDsBAD ++;
     323
     324          // check if objID matches R,D
     325          int iTest = catalog.measure[m+j].objID;
     326          if (catalog.average[iTest].objID == iTest) {
     327            double dR = 3600.0*(catalog.average[iTest].R - catalog.measure[m+j].R) * cos (RAD_DEG*catalog.measure[m+j].D);
     328            double dD = 3600.0*(catalog.average[iTest].D - catalog.measure[m+j].D);
     329            double dRad = hypot (dR, dD);
     330            fprintf (stderr, "matches ave %d = %d, %f, %f = %f\n", iTest, catalog.measure[m+j].objID, dR, dD, dRad);
     331          } else {
     332            fprintf (stderr, "cannot find averef\n");
     333          }
     334        }
     335        if (catalog.average[i].catID != catalog.measure[m+j].catID) {
     336          NcatIDsBAD ++;
     337        }
     338        if (catalog.measure[m+j].averef != i) {
     339          NaverefBAD ++;
     340        }
    324341      }
    325342    }
    326343   
    327     if (!objIDsOK) {
    328       fprintf (stderr, "ERROR: catalog %s has invalid obj IDs\n", catalog.filename);
    329       status = FALSE;
    330     }
    331     if (!catIDsOK) {
    332       fprintf (stderr, "ERROR: catalog %s has invalid cat IDs\n", catalog.filename);
    333       status = FALSE;
    334     }
    335     if (!averefOK) {
    336       fprintf (stderr, "ERROR: catalog %s has invalid averef values\n", catalog.filename);
     344    if (NobjIDsBAD) {
     345      fprintf (stderr, "ERROR: catalog %s has %d invalid obj IDs\n", catalog.filename, NobjIDsBAD);
     346      status = FALSE;
     347    }
     348    if (NcatIDsBAD) {
     349      fprintf (stderr, "ERROR: catalog %s has %d invalid cat IDs\n", catalog.filename, NcatIDsBAD);
     350      status = FALSE;
     351    }
     352    if (NaverefBAD) {
     353      fprintf (stderr, "ERROR: catalog %s has %d invalid averef values\n", catalog.filename, NaverefBAD);
    337354      status = FALSE;
    338355    }
  • branches/eam_branches/ipp-20150625/Ohana/src/libohana/src/ohana_allocate.c

    r38553 r38616  
    265265}
    266266
    267 int ohana_memcheck_func (int allmemory) {
     267int ohana_memcheck_func (int VERBOSE) {
    268268
    269269  if (!lastBlock) {
    270     fprintf (stderr, "no memory allocated\n");
     270    if (VERBOSE) fprintf (stderr, "no memory allocated\n");
    271271  }
    272272
     
    308308    thisBlock = thisBlock->prevBlock;
    309309  }
    310   fprintf (stderr, "%zd memory blocks allocated (%zd bytes total), %zd good, %zd bad\n", Ntotal, Nbytes, Ngood, Nbad);
     310
     311  if (Ntotal || VERBOSE) {
     312    fprintf (stderr, "%zd memory blocks allocated (%zd bytes total), %zd good, %zd bad\n", Ntotal, Nbytes, Ngood, Nbad);
     313  }
     314
    311315  if (Nbad) status = FALSE;
    312316
     
    356360    thisBlock = thisBlock->prevBlock;
    357361  }
    358   fprintf (stderr, "%zd memory blocks freed     (%zd bytes total), %zd good, %zd bad\n", Ntotal_free, Nbytes_free, Ngood_free, Nbad_free);
     362
     363  if (Ntotal_free || VERBOSE) {
     364    fprintf (stderr, "%zd memory blocks freed     (%zd bytes total), %zd good, %zd bad\n", Ntotal_free, Nbytes_free, Ngood_free, Nbad_free);
     365  }
     366
    359367  if (Nbad_free) status = FALSE;
    360368
     
    405413    thisBlock = thisBlock->prevBlock;
    406414  }
    407   fprintf (stderr, "%zd memory blocks dropped   (%zd bytes total), %zd good, %zd bad\n", Ntotal_drop, Nbytes_drop, Ngood_drop, Nbad_drop);
     415
     416  if (Ntotal_drop || VERBOSE) {
     417    fprintf (stderr, "%zd memory blocks dropped   (%zd bytes total), %zd good, %zd bad\n", Ntotal_drop, Nbytes_drop, Ngood_drop, Nbad_drop);
     418  }
     419
    408420  if (Nbad_drop) status = FALSE;
    409421# endif
     
    412424}
    413425
    414 void ohana_memdump_func (int allmemory) {
     426void ohana_memdump_func (int VERBOSE) {
    415427
    416428  if (!lastBlock) {
    417     fprintf (stderr, "no memory allocated\n");
     429    if (VERBOSE) fprintf (stderr, "no memory allocated\n");
    418430    return;
    419431  }
     
    452464    thisBlock = thisBlock->prevBlock;
    453465  }
    454   fprintf (stderr, "%zd memory blocks allocated (%zd bytes total)\n", Ntotal, Nbytes);
     466
     467  if (Ntotal || VERBOSE) {
     468    fprintf (stderr, "%zd memory blocks allocated (%zd bytes total)\n", Ntotal, Nbytes);
     469  }
    455470
    456471  return;
  • branches/eam_branches/ipp-20150625/Ohana/src/opihi/pantasks

  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/Makefile

    r38612 r38616  
    2020relastro_client: $(BIN)/relastro_client.$(ARCH)
    2121
    22 install: $(DESTBIN)/relastro $(DESTBIN)/relastro_client $(DESTBIN)/testparallax
     22install: $(DESTBIN)/relastro $(DESTBIN)/relastro_client
     23
     24# $(DESTBIN)/testparallax
    2325
    2426RELASTRO = \
Note: See TracChangeset for help on using the changeset viewer.