IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39611 for trunk


Ignore:
Timestamp:
Jun 25, 2016, 10:22:40 AM (10 years ago)
Author:
eugene
Message:

update dvolens to use repair-from-warpIDs globally

Location:
trunk/Ohana/src/dvolens/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvolens/src/args.c

    r39550 r39611  
    5050    REPAIR_LENSING_IDS_FROM_WARPS = TRUE;
    5151    remove_argument (N, &argc, argv);
     52  }
     53  if (REPAIR_LENSING_IDS && REPAIR_LENSING_IDS_FROM_WARPS) {
     54    fprintf (stderr, "cannot use both -repair-lensing-ids and -repair-lensing-ids-from-warps, exiting\n");
     55    exit (2);
    5256  }
    5357
     
    193197    remove_argument (N, &argc, argv);
    194198  }
     199  if (REPAIR_LENSING_IDS && REPAIR_LENSING_IDS_FROM_WARPS) {
     200    fprintf (stderr, "cannot use both -repair-lensing-ids and -repair-lensing-ids-from-warps, exiting\n");
     201    exit (2);
     202  }
    195203
    196204  UPDATE = FALSE;
  • trunk/Ohana/src/dvolens/src/update_objects.c

    r39537 r39611  
    169169    // VERBOSE, VERBOSE2, UPDATE
    170170
    171     if (VERBOSE)            strextend (&command, "-v");
    172     if (VERBOSE2)           strextend (&command, "-vv");
    173     if (UPDATE)             strextend (&command, "-update");
    174     if (REPAIR_LENSING_IDS) strextend (&command, "-repair-lensing-ids");
    175     if (UserCatalog)        strextend (&command, "-catalog %s", UserCatalog);
     171    if (VERBOSE)                       strextend (&command, "-v");
     172    if (VERBOSE2)                      strextend (&command, "-vv");
     173    if (UPDATE)                        strextend (&command, "-update");
     174    if (REPAIR_LENSING_IDS)            strextend (&command, "-repair-lensing-ids");
     175    if (REPAIR_LENSING_IDS_FROM_WARPS) strextend (&command, "-repair-lensing-ids-from-warps");
     176    if (UserCatalog)                   strextend (&command, "-catalog %s", UserCatalog);
    176177
    177178    fprintf (stderr, "command: %s\n", command);
  • trunk/Ohana/src/dvolens/src/update_objects_catalog.c

    r39550 r39611  
    4646  double time4 = 0.0;
    4747
     48  int NfixLensing = 0;
     49  int NgoodLensing = 0;
    4850  int NmissLensing = 0;
    4951  int NmissWarps   = 0;
     
    8082        Lensing *lensing = &catalog->lensing[Loff + Lj];
    8183        if (lensing->detID == measure->detID) {
    82           lensing->oldImID = lensing->imageID;
    83           lensing->imageID = measure->imageID;
     84          if (lensing->imageID == measure->imageID) {
     85            NgoodLensing ++;
     86          } else {
     87            lensing->oldImID = lensing->imageID;
     88            lensing->imageID = measure->imageID;
     89            NfixLensing ++;
     90          }
    8491          Nmatch ++;
    8592        }
     
    357364  if (REPAIR_LENSING_IDS) fprintf (stderr, "corrected %d lensing IDs, failed on %d lensing IDs\n", Nfixed, Nfailed);
    358365
    359   if (REPAIR_LENSING_IDS_FROM_WARPS) fprintf (stderr, "missed %d lensing IDs, %d warps\n", NmissLensing, NmissWarps);
     366  if (REPAIR_LENSING_IDS_FROM_WARPS) fprintf (stderr, "Ngood %d Nfixed %d missed %d lensing IDs, %d warps\n", NgoodLensing, NfixLensing, NmissLensing, NmissWarps);
    360367
    361368  catalog->Nlensobj = Nlensobj;
Note: See TracChangeset for help on using the changeset viewer.