diff --git a/DSSC.py b/DSSC.py
index 2e5aa2e343cbb3016f7df5d7e2ec149ace7bb072..22fce8d393aab5c80f74b6f1926bb7ff6c136001 100644
--- a/DSSC.py
+++ b/DSSC.py
@@ -616,9 +616,6 @@ def process_one_module(job):
         frames_per_train = m[npulse_path][()]
     trains_with_data = all_trainIds[frames_per_train == fpt]
 
-    n_trains = len(all_trainIds)
-    chunk_start = np.arange(n_trains, step=chunksize, dtype=int)
-
     len_scan = len(scan.groupby(scan))
 
     if do_pulse_mean: