IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 6, 2005, 2:37:31 PM (21 years ago)
Author:
eugene
Message:

added -cpt options to dvo extraction functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/cmd.c

    r3462 r4470  
    99  Vector *xvec, *yvec;
    1010
    11   char filename[256], catdir[256];
     11  char filename[256], catdir[256], *CPTfile;
    1212  double Radius, *M1, *M3;
    13   int i, j, m, i1, i3, N1, N3;
     13  int i, j, m, i1, i3, N1, N3, N;
    1414  int Npts, NPTS, mode[3];
    1515  int Ngraph, Nsec, Nregions;
     
    3232  VarConfig ("CATDIR", "%s", catdir);
    3333
     34  /* check for CPT selection */
     35  CPTfile = NULL;
     36  if (N = get_argument (argc, argv, "-cpt")) {
     37    remove_argument (N, &argc, argv);
     38    CPTfile = strcreate (argv[N]);
     39    remove_argument (N, &argc, argv);
     40  }   
     41
    3442  /* interpret command-line options */
    3543  if (!SetPhotSelections (&argc, argv)) goto usage;
     
    4351  if (!GetPhotcodeInfo (argv[5], &code[2], &mode[2])) return (FALSE);
    4452
    45   /* find catalog files which overlap this region */
    46   Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
    47   regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
     53  /* determine region-file names */
     54  if (CPTfile == NULL) {
     55    float Radius;
     56    Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
     57    regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
     58  } else {
     59    Nregions = 1;
     60    ALLOCATE (regions, RegionFile, 1);
     61    strcpy (regions[0].name, CPTfile);
     62  }
    4863
    4964  /* init vectors to save data */
Note: See TracChangeset for help on using the changeset viewer.