IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17205


Ignore:
Timestamp:
Mar 28, 2008, 3:38:15 PM (18 years ago)
Author:
eugene
Message:

add option to select / exclude by photcode

Location:
trunk/Ohana/src/relastro/src
Files:
2 edited

Legend:

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

    r17128 r17205  
    8888  }
    8989
    90   PHOTCODE_LIST = NULL;
     90  PHOTCODE_KEEP_LIST = NULL;
     91  if ((N = get_argument (argc, argv, "+photcode"))) {
     92    remove_argument (N, &argc, argv);
     93    PHOTCODE_KEEP_LIST = strcreate(argv[N]);
     94    remove_argument (N, &argc, argv);
     95  }
     96
     97  PHOTCODE_SKIP_LIST = NULL;
    9198  if ((N = get_argument (argc, argv, "-photcode"))) {
    9299    remove_argument (N, &argc, argv);
    93     PHOTCODE_LIST = strcreate(argv[N]);
     100    PHOTCODE_SKIP_LIST = strcreate(argv[N]);
    94101    remove_argument (N, &argc, argv);
    95102  }
     
    108115  }
    109116
     117  SAVEPLOT = FALSE;
    110118  PLOTSTUFF = FALSE;
    111119  if ((N = get_argument (argc, argv, "-plot"))) {
     
    121129  }
    122130
    123   strcpy (STATMODE, "CHI_INNER_WTMEAN");
     131  // by default, require > 10pts to clip
     132  strcpy (STATMODE, "CHI_INNER_80_WTMEAN");
    124133  if ((N = get_argument (argc, argv, "-statmode"))) {
    125134    remove_argument (N, &argc, argv);
     
    193202  }
    194203 
     204  // for now, make the default to ignore the photflags
     205  // XXX make it true by default instead?
    195206  PhotFlagSelect = FALSE;
    196   if ((N = get_argument (argc, argv, "-photflags"))) {
    197     remove_argument (N, &argc, argv);
    198     PhotFlagValue = atoi (argv[N]);
     207  if ((N = get_argument (argc, argv, "+photflags"))) {
    199208    remove_argument (N, &argc, argv);
    200209    PhotFlagSelect = TRUE;
     210  }
     211
     212  PhotFlagBad = 0;
     213  if ((N = get_argument (argc, argv, "-photflagbad"))) {
     214    remove_argument (N, &argc, argv);
     215    PhotFlagBad = atoi (argv[N]);
     216    remove_argument (N, &argc, argv);
     217  }
     218
     219  PhotFlagPoor = 0;
     220  if ((N = get_argument (argc, argv, "-photflagpoor"))) {
     221    remove_argument (N, &argc, argv);
     222    PhotFlagPoor = atoi (argv[N]);
     223    remove_argument (N, &argc, argv);
    201224  }
    202225
     
    225248  fprintf (stderr, "  -update-mosaics\n");
    226249  fprintf (stderr, "  -time (start)(stop)\n");
     250  fprintf (stderr, "  +photcode (code)[,code,code...]\n");
    227251  fprintf (stderr, "  -photcode (code)[,code,code...]\n");
    228252  fprintf (stderr, "  -plot\n");
     
    237261  fprintf (stderr, "  -area Xmin Xmax Ymin Ymax\n");
    238262  fprintf (stderr, "  -instmag min max\n\n");
     263  fprintf (stderr, "  +photflags\n");
     264  fprintf (stderr, "  -photflagbad\n");
     265  fprintf (stderr, "  -photflagpoor\n");
    239266  fprintf (stderr, "  -v\n");
    240267  fprintf (stderr, "  \n");
  • trunk/Ohana/src/relastro/src/select_images.c

    r15509 r17205  
    7676  for (i = 0; i < Ntimage; i++) {
    7777     
    78     /* exclude images by photcode, if selected */
    79     if (Nphotcodes > 0) {
     78    /* select images by photcode, or equiv photcode, if specified */
     79    if (NphotcodesKeep > 0) {
    8080      found = FALSE;
    81       for (j = 0; (j < Nphotcodes) && !found; j++) {
    82         if (photcodes[j][0].code == timage[i].photcode) found = TRUE;
     81      for (k = 0; (k < NphotcodesKeep) && !found; k++) {
     82        if (photcodesKeep[k][0].code == timage[i].photcode) found = TRUE;
     83        if (photcodesKeep[k][0].code == GetPhotcodeEquivCodebyCode(timage[i].photcode)) found = TRUE;
    8384      }
    8485      if (!found) continue;
     86    }
     87    if (NphotcodesSkip > 0) {
     88      found = FALSE;
     89      for (k = 0; (k < NphotcodesSkip) && !found; k++) {
     90        if (photcodesSkip[k][0].code == timage[i].photcode) found = TRUE;
     91        if (photcodesSkip[k][0].code == GetPhotcodeEquivCodebyCode(timage[i].photcode)) found = TRUE;
     92      }
     93      if (found) continue;
    8594    }
    8695
Note: See TracChangeset for help on using the changeset viewer.