Skip to content

Commit

Permalink
correcting plane positioning when ploting
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipeFcp committed Sep 20, 2024
1 parent b068ed8 commit c5e4133
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tidy3d/plugins/mode/mode_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,18 +1472,18 @@ def _center_and_lims(self) -> Tuple[List, List, List, List]:
_, (h_min_s, v_min_s) = Box.pop_axis(self.simulation.bounds[0], axis=n_axis)
_, (h_max_s, v_max_s) = Box.pop_axis(self.simulation.bounds[1], axis=n_axis)

h_min = a_center[n_axis] - self.plane.size[t_axes[0]] / 2
h_max = a_center[n_axis] + self.plane.size[t_axes[0]] / 2
v_min = a_center[n_axis] - self.plane.size[t_axes[1]] / 2
v_max = a_center[n_axis] + self.plane.size[t_axes[1]] / 2
h_min = self.plane.center[t_axes[0]] - self.plane.size[t_axes[0]] / 2
h_max = self.plane.center[t_axes[0]] + self.plane.size[t_axes[0]] / 2
v_min = self.plane.center[t_axes[1]] - self.plane.size[t_axes[1]] / 2
v_max = self.plane.center[t_axes[1]] + self.plane.size[t_axes[1]] / 2

h_lim = [
h_min if abs(h_min) < abs(h_min_s) else h_min_s,
h_max if abs(h_max) < abs(h_max_s) else h_max_s,
h_min if h_min > h_min_s else h_min_s,
h_max if h_max < h_max_s else h_max_s,
]
v_lim = [
v_min if abs(v_min) < abs(v_min_s) else v_min_s,
v_max if abs(v_max) < abs(v_max_s) else v_max_s,
v_min if v_min > v_min_s else v_min_s,
v_max if v_max < v_max_s else v_max_s,
]

return a_center, h_lim, v_lim, t_axes
Expand Down

0 comments on commit c5e4133

Please sign in to comment.