Index: trunk/Ohana/src/addstar/include/addstar.h
===================================================================
--- trunk/Ohana/src/addstar/include/addstar.h	(revision 40519)
+++ trunk/Ohana/src/addstar/include/addstar.h	(revision 40520)
@@ -327,6 +327,6 @@
 void saveMosaicCoords (Coords *input);
 
-Catalog *ReadStarsUKIRT (FILE *f, char *name, Header *header, Image *images, off_t *nimages);
-Catalog *LoadDataUKIRT (FILE *f, char *file, Image **images, off_t *nimages, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t NheaderSets);
+Catalog *ReadStarsUKIRT (FILE *f, char *name, Header *header, Image *images, off_t *nimages, SkyRegion *region);
+Catalog *LoadDataUKIRT (FILE *f, char *file, Image **images, off_t *nimages, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t NheaderSets, SkyRegion *region);
 
 AddstarFile *LoadFilenames (int *nfile, char *filename, AddstarClientOptions *options);
Index: trunk/Ohana/src/addstar/src/LoadDataUKIRT.c
===================================================================
--- trunk/Ohana/src/addstar/src/LoadDataUKIRT.c	(revision 40519)
+++ trunk/Ohana/src/addstar/src/LoadDataUKIRT.c	(revision 40520)
@@ -6,5 +6,5 @@
 int MergeCatalogs (Catalog *tgt, Catalog *src);
 
-Catalog *LoadDataUKIRT (FILE *f, char *imagename, Image **images, off_t *nimages, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t NheaderSets) {
+Catalog *LoadDataUKIRT (FILE *f, char *imagename, Image **images, off_t *nimages, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t NheaderSets, SkyRegion *region) {
 
   off_t Nskip, Nvalid, NVALID;
@@ -41,5 +41,5 @@
     fseeko (f, Nskip, SEEK_SET); 
 
-    Catalog *newcat = ReadStarsUKIRT (f, imagename, headers[Nhead], images[0], &Nvalid);
+    Catalog *newcat = ReadStarsUKIRT (f, imagename, headers[Nhead], images[0], &Nvalid, region);
     MergeCatalogs (catalog, newcat);
 
Index: trunk/Ohana/src/addstar/src/LoadStars.c
===================================================================
--- trunk/Ohana/src/addstar/src/LoadStars.c	(revision 40519)
+++ trunk/Ohana/src/addstar/src/LoadStars.c	(revision 40520)
@@ -77,5 +77,5 @@
     // if these are SDSS data, load with SDSS-specific wrapper
     if (headerSets[0].exttype && !strcmp (headerSets[0].exttype, "UKIRT_OBJ")) {
-      newcat = LoadDataUKIRT (f, file[i].imagename, images, Nimages, headers, extsize, headerSets, NheaderSets);
+      newcat = LoadDataUKIRT (f, file[i].imagename, images, Nimages, headers, extsize, headerSets, NheaderSets, &region);
       goto next_file;
     }
Index: trunk/Ohana/src/addstar/src/ReadStarsUKIRT.c
===================================================================
--- trunk/Ohana/src/addstar/src/ReadStarsUKIRT.c	(revision 40519)
+++ trunk/Ohana/src/addstar/src/ReadStarsUKIRT.c	(revision 40520)
@@ -8,5 +8,5 @@
 // given a file with the pointer at the start of the table block and the 
 // corresponding image header, load the stars from the table
-Catalog *ReadStarsUKIRT (FILE *f, char *imagename, Header *header, Image *images, off_t *nimages) {
+Catalog *ReadStarsUKIRT (FILE *f, char *imagename, Header *header, Image *images, off_t *nimages, SkyRegion *region) {
 
   off_t Nrow;
@@ -14,6 +14,12 @@
   char type[80];
   FTable table;
-  
-  myAbort("need to save the RA,DEC range in a returned SkyRegion (see LoadData)");
+  float RMIN, RMAX, DMIN, DMAX;
+  
+  // myAbort("need to save the RA,DEC range in a returned SkyRegion (see LoadData)");
+
+  RMIN = region->Rmin;
+  RMAX = region->Rmax;
+  DMIN = region->Dmin;
+  DMAX = region->Dmax;
 
   // the FITS binary table header is the same as the image header
@@ -177,4 +183,10 @@
     catalog->average[i].Nmeasure      = 1;
     catalog->average[i].measureOffset = i;
+
+    // determine the full coverage of this set of measurements
+    RMIN = MIN (RMIN, catalog->average[i].R);
+    RMAX = MAX (RMAX, catalog->average[i].R);
+    DMIN = MIN (DMIN, catalog->average[i].D);
+    DMAX = MAX (DMAX, catalog->average[i].D);
 
     catalog->measure[i].R         = catalog->average[i].R;
@@ -210,4 +222,6 @@
     catalog->measure[i].imageID   = *nimages; // set imageID to entry for this filter
   }
+  catalog->Naverage = Nstars;
+  catalog->Nmeasure = Nstars;
 
   if (1) {
@@ -272,4 +286,12 @@
   // ohana_memcheck (TRUE);
 
+  if (VERBOSE) fprintf (stderr, "stars cover region %f,%f - %f,%f\n", RMIN, DMIN, RMAX, DMAX);
+
+  // define containing region a bit generously
+  region->Rmin = RMIN;
+  region->Rmax = RMAX;
+  region->Dmin = DMIN;
+  region->Dmax = DMAX;
+
   return (catalog);
 }
