diff --git a/dataset/dataset.py b/dataset/dataset.py
index 551d448dbfedd2241e0a116560492ee50a56dffb..d64c917759b6c963c6d15139a7f86d1eae02c85a 100644
--- a/dataset/dataset.py
+++ b/dataset/dataset.py
@@ -11,7 +11,7 @@ class Threshold_noise:
         self.threshold = threshold
 
     def __call__(self, x):
-        return torch.clamp(x, min=self.threshold)
+        return torch.where((x <= self.threshold), torch.tensor(0.))
 
 class Log_normalisation:
     """Log normalisation of intensities"""