Index: trunk/Ohana/src/opihi/dvo/dmagmeas.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/dmagmeas.c	(revision 3462)
+++ trunk/Ohana/src/opihi/dvo/dmagmeas.c	(revision 4470)
@@ -10,7 +10,7 @@
   Vector *xvec, *yvec;
 
-  char filename[256], catdir[256];
+  char filename[256], catdir[256], *CPTfile;
   double Radius, *M1, *M3;
-  int i, j, k, m, N1, N3;
+  int i, j, k, m, N1, N3, N;
   int Npts, NPTS, param, mode[3];
   int Ngraph, Nsec, Nregions;
@@ -32,4 +32,12 @@
   /* find CATDIR in config system */
   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 */
@@ -53,7 +61,14 @@
   }
 
-  /* 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);
+  }
   if (!SetImageSelection (param, &graphsky, TRUE)) return (FALSE);
 
