Index: /branches/eam_branches/ipp-20121130/Ohana/src/addstar/src/findskycell.c
===================================================================
--- /branches/eam_branches/ipp-20121130/Ohana/src/addstar/src/findskycell.c	(revision 34824)
+++ /branches/eam_branches/ipp-20121130/Ohana/src/addstar/src/findskycell.c	(revision 34825)
@@ -15,5 +15,5 @@
 
 void usage (void) {
-  fprintf (stderr, "USAGE: findcell -mktree (tree) (catdir)\n");
+  fprintf (stderr, "USAGE: findcell -mktree (tree) (catdir) [-nx Nx] [-ny Ny]\n");
   fprintf (stderr, "USAGE: findcell -tree (tree) (datafile)\n");
   fprintf (stderr, "   (datafile) should contain a list of RA,DEC pairs\n");
@@ -26,5 +26,5 @@
 int main (int argc, char **argv) {
 
-  int N;
+  int N, NX_SUB, NY_SUB;
   char *treefile = NULL;
 
@@ -37,4 +37,16 @@
   if (get_argument (argc, argv, "-help")) usage ();
   if (get_argument (argc, argv, "-h")) usage ();
+
+  NX_SUB = NY_SUB = 1;
+  if ((N = get_argument (argc, argv, "-nx"))) {
+    remove_argument (N, &argc, argv);
+    NX_SUB = atof (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+  if ((N = get_argument (argc, argv, "-ny"))) {
+    remove_argument (N, &argc, argv);
+    NY_SUB = atof (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
 
   /* extra error messages */
@@ -326,4 +338,11 @@
 
     fprintf (stdout, "%10.6f %10.6f  %3d %3d  %s\n", ra, dec, zone, band, tree->name[zone][band]);
+
+    // I know the projection cell (band,zone), but I need to find the skycell within that projection cell.
+    // the proj cell is divided into Nx, Ny bits.
+    // (ra,dec) for (Ro,Do) -> (x,y).  given (Xo,Yo),(dX,dY) I can find ix,iy
+    // I currently track Ro,Do (tree->RA_origin[zone], tree->...)
+
+
   }
 
Index: /branches/eam_branches/ipp-20121130/Ohana/src/relphot/src/BoundaryTreeOps.c
===================================================================
--- /branches/eam_branches/ipp-20121130/Ohana/src/relphot/src/BoundaryTreeOps.c	(revision 34824)
+++ /branches/eam_branches/ipp-20121130/Ohana/src/relphot/src/BoundaryTreeOps.c	(revision 34825)
@@ -22,4 +22,8 @@
   
   snprintf (primaryCellName, DVO_MAX_PATH, "RINGS.V3.%s", tree->name[zone][band]);
+
+  // I have ra, dec, and the primary projection cell.  In order to choose the primary skycell,
+  // I just need to project to ra,dec to X,Y based on the center of the cell and then get the subdivision right.
+
   return TRUE;
 }
