Index: /trunk/psLib/src/fits/psFits.c
===================================================================
--- /trunk/psLib/src/fits/psFits.c	(revision 14876)
+++ /trunk/psLib/src/fits/psFits.c	(revision 14877)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-09-18 02:33:48 $
+ *  @version $Revision: 1.70 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-09-18 02:56:36 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -182,4 +182,30 @@
 }
 
+static void psFitsOptionsFree(psFitsOptions *opt)
+{
+    psFree(opt->tilesize);
+}
+
+psFitsOptions* psFitsOptionsAlloc(
+    psFitsCompressionType type,         ///< type of compression
+    psVector *tilesize,                 ///< vector defining compression tile size
+    int noisebits,                      ///< noise bits
+    int scale,                          ///< hcompress scale
+    int smooth                          ///< hcompress smothing
+)
+{
+    psFitsOptions *opt = psAlloc(sizeof(psFitsOptions));
+
+    opt->type = type;
+    opt->tilesize = tilesize;
+    opt->noisebits = noisebits;
+    opt->scale = scale;
+    opt->smooth = smooth;
+
+    psMemSetDeallocator(opt, (psFreeFunc) psFitsOptionsFree);
+
+    return opt;
+}
+
 bool psMemCheckFits(psPtr ptr)
 {
@@ -656,4 +682,19 @@
 
 
+bool psFitsSetOptions(
+    psFits* fits,                       ///< psFits object to close
+    psFitsOptions *opt                  ///< options object
+)
+{
+    return psFitsSetCompression(
+            fits,
+            opt->type,
+            opt->tilesize,
+            opt->noisebits,
+            opt->scale,
+            opt->smooth);
+}
+
+
 psDataType p_psFitsTypeFromCfitsio(int datatype)
 {
Index: /trunk/psLib/src/fits/psFits.h
===================================================================
--- /trunk/psLib/src/fits/psFits.h	(revision 14876)
+++ /trunk/psLib/src/fits/psFits.h	(revision 14877)
@@ -4,6 +4,6 @@
  * @author Robert DeSonia, MHPCC
  *
- * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-09-17 23:01:00 $
+ * @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-09-18 02:56:36 $
  * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
  */
@@ -56,4 +56,15 @@
 }
 psFits;
+
+/** FITS options object. */
+typedef struct
+{
+    psFitsCompressionType type;         ///< type of compression
+    psVector *tilesize;                 ///< vector defining compression tile size
+    int noisebits;                      ///< noise bits
+    int scale;                          ///< hcompress scale
+    int smooth;                         ///< hcompress smothing
+}
+psFitsOptions;
 
 /** Opens a FITS file and allocates the associated psFits object.
@@ -73,4 +84,16 @@
 );
 
+/** Creates a new FITS options struct 
+ *
+ *  @return psFitsOptions or NULL on failure
+ */
+psFitsOptions* psFitsOptionsAlloc(
+    psFitsCompressionType type,         ///< type of compression
+    psVector *tilesize,                 ///< vector defining compression tile size
+    int noisebits,                      ///< noise bits
+    int scale,                          ///< hcompress scale
+    int smooth                          ///< hcompress smothing
+);
+
 /** Closes a FITS file.
  *
@@ -96,4 +119,13 @@
 );
 
+/** Sets FITS write options
+ *
+ *  @return bool      TRUE if successfully configured, otherwise FALSE
+ */
+bool psFitsSetOptions(
+    psFits* fits,                       ///< psFits object to close
+    psFitsOptions *opt                  ///< options object
+);
+
 /** Checks the type of a particular pointer.
  *
