diff --git a/python/thunder/regression/regression.py b/python/thunder/regression/regression.py
index <HASH>..<HASH> 100755
--- a/python/thunder/regression/regression.py
+++ b/python/thunder/regression/regression.py
@@ -25,7 +25,7 @@ if not os.path.exists(outputDir) : os.makedirs(outputDir)
 
 # parse data
 lines = sc.textFile(dataFile)
-data = parse(lines, "dff").cache()
+data = parse(lines, "sub").cache()
 
 # create model
 model = regressionModel(modelFile,mode)
diff --git a/python/thunder/util/dataio.py b/python/thunder/util/dataio.py
index <HASH>..<HASH> 100644
--- a/python/thunder/util/dataio.py
+++ b/python/thunder/util/dataio.py
@@ -13,6 +13,8 @@ def parse(data, filter="raw", inds=None) :
 		if filter == "dff" : # convert to dff
 			meanVal = mean(ts)
 			ts = (ts - meanVal) / (meanVal + 0.1)
+		if filter == "sub" : # convert to dff
+			ts = (ts - mean(ts))
 		if inds is not None :
 			if inds == "xyz" :
 				return ((int(vec[0]),int(vec[1]),int(vec[2])),ts)
Added option for mean subtraction preprocessing