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

    r3462 r4470  
    99  Vector *xvec, *yvec;
    1010
    11   char filename[256], catdir[256];
     11  char filename[256], catdir[256], *CPTfile;
    1212  double Radius;
    1313  double *M1, *M2;
    14   int i, m, k, Npts, NPTS;
     14  int i, m, k, Npts, NPTS, N;
    1515  int N1, N2, i1, i2, mode[4];
    1616  int Ngraph, Nsec, Nregions, UseAverages;
     
    3333  VarConfig ("CATDIR", "%s", catdir);
    3434
     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  }   
     42
    3543  /* interpret command-line options */
    3644  if (!SetPhotSelections (&argc, argv)) goto usage;
     
    4755  if ((mode[2] == MAG_AVE) || (mode[2] == MAG_REF)) UseAverages = TRUE;
    4856
    49   /* find catalog files which overlap this region */
    50   Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
    51   regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
     57  /* determine region-file names */
     58  if (CPTfile == NULL) {
     59    float Radius;
     60    Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
     61    regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
     62  } else {
     63    Nregions = 1;
     64    ALLOCATE (regions, RegionFile, 1);
     65    strcpy (regions[0].name, CPTfile);
     66  }
    5267
    5368  /* init vectors to save data */
Note: See TracChangeset for help on using the changeset viewer.