Index: trunk/Ohana/src/opihi/dvo/cmd.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/cmd.c	(revision 3462)
+++ trunk/Ohana/src/opihi/dvo/cmd.c	(revision 4470)
@@ -9,7 +9,7 @@
   Vector *xvec, *yvec;
 
-  char filename[256], catdir[256];
+  char filename[256], catdir[256], *CPTfile;
   double Radius, *M1, *M3;
-  int i, j, m, i1, i3, N1, N3;
+  int i, j, m, i1, i3, N1, N3, N;
   int Npts, NPTS, mode[3];
   int Ngraph, Nsec, Nregions;
@@ -32,4 +32,12 @@
   VarConfig ("CATDIR", "%s", catdir);
 
+  /* check for CPT selection */
+  CPTfile = NULL;
+  if (N = get_argument (argc, argv, "-cpt")) {
+    remove_argument (N, &argc, argv);
+    CPTfile = strcreate (argv[N]);
+    remove_argument (N, &argc, argv);
+  }    
+
   /* interpret command-line options */
   if (!SetPhotSelections (&argc, argv)) goto usage;
@@ -43,7 +51,14 @@
   if (!GetPhotcodeInfo (argv[5], &code[2], &mode[2])) return (FALSE);
 
-  /* find catalog files which overlap this region */
-  Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
-  regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
+  /* determine region-file names */
+  if (CPTfile == NULL) {
+    float Radius;
+    Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
+    regions = find_regions (graphsky.coords.crval1, graphsky.coords.crval2, Radius, &Nregions);
+  } else {
+    Nregions = 1;
+    ALLOCATE (regions, RegionFile, 1);
+    strcpy (regions[0].name, CPTfile);
+  }
 
   /* init vectors to save data */
