IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42133


Ignore:
Timestamp:
Mar 21, 2022, 12:07:26 PM (4 years ago)
Author:
eugene
Message:

option to skip images; make matched-tables the default

Location:
trunk/Ohana/src/dvomerge
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvomerge/include/dvomerge.h

    r41341 r42133  
    6565int    RESET_LENSING;
    6666
     67int    SKIP_IMAGES;
    6768int    SKIP_MEASURE;
    6869int    SKIP_MISSING;
  • trunk/Ohana/src/dvomerge/src/args.c

    r41341 r42133  
    3939    remove_argument (N, argc, argv);
    4040  }
    41 
    42   /* extra error messages */
    43   MATCHED_TABLES = FALSE;
     41  SKIP_IMAGES = FALSE;
     42  if ((N = get_argument (*argc, argv, "-skip-images"))) {
     43    SKIP_IMAGES = TRUE;
     44    remove_argument (N, argc, argv);
     45  }
     46
     47  /* extra error messages */
     48  MATCHED_TABLES = TRUE;
    4449  if ((N = get_argument (*argc, argv, "-matched-tables"))) {
    4550    MATCHED_TABLES = TRUE;
     51    remove_argument (N, argc, argv);
     52  }
     53  if ((N = get_argument (*argc, argv, "-unmatched-tables"))) {
     54    MATCHED_TABLES = FALSE;
    4655    remove_argument (N, argc, argv);
    4756  }
     
    7786    SKIP_GALPHOT = TRUE;
    7887    remove_argument (N, argc, argv);
     88  }
     89
     90  if (SKIP_IMAGES && !(SKIP_MEASURE || SKIP_LENSING)) {
     91    fprintf (stderr, "WARNING: skipping images but merging measure and lensing tables: imageIDs will not be correct\n");
     92    fprintf (stderr, "type Ctrl-C within 5 seconds to cancel\n");
     93    for (int i = 5; i > 0; i--) {
     94      fprintf (stderr, "%d.. ", i);
     95      usleep (1000000);
     96    }
     97    fprintf (stderr, "\n");
    7998  }
    8099
  • trunk/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c

    r39329 r42133  
    404404  off_t i;
    405405
    406   for (i = 0; i < IDmap->oldIDmax + 1; i++) {
     406  for (i = 0; IDmap->notFoundMeasure && (i < IDmap->oldIDmax + 1); i++) {
    407407    if (!IDmap->notFoundMeasure[i]) continue;
    408408    fprintf (stderr, "SKIP IMAGE MEASURE: "OFF_T_FMT", %d measures\n", i, IDmap->notFoundMeasure[i]);
    409409  }
    410   for (i = 0; i < IDmap->oldIDmax + 1; i++) {
     410  for (i = 0; IDmap->notFoundLensing && (i < IDmap->oldIDmax + 1); i++) {
    411411    if (!IDmap->notFoundLensing[i]) continue;
    412412    fprintf (stderr, "SKIP IMAGE LENSING: "OFF_T_FMT", %d lensings\n", i, IDmap->notFoundLensing[i]);
  • trunk/Ohana/src/dvomerge/src/dvomergeUpdate.c

    r39301 r42133  
    8181  }
    8282
    83   if (CONTINUE) {
    84     // need to determine the mapping from the input to the output images
    85     dvomergeImagesGetMap (&IDmap, input, output);
    86   } else {
    87     dvomergeImagesUpdate (&IDmap, input, output);
    88     if (IMAGES_ONLY) exit (0);
     83  // do not merge the images unless requested
     84  if (!SKIP_IMAGES) {
     85    if (CONTINUE) {
     86      // need to determine the mapping from the input to the output images
     87      dvomergeImagesGetMap (&IDmap, input, output);
     88    } else {
     89      dvomergeImagesUpdate (&IDmap, input, output);
     90      if (IMAGES_ONLY) exit (0);
     91    }
    8992  }
    90 
     93   
    9194  // load the sky table for the existing database
    9295  insky = SkyTableLoadOptimal (input, NULL, NULL, FALSE, SKY_DEPTH_HST, VERBOSE);
  • trunk/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r41341 r42133  
    163163    }
    164164
     165    // for SKIP_IMAGES, this is a NO-OP
    165166    dvo_update_image_IDs (IDmap, &incatalog);
    166167
  • trunk/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c

    r38986 r42133  
    6969      LoadCatalog (&outcatalog, outlist[0].regions[j], outlist[0].filename[j], "w", threadData->NsecfiltOutput);
    7070
     71      // for SKIP_IMAGES, this is a NO-OP
    7172      dvo_update_image_IDs (threadData->IDmap, &incatalog);
    7273      merge_catalogs_old (&threadData->outsky->regions[j], &outcatalog, &incatalog, RADIUS, threadData->secfiltMap);
     
    183184  }
    184185
    185   if (CONTINUE) {
    186     // need to determine the mapping from the input to the output images
    187     dvomergeImagesGetMap (&IDmap, input, output);
    188   } else {
    189     dvomergeImagesUpdate (&IDmap, input, output);
    190     if (IMAGES_ONLY) exit (0);
     186  if (!SKIP_IMAGES) {
     187    if (CONTINUE) {
     188      // need to determine the mapping from the input to the output images
     189      dvomergeImagesGetMap (&IDmap, input, output);
     190    } else {
     191      dvomergeImagesUpdate (&IDmap, input, output);
     192      if (IMAGES_ONLY) exit (0);
     193    }
    191194  }
    192195
Note: See TracChangeset for help on using the changeset viewer.