@@ -202,11 +202,11 @@ def make_mw_sim(
202202 )
203203 size_port = [0 , sim_width , size_sim [2 ]]
204204 center_port = [0 , 0 , center_sim [2 ]]
205- impedance_spec = (td .AutoImpedanceSpec (),) * 4
205+ impedance_specs = (td .AutoImpedanceSpec (),) * 4
206206 mode_spec = td .ModeSpec (
207207 num_modes = 4 ,
208208 target_neff = 1.8 ,
209- microwave_mode_spec = td .MicrowaveModeSpec (impedance_spec = impedance_spec ),
209+ microwave_mode_spec = td .MicrowaveModeSpec (impedance_specs = impedance_specs ),
210210 )
211211
212212 mode_monitor = td .ModeMonitor (
@@ -476,7 +476,7 @@ def test_impedance_spec_validation():
476476 with pytest .raises (pd .ValidationError ):
477477 _ = td .CustomImpedanceSpec (voltage_spec = None , current_spec = None )
478478
479- _ = td .MicrowaveModeSpec (impedance_spec = (both , voltage_only , current_only , None ))
479+ _ = td .MicrowaveModeSpec (impedance_specs = (both , voltage_only , current_only , None ))
480480
481481
482482def test_path_integral_factory_voltage_validation ():
@@ -565,7 +565,7 @@ def test_make_path_integrals_validation():
565565 voltage_spec = v_spec ,
566566 current_spec = i_spec ,
567567 )
568- microwave_mode_spec = td .MicrowaveModeSpec (impedance_spec = (impedance_spec ,))
568+ microwave_mode_spec = td .MicrowaveModeSpec (impedance_specs = (impedance_spec ,))
569569
570570 # Test successful creation
571571 voltage_integrals , current_integrals = make_path_integrals (microwave_mode_spec , mode_monitor )
@@ -576,7 +576,7 @@ def test_make_path_integrals_validation():
576576
577577 # Test with None specs - when both are None, use_automatic_setup is True
578578 # This means current integrals will be auto-generated, not None
579- microwave_mode_spec_none = td .MicrowaveModeSpec (impedance_spec = (None ,))
579+ microwave_mode_spec_none = td .MicrowaveModeSpec (impedance_specs = (None ,))
580580 voltage_integrals , current_integrals = make_path_integrals (
581581 microwave_mode_spec_none , mode_monitor
582582 )
@@ -596,7 +596,7 @@ def test_make_path_integrals_construction_errors(monkeypatch):
596596 v_spec = td .VoltageIntegralAxisAlignedSpec (center = (1 , 2 , 3 ), size = (0 , 0 , 1 ), sign = "-" )
597597
598598 impedance_spec = td .CustomImpedanceSpec (voltage_spec = v_spec , current_spec = None )
599- microwave_mode_spec = td .MicrowaveModeSpec (impedance_spec = (impedance_spec ,))
599+ microwave_mode_spec = td .MicrowaveModeSpec (impedance_specs = (impedance_spec ,))
600600
601601 # Mock make_voltage_integral to raise an exception
602602 def mock_make_voltage_integral (path_spec ):
@@ -663,7 +663,7 @@ def test_path_integral_factory_mixed_specs():
663663 impedance_spec1 = td .CustomImpedanceSpec (voltage_spec = v_spec , current_spec = None )
664664 impedance_spec2 = td .CustomImpedanceSpec (voltage_spec = None , current_spec = i_spec )
665665 microwave_mode_spec = td .MicrowaveModeSpec (
666- impedance_spec = (
666+ impedance_specs = (
667667 impedance_spec1 ,
668668 impedance_spec2 ,
669669 )
@@ -685,14 +685,6 @@ def test_mode_solver_with_microwave_mode_spec():
685685 height = 0.5 * mm
686686 metal_thickness = 0.1 * mm
687687
688- def analytical_stripline_impedance (er , width , height , thickness ):
689- assert width > 0.35 * height
690- term1 = 1 - thickness / height
691- Cf = 2 / np .pi * np .log (1 / term1 + 1 )
692- if thickness > 0 :
693- Cf -= thickness / np .pi / height * np .log (1 / term1 ** 2 - 1 )
694- return 30 * np .pi / np .sqrt (er ) * (term1 ) / (width / height + Cf )
695-
696688 stripline_sim = make_mw_sim (
697689 transmission_line_type = "stripline" ,
698690 width = width ,
@@ -704,11 +696,11 @@ def analytical_stripline_impedance(er, width, height, thickness):
704696
705697 plane = td .Box (center = (0 , 0 , 0 ), size = (0 , 10 * width , 2 * height + metal_thickness ))
706698 num_modes = 3
707- impedance_spec = (td .AutoImpedanceSpec (), None , None )
699+ impedance_specs = (td .AutoImpedanceSpec (), None , None )
708700 mode_spec = td .ModeSpec (
709701 num_modes = num_modes ,
710702 target_neff = 2.2 ,
711- microwave_mode_spec = td .MicrowaveModeSpec (impedance_spec = impedance_spec ),
703+ microwave_mode_spec = td .MicrowaveModeSpec (impedance_specs = impedance_specs ),
712704 )
713705 mms = ModeSolver (
714706 simulation = stripline_sim ,
@@ -735,8 +727,8 @@ def analytical_stripline_impedance(er, width, height, thickness):
735727 size = (0 , width + dl , metal_thickness + dl ), sign = "+"
736728 ),
737729 )
738- impedance_spec = (custom_spec , None , None )
739- mms = mms .updated_copy (path = "mode_spec/microwave_mode_spec/" , impedance_spec = impedance_spec )
730+ impedance_specs = (custom_spec , None , None )
731+ mms = mms .updated_copy (path = "mode_spec/microwave_mode_spec/" , impedance_specs = impedance_specs )
740732 mms_data : ModeSolverData = mms .data
741733
742734 # _, ax = plt.subplots(1, 1, tight_layout=True, figsize=(15, 15))
0 commit comments