IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 26, 2006, 9:53:48 AM (20 years ago)
Author:
eugene
Message:

updating photdbc to be a more general DVO db copy program

File:
1 edited

Legend:

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

    r4808 r8630  
    1717  }
    1818
     19  ExcludeByInstMag = FALSE;
     20  if ((N = get_argument (argc, argv, "-instmag"))) {
     21    remove_argument (N, &argc, argv);
     22    ExcludeByInstMag = TRUE;
     23    remove_argument (N, &argc, argv);
     24    INST_MAG_MIN = atof(argv[N]);
     25    remove_argument (N, &argc, argv);
     26    INST_MAG_MAX = atof(argv[N]);
     27  }
     28
     29  ExcludeByMaxMinMag = FALSE;
     30  if ((N = get_argument (argc, argv, "-maxminmag"))) {
     31    remove_argument (N, &argc, argv);
     32    ExcludeByMaxMinMag = TRUE;
     33    remove_argument (N, &argc, argv);
     34    MAX_MIN_MAG = atof(argv[N]);
     35  }
     36
     37  /* specify portion of the sky */
     38  REGION.Rmin = 0;
     39  REGION.Rmax = 360;
     40  REGION.Dmin = -90;
     41  REGION.Dmax = +90;
     42  if ((N = get_argument (argc, argv, "-region"))) {
     43    remove_argument (N, &argc, argv);
     44    REGION.Rmin = atof (argv[N]);
     45    remove_argument (N, &argc, argv);
     46    REGION.Rmax = atof (argv[N]);
     47    remove_argument (N, &argc, argv);
     48    REGION.Dmin = atof (argv[N]);
     49    remove_argument (N, &argc, argv);
     50    REGION.Dmax = atof (argv[N]);
     51    remove_argument (N, &argc, argv);
     52
     53    if (REGION.Rmin == REGION.Rmax) {
     54      fprintf (stderr, "ERROR: selected region is ill-defined: Rmin == Rmax\n");
     55      exit (2);
     56    }
     57    if (REGION.Dmin == REGION.Dmax) {
     58      fprintf (stderr, "ERROR: selected region is ill-defined: Dmin == Dmax\n");
     59      exit (2);
     60    }
     61  }
     62
    1963  if (argc != 2) {
    20     fprintf (stderr, "USAGE: photdbc (region)\n");
     64    fprintf (stderr, "USAGE: photdbc (output)\n");
    2165    exit (2);
    2266  }
     67
     68  if ((REGION.Rmin == 0) && (REGION.Rmax == 360) && (REGION.Dmin == -90) && (REGION.Dmax == +90)) {
     69    int i;
     70    fprintf (stderr, "you have requested a copy of the entire sky in one pass\n");
     71    fprintf (stderr, "this could be a time consuming operation.  type Ctrl-C within 5 seconds to cancel\n");
     72    for (i = 5; i > 0; i--) {
     73      fprintf (stderr, "%d.. ", i);
     74      usleep (1000000);
     75    }
     76    fprintf (stderr, "\n");
     77  }
     78
    2379  return (TRUE);
    2480}
    2581
     82/**
     83
     84 this program takes an existing DVO database and makes a copy, applying a number of optional
     85 filters in the process. 
     86
     87 photdbc (output)
     88
     89 allowed filters / restrictions include:
     90
     91 -region ra dec ra dec : limit operation to the specified region
     92 -join                 : join measurements between stars using JOIN_RADIUS
     93 -ccdregion X Y X Y    : only keep detections within the specified detector region
     94                         (can this be limited to specific photcodes? cameras? detectors?)
     95 -photcode_limits code Mmin Mmax : allow multiples of these
     96
     97 SIGMA_MAX
     98 NMEAS_MIN
     99 INST_MAG_MAX
     100 INST_MAG_MIN
     101
     102**/
Note: See TracChangeset for help on using the changeset viewer.