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/dmagmeas.c

    r3462 r4470  
    1010  Vector *xvec, *yvec;
    1111
    12   char filename[256], catdir[256];
     12  char filename[256], catdir[256], *CPTfile;
    1313  double Radius, *M1, *M3;
    14   int i, j, k, m, N1, N3;
     14  int i, j, k, m, N1, N3, N;
    1515  int Npts, NPTS, param, mode[3];
    1616  int Ngraph, Nsec, Nregions;
     
    3232  /* find CATDIR in config system */
    3333  VarConfig ("CATDIR", "%s", catdir);
     34
     35  /* check for CPT selection */
     36  CPTfile = NULL;
     37  if (N = get_argument (argc, argv, "-cpt")) {
     38    remove_argument (N, &argc, argv);
     39    CPTfile = strcreate (argv[N]);
     40    remove_argument (N, &argc, argv);
     41  }   
    3442
    3543  /* interpret command-line options */
     
    5361  }
    5462
    55   /* find catalog files which overlap this region */
    56   Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
    57   regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
     63  /* determine region-file names */
     64  if (CPTfile == NULL) {
     65    float Radius;
     66    Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
     67    regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
     68  } else {
     69    Nregions = 1;
     70    ALLOCATE (regions, RegionFile, 1);
     71    strcpy (regions[0].name, CPTfile);
     72  }
    5873  if (!SetImageSelection (param, &graphsky, TRUE)) return (FALSE);
    5974
Note: See TracChangeset for help on using the changeset viewer.