diff --git a/pes_to_spec/model.py b/pes_to_spec/model.py
index 8291089ef3ff0b9ef42d38b945df470d107ee41a..f488c27aeba56eb823ede137cb01cb814777e070 100644
--- a/pes_to_spec/model.py
+++ b/pes_to_spec/model.py
@@ -314,7 +314,7 @@ class SelectRelevantLowResolution(TransformerMixin, BaseEstimator):
                    if channel in self.channels}
             # pad it with zeros, if we reach the edge of the array
             for channel in y.keys():
-                y[channel] = [np.pad(y[channel][j], (0, 2*delta_tof - len(y[channel][j])))
+                y[channel] = [np.pad(y[channel][j], (0, 2*self.delta_tof - len(y[channel][j])))
                               for j in range(len(y[channel]))]
                 y[channel] = np.stack(y[channel], axis=1)
         if not keep_dictionary_structure: