Skip to content

Commit

Permalink
clamp value for load sampler
Browse files Browse the repository at this point in the history
  • Loading branch information
paquiteau committed Nov 21, 2024
1 parent 8d9be7f commit d6a6dad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/snake/core/sampling/samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit d6a6dad

Please sign in to comment.