IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35579


Ignore:
Timestamp:
May 10, 2013, 5:53:31 PM (13 years ago)
Author:
eugene
Message:

add test-case options -dup-images (allow duplicate image IDs) and -image-id-override (force a specific image ID)

Location:
trunk/Ohana/src/addstar
Files:
4 edited

Legend:

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

    r35263 r35579  
    119119int     ACCEPT_TIME;    // accept time stamp (or 0)
    120120int     NO_STARS;       // ignore the stars
     121int     NO_DUPLICATE_IMAGES; // allow / skip duplicate images
     122int     IMAGE_ID_OVERRIDE; // allow / skip duplicate images
    121123int     TEXTMODE;       // force input file to be loaded as RAW
    122124int     SUBPIX;         // apply a subpix correction
  • trunk/Ohana/src/addstar/src/ImageIndex.c

    r35263 r35579  
    159159  if (!index) {
    160160      fprintf (stderr, "image index file is not found, cannot check for image duplicates\n");
    161       exit (2);
     161      exit (1);
    162162  }
    163163
  • trunk/Ohana/src/addstar/src/UpdateImageIDs.c

    r35263 r35579  
    3535  }
    3636
     37  // TEST IMAGE_ID OVER-RIDE:
     38  if (IMAGE_ID_OVERRIDE) {
     39    imageID = IMAGE_ID_OVERRIDE;
     40  }
     41
    3742  // XXX should the first image ID be 1, not 0?
    3843  if (imageID == 0) imageID = 1;
     
    5459  // set and update the imageID sequence
    5560  // the file holding the index is created above if this is an empty db
    56   CheckDuplicateImageIDs (images, Nimages);
     61  if (NO_DUPLICATE_IMAGES) {
     62    CheckDuplicateImageIDs (images, Nimages);
     63  }
    5764
    5865  imageID += Nimages;
  • trunk/Ohana/src/addstar/src/args.c

    r34405 r35579  
    308308  if ((N = get_argument (argc, argv, "-no-stars"))) {
    309309    NO_STARS = TRUE;
     310    remove_argument (N, &argc, argv);
     311  }
     312  /* skip the stars */
     313  NO_DUPLICATE_IMAGES = TRUE;
     314  if ((N = get_argument (argc, argv, "-dup-images"))) {
     315    NO_DUPLICATE_IMAGES = FALSE;
     316    remove_argument (N, &argc, argv);
     317  }
     318  /* skip the stars */
     319  IMAGE_ID_OVERRIDE = 0;
     320  if ((N = get_argument (argc, argv, "-image-id-override"))) {
     321    remove_argument (N, &argc, argv);
     322    IMAGE_ID_OVERRIDE = atoi(argv[N]);
    310323    remove_argument (N, &argc, argv);
    311324  }
     
    438451  fprintf (stderr, "  -use-name                   : use the given name instead of the filename as the filename\n");
    439452  fprintf (stderr, "  -no-stars                   : skip the stars\n");
     453  fprintf (stderr, "  -dup-images                 : skip the test for duplicate image IDs (test only!)\n");
    440454  fprintf (stderr, "  -force                      : force read of database with inconsistent info\n");
    441455  fprintf (stderr, "  -threads (N)                : use N threads for resort option\n");
Note: See TracChangeset for help on using the changeset viewer.