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/dmags.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;
     
    3131  /* find CATDIR in config system */
    3232  VarConfig ("CATDIR", "%s", catdir);
     33
     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  }   
    3341
    3442  /* interpret command-line options */
     
    5260  }
    5361
    54   /* find catalog files which overlap this region */
    55   Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
    56   regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
     62  /* determine region-file names */
     63  if (CPTfile == NULL) {
     64    float Radius;
     65    Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
     66    regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
     67  } else {
     68    Nregions = 1;
     69    ALLOCATE (regions, RegionFile, 1);
     70    strcpy (regions[0].name, CPTfile);
     71  }
    5772
    5873  /* init vectors to save data */
Note: See TracChangeset for help on using the changeset viewer.