@@ -2711,7 +2711,7 @@ def bloch_with_symmetry(cls, val, values):
2711
2711
2712
2712
@pydantic .validator ("boundary_spec" , always = True )
2713
2713
@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 ):
2715
2715
"""Error if there are plane wave sources incompatible with boundary conditions."""
2716
2716
boundaries = val .to_list
2717
2717
sources = values .get ("sources" )
@@ -2722,7 +2722,7 @@ def plane_wave_boundaries(cls, val, values, transpose: bool = False):
2722
2722
if not isinstance (source , PlaneWave ):
2723
2723
continue
2724
2724
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 )
2726
2726
medium_set = Scene .intersecting_media (source , structures )
2727
2727
medium = medium_set .pop () if medium_set else sim_medium
2728
2728
@@ -2765,7 +2765,7 @@ def plane_wave_boundaries(cls, val, values, transpose: bool = False):
2765
2765
2766
2766
@pydantic .validator ("monitors" , always = True )
2767
2767
@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 ):
2769
2769
"""Error if there are diffraction monitors incompatible with boundary conditions."""
2770
2770
2771
2771
monitors = val
@@ -2782,7 +2782,7 @@ def bloch_boundaries_diff_mnt(cls, val, values, transpose: bool = False):
2782
2782
if not isinstance (source , PlaneWave ):
2783
2783
continue
2784
2784
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 )
2786
2786
medium_set = Scene .intersecting_media (source , structures )
2787
2787
medium = medium_set .pop () if medium_set else sim_medium
2788
2788
@@ -2805,7 +2805,7 @@ def bloch_boundaries_diff_mnt(cls, val, values, transpose: bool = False):
2805
2805
2806
2806
@pydantic .validator ("boundary_spec" , always = True )
2807
2807
@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 ):
2809
2809
"""Error if the boundary conditions are incompatible with TFSF sources, if any."""
2810
2810
boundaries = val .to_list
2811
2811
sources = values .get ("sources" )
@@ -2821,7 +2821,7 @@ def tfsf_boundaries(cls, val, values, transpose: bool = False):
2821
2821
if not isinstance (source , TFSF ):
2822
2822
continue
2823
2823
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 )
2825
2825
src_bounds = source .bounds
2826
2826
2827
2827
# 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):
3159
3159
3160
3160
@pydantic .validator ("monitors" , always = True )
3161
3161
@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 ):
3163
3163
"""If any :class:`.DiffractionMonitor` exists, ensure boundary conditions in the
3164
3164
transverse directions are periodic or Bloch."""
3165
3165
monitors = val
3166
3166
boundary_spec = values .get ("boundary_spec" )
3167
3167
for monitor in monitors :
3168
3168
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 )
3170
3170
boundaries = [
3171
3171
boundary_spec [n_x ].plus ,
3172
3172
boundary_spec [n_x ].minus ,
@@ -3230,7 +3230,7 @@ def _projection_monitors_homogeneous(cls, val, values):
3230
3230
return val
3231
3231
3232
3232
@pydantic .validator ("monitors" , always = True )
3233
- def _projection_direction (cls , val , values , transpose : bool = False ):
3233
+ def _projection_direction (cls , val , values ):
3234
3234
"""Warn if field projection observation points are behind surface projection monitors."""
3235
3235
# This validator is in simulation.py rather than monitor.py because volume monitors are
3236
3236
# 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):
3268
3268
x , y , z = Geometry .sph_2_car (r = monitor .proj_distance , theta = theta , phi = phi )
3269
3269
else :
3270
3270
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
3272
3272
)
3273
3273
x , y , z = pts
3274
3274
0 commit comments