Index: /trunk/psModules/src/detrend/pmShutterCorrection.h
===================================================================
--- /trunk/psModules/src/detrend/pmShutterCorrection.h	(revision 17993)
+++ /trunk/psModules/src/detrend/pmShutterCorrection.h	(revision 17994)
@@ -5,6 +5,6 @@
  * @author Paul Price, IfA
  *
- * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- * @date $Date: 2008-03-29 03:10:17 $
+ * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2008-06-09 00:39:37 $
  * Copyright 2006 Institute for Astronomy, University of Hawaii
  */
@@ -16,17 +16,15 @@
 /// @{
 
-/*  A mechanical shutter may not yield uniform exposure times as a function of
- *  position on the detector.  The typical error consists of a constant
- *  exposure-time offset relative to the requested value, ie exposure time is
- *  T_o + dT(x,y).  The exposure error, dT, may be measured with the following
- *  scheme.  Obtain a set of exposures with different exposures times taken of
- *  the same flat-field source; the source must be spatially stable between the
- *  exposures, but need not have a stable amplitude.  For an illuminating flux
- *  of intensity F(x,y) = F_o f(x,y), the signal recorded by any pixel in the
- *  detector is given by: S(t,x,y) = F_o(t) f(x,y) (T_o + dT(x,y)) where F_o is
- *  the F_o(t) is the (variable) overall intensity of the illuminating source
- *  and f(x,y) is the spatial illumination patter times the flat-field response.
- *  Choose a reference location in the image (eg, the detector center) and
- *  divide by the value of that region (ie, mean or median):
+/*  A mechanical shutter may not yield uniform exposure times as a function of position on the
+ *  detector.  The typical error consists of a constant exposure-time offset relative to the
+ *  requested value, ie exposure time is T_o + dT(x,y).  The exposure error, dT, may be
+ *  measured with the following scheme.  Obtain a set of exposures with different exposures
+ *  times taken of the same flat-field source; the source must be spatially stable between the
+ *  exposures, but need not have a stable amplitude.  For an illuminating flux of intensity
+ *  F(x,y) = F_o f(x,y), the signal recorded by any pixel in the detector is given by: S(t,x,y)
+ *  = F_o(t) f(x,y) (T_o + dT(x,y)) where F_o(t) is the (variable) overall intensity of the
+ *  illuminating source and f(x,y) is the spatial illumination pattern times the flat-field
+ *  response.  Choose a reference location in the image (eg, the detector center) and divide by
+ *  the value of that region (ie, mean or median):
  *
  *  s(t,x,y) = S(t,x,y) / S(t,0,0)
@@ -34,8 +32,8 @@
  *  s(t,x,y) = f(x,y) (T_o + dT(x,y)) / f(0,0) (T_o + dT(0,0))
  *
- *  we can absorb the term f(0,0) into f(x,y) as we have no motivation for the
- *  scale of f(x,y).  For any single pixel, over the set of exposures, we thus
- *  need to solve for dT(x,y), dT(0,0), and f'(x,y) in the equation:
- *  s(t,x,y) = f'(x,y) (T_o + dT(x,y)) / (T_o + dT(0,0))
+ *  we can absorb the term f(0,0) into f(x,y) as we have no motivation for the scale of f(x,y)
+ *  -- a normalization for the flat-field is not specified here.  For any single pixel, over
+ *  the set of exposures, we thus need to solve for dT(x,y), dT(0,0), and f'(x,y) in the
+ *  equation: s(t,x,y) = f'(x,y) (T_o + dT(x,y)) / (T_o + dT(0,0))
  *
  *  we avoid directly fitting these values as the process would be a non-linear
@@ -62,9 +60,10 @@
 /// Shutter correction parameters, applicable for a single pixel
 typedef struct {
-    double scale;                       ///< The normalisation for an exposure, A(k)
+    double scale;                       ///< The normalisation for an exposure, A(k) or f'(x,y) 
     double offset;                      ///< The time offset, dTk
     double offref;                      ///< The reference time offset, dTo
     int num;                            ///< Number of points used
     float stdev;                        ///< Standard deviation
+    bool valid;				// is the fitted shutter correction valid (produce a significant improvement?)
 } pmShutterCorrection;
 
@@ -173,5 +172,5 @@
 /// Calculate the reference shutter time from the correction data
 float pmShutterCorrectionReference(
-    const pmShutterCorrectionData *data ///< Correction data
+    pmShutterCorrectionData *data ///< Correction data
     );
 
