diff --git a/wetb/prepost/statsdel.py b/wetb/prepost/statsdel.py
new file mode 100644
index 0000000000000000000000000000000000000000..d2f3d49cf628288fa09db9084d8d27b8126e56dd
--- /dev/null
+++ b/wetb/prepost/statsdel.py
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Thu Jul 21 15:13:38 2016
+
+@author: dave
+"""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+from __future__ import absolute_import
+#from builtins import dict
+#from io import open
+#from builtins import zip
+#from builtins import range
+#from builtins import str
+#from builtins import int
+from future import standard_library
+standard_library.install_aliases()
+
+import os
+
+from wetb.prepost import windIO
+
+
+def calc(fpath, no_bins=46, m=[3, 4, 6, 8, 10, 12], neq=None, i0=0, i1=None,
+         ftype=False, fsave=False):
+    """
+    Should we load m, statchans, delchans from another file? This function
+    will be called from a PBS script.
+    """
+
+    if fpath[-4:] == '.sel' or fpath[-4:] == '.dat':
+        fpath = fpath[-4:]
+
+    fdir = os.path.dirname(fpath)
+    fname = os.path.basename(fpath)
+
+    res = windIO.LoadResults(fdir, fname, debug=False, usecols=None,
+                             readdata=True)
+    statsdel = res.statsdel_df(i0=i0, i1=i1, statchans='all', neq=neq,
+                               no_bins=no_bins, m=m, delchans='all')
+
+    if fsave:
+        if fsave[-4:] == '.csv':
+            statsdel.to_csv(fsave)
+        elif fsave[-3:] == '.h5':
+            statsdel.to_hdf(fsave, 'table', complib='zlib', complevel=9)
+    elif ftype == '.csv':
+        statsdel.to_csv(fpath+ftype)
+    elif ftype == '.h5':
+        statsdel.to_hdf(fpath+ftype, 'table', complib='zlib', complevel=9)
+
+
+if __name__ == '__main__':
+    pass