Skip to content

Commit c6cccd1

Browse files
committed
removed "transpose" argument from some validator functions. (oops. that was an accident.)
1 parent fd54334 commit c6cccd1

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

tidy3d/components/base_sim/simulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def plot_symmetries(
436436
matplotlib.axes._subplots.Axes
437437
The supplied or created matplotlib axes.
438438
"""
439-
9
439+
440440
normal_axis, _ = Box.parse_xyz_kwargs(x=x, y=y, z=z)
441441

442442
for sym_axis, sym_value in enumerate(self.symmetry):

tidy3d/components/geometry/primitives.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def _intersections_normal(self, z: float, transpose: bool = False):
502502
if radius_offset <= 0:
503503
return []
504504

505-
_, (x0, y0) = self.pop_axis(static_self.center, axis=self.axi, transpose=transpose)
505+
_, (x0, y0) = self.pop_axis(static_self.center, axis=self.axis, transpose=transpose)
506506
return [shapely.Point(x0, y0).buffer(radius_offset, quad_segs=_N_SHAPELY_QUAD_SEGS)]
507507

508508
def _intersections_side(self, position, axis, transpose: bool = False):

tidy3d/components/scene.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ def plot_structures(
483483
shape=shape,
484484
ax=ax,
485485
fill=fill,
486-
transpose=transpose,
487486
)
488487

489488
# clean up the axis display

tidy3d/components/simulation.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2711,7 +2711,7 @@ def bloch_with_symmetry(cls, val, values):
27112711

27122712
@pydantic.validator("boundary_spec", always=True)
27132713
@skip_if_fields_missing(["medium", "size", "structures", "sources"])
2714-
def plane_wave_boundaries(cls, val, values, transpose: bool = False):
2714+
def plane_wave_boundaries(cls, val, values):
27152715
"""Error if there are plane wave sources incompatible with boundary conditions."""
27162716
boundaries = val.to_list
27172717
sources = values.get("sources")
@@ -2722,7 +2722,7 @@ def plane_wave_boundaries(cls, val, values, transpose: bool = False):
27222722
if not isinstance(source, PlaneWave):
27232723
continue
27242724

2725-
_, tan_dirs = cls.pop_axis([0, 1, 2], axis=source.injection_axis, transpose=transpose)
2725+
_, tan_dirs = cls.pop_axis([0, 1, 2], axis=source.injection_axis)
27262726
medium_set = Scene.intersecting_media(source, structures)
27272727
medium = medium_set.pop() if medium_set else sim_medium
27282728

@@ -2765,7 +2765,7 @@ def plane_wave_boundaries(cls, val, values, transpose: bool = False):
27652765

27662766
@pydantic.validator("monitors", always=True)
27672767
@skip_if_fields_missing(["boundary_spec", "medium", "size", "structures", "sources"])
2768-
def bloch_boundaries_diff_mnt(cls, val, values, transpose: bool = False):
2768+
def bloch_boundaries_diff_mnt(cls, val, values):
27692769
"""Error if there are diffraction monitors incompatible with boundary conditions."""
27702770

27712771
monitors = val
@@ -2782,7 +2782,7 @@ def bloch_boundaries_diff_mnt(cls, val, values, transpose: bool = False):
27822782
if not isinstance(source, PlaneWave):
27832783
continue
27842784

2785-
_, tan_dirs = cls.pop_axis([0, 1, 2], axis=source.injection_axis, transpose=transpose)
2785+
_, tan_dirs = cls.pop_axis([0, 1, 2], axis=source.injection_axis)
27862786
medium_set = Scene.intersecting_media(source, structures)
27872787
medium = medium_set.pop() if medium_set else sim_medium
27882788

@@ -2805,7 +2805,7 @@ def bloch_boundaries_diff_mnt(cls, val, values, transpose: bool = False):
28052805

28062806
@pydantic.validator("boundary_spec", always=True)
28072807
@skip_if_fields_missing(["medium", "center", "size", "structures", "sources"])
2808-
def tfsf_boundaries(cls, val, values, transpose: bool = False):
2808+
def tfsf_boundaries(cls, val, values):
28092809
"""Error if the boundary conditions are incompatible with TFSF sources, if any."""
28102810
boundaries = val.to_list
28112811
sources = values.get("sources")
@@ -2821,7 +2821,7 @@ def tfsf_boundaries(cls, val, values, transpose: bool = False):
28212821
if not isinstance(source, TFSF):
28222822
continue
28232823

2824-
norm_dir, tan_dirs = cls.pop_axis([0, 1, 2], axis=source.injection_axis, transpose=transpose)
2824+
norm_dir, tan_dirs = cls.pop_axis([0, 1, 2], axis=source.injection_axis)
28252825
src_bounds = source.bounds
28262826

28272827
# make a dummy source that represents the injection surface to get the intersecting
@@ -3159,14 +3159,14 @@ def _warn_monitor_simulation_frequency_range(cls, val, values):
31593159

31603160
@pydantic.validator("monitors", always=True)
31613161
@skip_if_fields_missing(["boundary_spec"])
3162-
def diffraction_monitor_boundaries(cls, val, values, transpose: bool = False):
3162+
def diffraction_monitor_boundaries(cls, val, values):
31633163
"""If any :class:`.DiffractionMonitor` exists, ensure boundary conditions in the
31643164
transverse directions are periodic or Bloch."""
31653165
monitors = val
31663166
boundary_spec = values.get("boundary_spec")
31673167
for monitor in monitors:
31683168
if isinstance(monitor, DiffractionMonitor):
3169-
_, (n_x, n_y) = monitor.pop_axis(["x", "y", "z"], axis=monitor.normal_axis, transpose=transpose)
3169+
_, (n_x, n_y) = monitor.pop_axis(["x", "y", "z"], axis=monitor.normal_axis)
31703170
boundaries = [
31713171
boundary_spec[n_x].plus,
31723172
boundary_spec[n_x].minus,
@@ -3230,7 +3230,7 @@ def _projection_monitors_homogeneous(cls, val, values):
32303230
return val
32313231

32323232
@pydantic.validator("monitors", always=True)
3233-
def _projection_direction(cls, val, values, transpose: bool = False):
3233+
def _projection_direction(cls, val, values):
32343234
"""Warn if field projection observation points are behind surface projection monitors."""
32353235
# This validator is in simulation.py rather than monitor.py because volume monitors are
32363236
# eventually converted to their bounding surface projection monitors, in which case we
@@ -3268,7 +3268,7 @@ def _projection_direction(cls, val, values, transpose: bool = False):
32683268
x, y, z = Geometry.sph_2_car(r=monitor.proj_distance, theta=theta, phi=phi)
32693269
else:
32703270
pts = monitor.unpop_axis(
3271-
monitor.proj_distance, (monitor.x, monitor.y), axis=normal_ind, transpose=transpose
3271+
monitor.proj_distance, (monitor.x, monitor.y), axis=normal_ind
32723272
)
32733273
x, y, z = pts
32743274

0 commit comments

Comments
 (0)