Index: trunk/psModules/src/detrend/pmShifts.h
===================================================================
--- trunk/psModules/src/detrend/pmShifts.h	(revision 12098)
+++ trunk/psModules/src/detrend/pmShifts.h	(revision 12191)
@@ -4,4 +4,19 @@
 #include <pslib.h>
 #include "pmFPA.h"
+
+/// Shifts due to orthogonal transfer
+typedef struct {
+    psVector *x;                        ///< Shifts in x
+    psVector *y;                        ///< Shifts in y
+    psVector *t;                        ///< Times of shifts
+    long num;                           ///< Number of values
+    bool tRelative;                     ///< Are the time values relative (durations)?
+    bool xyRelative;                    ///< Are the shift (x,y) values relative to the previous position?
+} pmShifts;
+
+/// Allocator for pmShifts
+pmShifts *pmShiftsAlloc(bool tRel,      ///< Are the time values relative (durations)?
+                        bool xyRel      ///< Are the shift (x,y) values relative to the previous position?
+                        );
 
 /// Read orthogonal transfer shifts table for a cell
@@ -14,9 +29,20 @@
 /// provided --- if we have to read the whole table, we may as well translate the whole lot.  If a kernel is
 /// already present in the cell analysis metadata, the function returns true without doing any work.
-bool pmShiftsRead(pmCell *cell,         ///< Cell for which to search for shifts
+bool pmShiftsRead(const pmCell *cell,         ///< Cell for which to search for shifts
                   psFits *fits          ///< FITS file in which to search for OT shifts extension
                   );
 
 
+/// Generate a kernel for the cell from the orthogonal transfer shifts
+///
+/// The kernel is saved in the analysis metadata
+bool pmShiftsKernel(const pmCell *cell   ///< Cell for which to generate kernel
+                    );
+
+/// Convolve a detrend with the appropriate orthogonal transfer convolution kernel from a science exposure.
+///
+/// The kernel is generated (with pmShiftsKernel) if required.  The image and mask are convolved with the
+/// kernel (specified maskVal is smeared).  The weight map is not convolved.
+bool pmShiftsConvolve(pmReadout *detrend, const pmCell *source, psMaskType maskVal)
 
 #endif
