From d6a6dad15514c87c8dab1d0da9b826c22c6cdfbc Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Thu, 21 Nov 2024 13:51:21 +0100 Subject: [PATCH] clamp value for load sampler --- src/snake/core/sampling/samplers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/snake/core/sampling/samplers.py b/src/snake/core/sampling/samplers.py index 6665516..4257579 100644 --- a/src/snake/core/sampling/samplers.py +++ b/src/snake/core/sampling/samplers.py @@ -213,7 +213,8 @@ class LoadTrajectorySampler(NonCartesianAcquisitionSampler): def _single_frame(self, sim_conf: SimConfig) -> NDArray: """Load the trajectory.""" data = read_trajectory(self.path, raster_time=self.raster_time)[0] - data /= 0.5 * data.max() + data = np.minimum(data, 0.5) + data = np.maximum(data, -0.5) return data