From fba8556b25addc2e43eaa32db6fd894a2a77945b Mon Sep 17 00:00:00 2001 From: miili Date: Sun, 5 Nov 2023 21:01:20 +0100 Subject: [PATCH] fixing tests --- .../tracers/fast_marching/velocity_models.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lassie/tracers/fast_marching/velocity_models.py b/lassie/tracers/fast_marching/velocity_models.py index b7996a9a..e7268f05 100644 --- a/lassie/tracers/fast_marching/velocity_models.py +++ b/lassie/tracers/fast_marching/velocity_models.py @@ -51,21 +51,27 @@ class VelocityModel3D(BaseModel): def model_post_init(self, __context: Any) -> None: grid_spacing = self.grid_spacing + neast = int(round(self.east_size / grid_spacing)) + 1 + nnorth = int(round(self.north_size / grid_spacing)) + 1 + ndepth = int(round(self.depth_size / grid_spacing)) + 1 - self._east_coords = np.arange( + self._east_coords = np.linspace( self.east_bounds[0], self.east_bounds[1], - grid_spacing, + neast, + endpoint=True, ) - self._north_coords = np.arange( + self._north_coords = np.linspace( self.north_bounds[0], self.north_bounds[1], - grid_spacing, + nnorth, + endpoint=True, ) - self._depth_coords = np.arange( + self._depth_coords = np.linspace( self.depth_bounds[0], self.depth_bounds[1], - grid_spacing, + ndepth, + endpoint=True, ) self._velocity_model = np.zeros(