Index: /trunk/Ohana/src/libfits/matrix/F_compress_M.c
===================================================================
--- /trunk/Ohana/src/libfits/matrix/F_compress_M.c	(revision 16969)
+++ /trunk/Ohana/src/libfits/matrix/F_compress_M.c	(revision 16970)
@@ -2,14 +2,4 @@
 # include <gfitsio.h>
 # include <zlib.h>
-
-# define MOD_KEYWORD(NAME,ZNAME,TYPE,IN,OUT) { \
-  gfits_scan (header, ZNAME, TYPE, 1, IN); \
-  gfits_delete (header, ZNAME, 1); \
-  gfits_print (header, NAME, TYPE, 1, OUT); }
-
-# define MOD_KEYWORD_REQUIRED(ZNAME,NAME,TYPE,IN,OUT) { \
-  if (!gfits_scan (header, ZNAME, TYPE, 1, IN)) ESCAPE; \
-  gfits_delete (header, ZNAME, 1); \
-  gfits_print (header, NAME, TYPE, 1, OUT); }
 
 # define ESCAPE { \
@@ -28,4 +18,14 @@
   return (FALSE); }
 
+# define MOD_KEYWORD(NAME,ZNAME,TYPE,IN,OUT) { \
+  gfits_scan (header, ZNAME, TYPE, 1, IN); \
+  gfits_delete (header, ZNAME, 1); \
+  gfits_print (header, NAME, TYPE, 1, OUT); }
+
+# define MOD_KEYWORD_REQUIRED(ZNAME,NAME,TYPE,IN,OUT) { \
+  if (!gfits_scan (header, ZNAME, TYPE, 1, IN)) ESCAPE; \
+  gfits_delete (header, ZNAME, 1); \
+  gfits_print (header, NAME, TYPE, 1, OUT); }
+
 int gfits_uncompress_image (Header *header, Matrix *matrix, FTable *ftable) {
 
@@ -69,5 +69,7 @@
   }    
 
-  // set up the tile sizes
+  // set up the tile sizes : ztile is the default size of the tile in the Nth dimension
+  // the actual tile size may be smaller at the edge of a dimension.  if the ZTILEn
+  // entries are not found, default to [Nx,1,1,...]
   ALLOCATE (ztile, int, header->Naxes);
   if (!gfits_scan (header, "ZTILE1", "%d", 1, &ztile[0])) {
@@ -84,5 +86,6 @@
   }
 
-  // search for algorithm-specific keywords
+  // search for algorithm-specific keywords. these are used to control compression options
+  // note the difference between the keywords (1 indexed) and the variables (0 indexed)
   NOPTIONS = 10;
   ALLOCATE (optname, char *, NOPTIONS);
@@ -106,5 +109,4 @@
   }
 
-  // XXX is Noptions set to the correct value?
   // XXX get ZMASKCMP 
   int zsimple, have_zsimple;
@@ -245,9 +247,9 @@
 // and output pixel data.....
 
+// true sizes of this tile (in pixels)
 int gfits_tile_size (Matrix *matrix, int *otile, int *ztile) {
 
   int i, Npixels, Ndimen;
 
-  // true sizes of this tile (in pixels)
   Npixels = 1;
   for (i = 0; i < matrix->Naxes; i++) {
