Index: trunk/psModules/src/camera/pmFPAWrite.h
===================================================================
--- trunk/psModules/src/camera/pmFPAWrite.h	(revision 9983)
+++ trunk/psModules/src/camera/pmFPAWrite.h	(revision 10081)
@@ -7,6 +7,6 @@
 /// @author Paul Price, IfA
 ///
-/// @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
-/// @date $Date: 2006-11-15 00:40:02 $
+/// @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+/// @date $Date: 2006-11-18 23:43:28 $
 ///
 /// Copyright 2005-2006 Institute for Astronomy, University of Hawaii
@@ -69,28 +69,82 @@
 /// Write a cell mask to a FITS file
 ///
-/// Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU pixels if required.  Writes the concepts to the various
-/// locations, and then the HDU mask to the FITS file.
+/// Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU mask pixels if required.  A blank (i.e., image-less
+/// header) is written only if specifically requested.  Writes the concepts to the various locations, and then
+/// the HDU mask to the FITS file.  This function should be called at the beginning of the output cell loop
+/// with blank=true in order to produce the correct file structure.
 bool pmCellWriteMask(pmCell *cell,      ///<  Cell to write
                      psFits *fits,      ///<  FITS file to which to write
-                     psDB *db           ///<  Database handle for "concepts" update
+                     psDB *db,          ///<  Database handle for "concepts" update
+                     bool blank         ///<  Write a blank PHU?
                     );
 
 /// Write a chip mask to a FITS file
 ///
-/// Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU pixels if required.  Writes the concepts to the various
-/// locations, and then the HDU mask to the FITS file.
+/// Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU mask pixels if required.  A blank (i.e., image-less
+/// header) is written only if specifically requested.  Writes the concepts to the various locations, and then
+/// the HDU mask to the FITS file, optionally recursing to lower levels.  This function should be called at
+/// the beginning of the output chip loop with blank=true and recurse=false in order to produce the correct
+/// file structure.
 bool pmChipWriteMask(pmChip *chip,      ///<  Chip to write
                      psFits *fits,      ///<  FITS file to which to write
-                     psDB *db           ///<  Database handle for "concepts" update
+                     psDB *db,          ///<  Database handle for "concepts" update
+                     bool blank,        ///<  Write a blank PHU?
+                     bool recurse       ///<  Recurse to lower levels?
                     );
 
 /// Write an FPA mask to a FITS file
 ///
-/// Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU pixels if required.  Writes the concepts to the various
-/// locations, and then the HDU mask to the FITS file.
+/// Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU mask pixels if required.  A blank (i.e., image-less
+/// header) is written only if specifically requested.  Writes the concepts to the various locations, and then
+/// the HDU mask to the FITS file, optionally recursing to lower levels.  This function should be called at
+/// the beginning of the output FPA loop with blank=true and recurse=false in order to produce the correct
+/// file structure.
 bool pmFPAWriteMask(pmFPA *fpa,         ///<  FPA to write
                     psFits *fits,       ///<  FITS file to which to write
-                    psDB *db            ///<  Database handle for "concepts" update
+                    psDB *db,           ///<  Database handle for "concepts" update
+                    bool blank,         ///<  Write a blank PHU?
+                    bool recurse        ///<  Recurse to lower levels?
                    );
+
+/// Write a cell weight to a FITS file
+///
+/// Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU weight pixels if required.  A blank (i.e., image-less
+/// header) is written only if specifically requested.  Writes the concepts to the various locations, and then
+/// the HDU weight to the FITS file.  This function should be called at the beginning of the output cell loop
+/// with blank=true in order to produce the correct file structure.
+bool pmCellWriteWeight(pmCell *cell,    ///<  Cell to write
+                       psFits *fits,    ///<  FITS file to which to write
+                       psDB *db,        ///<  Database handle for "concepts" update
+                       bool blank       ///<  Write a blank PHU?
+                      );
+
+/// Write a chip weight to a FITS file
+///
+/// Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU weight pixels if required.  A blank (i.e., image-less
+/// header) is written only if specifically requested.  Writes the concepts to the various locations, and then
+/// the HDU weight to the FITS file, optionally recursing to lower levels.  This function should be called at
+/// the beginning of the output chip loop with blank=true and recurse=false in order to produce the correct
+/// file structure.
+bool pmChipWriteWeight(pmChip *chip,    ///<  Chip to write
+                       psFits *fits,    ///<  FITS file to which to write
+                       psDB *db,        ///<  Database handle for "concepts" update
+                       bool blank,      ///<  Write a blank PHU?
+                       bool recurse     ///<  Recurse to lower levels?
+                      );
+
+/// Write an FPA weight to a FITS file
+///
+/// Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU weight pixels if required.  A blank (i.e., image-less
+/// header) is written only if specifically requested.  Writes the concepts to the various locations, and then
+/// the HDU weight to the FITS file, optionally recursing to lower levels.  This function should be called at
+/// the beginning of the output FPA loop with blank=true and recurse=false in order to produce the correct
+/// file structure.
+bool pmFPAWriteWeight(pmFPA *fpa,       ///<  FPA to write
+                      psFits *fits,     ///<  FITS file to which to write
+                      psDB *db,         ///<  Database handle for "concepts" update
+                      bool blank,       ///<  Write a blank PHU?
+                      bool recurse      ///<  Recurse to lower levels?
+                     );
+
 
 /// Write a FITS table from the cell's analysis metadata.
