IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27421


Ignore:
Timestamp:
Mar 23, 2010, 5:17:10 PM (16 years ago)
Author:
eugene
Message:

add optional search by photcode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20100225/Ohana/src/opihi/dvo/images.c

    r20936 r27421  
    2121  char name[256];
    2222  int typehash;
    23 
     23  PhotCode *photcode;
     24  int Nsec, photcodeEquiv;
     25
     26  if (!InitPhotcodes ()) return (FALSE);
    2427  if (!style_args (&graphmode, &argc, argv, &kapa)) goto usage;
    2528
     
    4144    remove_argument (N, &argc, argv);
    4245    HIDDEN = TRUE;
     46  }
     47
     48  photcode = NULL;
     49  photcodeEquiv = FALSE;
     50  if ((N = get_argument (argc, argv, "-p"))) {
     51    remove_argument (N, &argc, argv);
     52    photcode = GetPhotcodebyName (argv[N]);
     53    if (photcode == NULL) {
     54      gprint (GP_ERR, "photcode %s not found\n", argv[N]);
     55      return FALSE;
     56    }
     57    remove_argument (N, &argc, argv);
     58    Nsec = GetPhotcodeNsec (photcode->code);
     59    if (Nsec != -1) photcodeEquiv = TRUE;
     60  }
     61  if ((N = get_argument (argc, argv, "-photcode"))) {
     62    remove_argument (N, &argc, argv);
     63    photcode = GetPhotcodebyName (argv[N]);
     64    if (photcode == NULL) {
     65      gprint (GP_ERR, "photcode %s not found\n", argv[N]);
     66      return FALSE;
     67    }
     68    remove_argument (N, &argc, argv);
     69    Nsec = GetPhotcodeNsec (photcode->code);
     70    if (Nsec != -1) photcodeEquiv = TRUE;
    4371  }
    4472
     
    122150    if (TimeSelect && ((image[i].tzero < tzero) || (image[i].tzero+image[i].trate*image[i].NY > tzero + trange))) continue;
    123151    if (!FindMosaicForImage (image, Nimage, i)) continue;
     152    if (photcode) {
     153      if ( photcodeEquiv && (photcode[0].code != GetPhotcodeEquivCodebyCode(image[i].photcode))) continue;
     154      if (!photcodeEquiv && (photcode[0].code != image[i].photcode)) continue;
     155    }
    124156
    125157    Npts = 4;
Note: See TracChangeset for help on using the changeset viewer.