Index: /trunk/Ohana/src/addstar/include/skycells.h
===================================================================
--- /trunk/Ohana/src/addstar/include/skycells.h	(revision 23913)
+++ /trunk/Ohana/src/addstar/include/skycells.h	(revision 23914)
@@ -98,5 +98,5 @@
 int 	     sky_triangle_coords       	    PROTO((SkyTriangle *triangle));
 
-SkyRectangle *sky_rectangle_ring            PROTO((float dec, float dDEC, int *nring));
+SkyRectangle *sky_rectangle_ring            PROTO((float dec, float dDEC, int *nring, char *format));
 
 SkyTriangle *sky_divide_triangles      	    PROTO((SkyTriangle *in, int *ntriangles));
Index: /trunk/Ohana/src/addstar/src/args_skycells.c
===================================================================
--- /trunk/Ohana/src/addstar/src/args_skycells.c	(revision 23913)
+++ /trunk/Ohana/src/addstar/src/args_skycells.c	(revision 23914)
@@ -182,9 +182,10 @@
 
   fprintf (stderr, "  -mode (name)                : define the type of tessellation.  available options are:\n");
-  fprintf (stderr, "     SQUARE                   : generate rectangular skycells using icosahedron base solid (default)\n");
+  fprintf (stderr, "     SQUARE                   : generate rectangular skycells using base solid (default)\n");
   fprintf (stderr, "     TRIANGLE                 : generate triangular skycells using icosahedron base solid\n");
+  fprintf (stderr, "     RINGS                    : generate rectangular skycells using declination strips\n");
   fprintf (stderr, "     LOCAL                    : generate a local tessellation around a spot on the sky\n");
   fprintf (stderr, "                                 (Note that this tessellation does not cover the full sky)\n");
-  fprintf (stderr, "  -solid (name)               : specify the base solid\n");
+  fprintf (stderr, "  -solid (name)               : specify the base solid (default: ICOSAHEDRON)\n");
   fprintf (stderr, "                                value may be one of: TETRAHEDRON, CUBE, OCTOHEDRON, DODECAHEDRON, ICOSAHEDRON\n");
   fprintf (stderr, "                                for convenience, only the first 4 characters are required\n");
Index: /trunk/Ohana/src/addstar/src/sky_tessalation.c
===================================================================
--- /trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 23913)
+++ /trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 23914)
@@ -231,8 +231,9 @@
 int sky_tessellation_rings (FITS_DB *db, int level, int Nmax) {
 
-  int j, nDEC, Nimage, Nring;
+  int j, nDEC, Nimage, Nring, Ntotal, Ndigit;
   float dec, dDEC;
   SkyRectangle *ring;
   Image *image;
+  char format[16];
 
   // The tessellation has one input parameter: the approximate cell size.  Starting with
@@ -246,11 +247,14 @@
   nDEC += 2;
 
-  // a test
-  // for (dec = 0.0 + 0.5*dDEC; dec < +90.0; dec += dDEC) {
+  // how many total projection cells for this realization?  divide sky area by cell area:
+  // this is used to set the number of digits, so it does not need to be very accurate...
+  Ntotal = 41254.2 / (dDEC*dDEC);
+  Ndigit = (int)(log10(Ntotal)) + 1 ;
+  snprintf (format, 16, "skycell.%%0%dd", Ndigit);
 
   // generate the a collection of rectangles for each ring
   for (dec = -90.0; dec < +90.0 + 0.5*dDEC; dec += dDEC) {
 
-    ring = sky_rectangle_ring (dec, dDEC, &Nring);
+    ring = sky_rectangle_ring (dec, dDEC, &Nring, format);
     if (!ring) continue;
 
@@ -534,6 +538,7 @@
 
 // define the parameters of a single sky projection center
-SkyRectangle *sky_rectangle_ring (float dec, float dDEC, int *nring) {
-
+SkyRectangle *sky_rectangle_ring (float dec, float dDEC, int *nring, char *format) {
+
+  static int Nname = 0;
   int i, NX, NY, nRA;
   SkyRectangle *ring;
@@ -631,8 +636,10 @@
     strcpy (ring[i].coords.ctype, "DEC--TAN");
 
-    ring[i].NX = NX;
-    ring[i].NY = NY;
+    ring[i].NX = NX*(1.0 + PADDING);
+    ring[i].NY = NY*(1.0 + PADDING);
     ring[i].photcode = 1; // this needs to be set more sensibly
 
+    snprintf (ring[i].name, DVO_IMAGE_NAME_LEN, format, Nname);
+    Nname++;
 
     // fprintf (stderr, "%f %f  : %f %f\n", 
