Index: trunk/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gstar.c	(revision 5320)
+++ trunk/Ohana/src/opihi/dvo/gstar.c	(revision 5448)
@@ -9,9 +9,10 @@
   double Mcat, Mrel;
   float *RA, *DEC;
-  int i, j, k, m, N, *N1, Nregions, Nsec, NPTS;
+  int i, j, k, m, N, *N1, Nsec, NPTS;
   int Nstars, found, GetMeasures, Nlo, Nhi;
   int SaveVectors;
   Vector *vec1, *vec2, *vec3, *vec4;
-  RegionFile *regions;
+  SkyTable *sky;
+  SkyList *skylist;
   Catalog catalog;
   PhotCode *code;
@@ -52,14 +53,15 @@
   while (Ra > 360.0) Ra -= 360.0;
   
-  regions = find_regions (Ra, Dec, Radius, &Nregions);
-
-  if (Nregions > 1) {
+  /* load sky from correct table */
+  sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, -1, VERBOSE);
+  SkyTableSetFilenames (sky, CATDIR, "cpt");
+  skylist = SkyListByRadius (sky, -1, Ra, Dec, Radius);
+
+  if (skylist[0].Nregions > 1) {
     fprintf (stderr, "warning, radius overlaps region boundary, not yet implemented\n");
   }
 
-  /* set filename, read in header */
-  sprintf (filename, "%s/%s", catdir, regions[0].name);
   /* lock, load, unlock catalog */
-  catalog.filename = filename;
+  catalog.filename = skylist[0].regions[0][0].filename;
   switch (lock_catalog (&catalog, LCK_SOFT)) {
   case 2:
