@@ -285,24 +285,30 @@ def make_port(center, direction, type, name) -> Union[CoaxialLumpedPort, WavePor
285285 voltage_center [0 ] += mean_radius
286286 voltage_size = [Router - Rinner , 0 , 0 ]
287287
288- voltage_integral = None
288+ voltage_spec = None
289289 if use_voltage :
290- voltage_integral = td .AxisAlignedVoltageIntegral (
290+ voltage_spec = td .AxisAlignedVoltageIntegralSpec (
291291 center = voltage_center ,
292292 size = voltage_size ,
293293 extrapolate_to_endpoints = True ,
294294 snap_path_to_grid = True ,
295295 sign = "+" ,
296296 )
297- current_integral = None
297+ current_spec = None
298298 if use_current :
299- current_integral = td .Custom2DCurrentIntegral .from_circular_path (
299+ current_spec = td .Custom2DCurrentIntegralSpec .from_circular_path (
300300 center = center ,
301301 radius = mean_radius ,
302302 num_points = 41 ,
303303 normal_axis = 2 ,
304304 clockwise = direction != "+" ,
305305 )
306+ mw_mode_spec = td .MicrowaveModeSpec (
307+ num_modes = 1 ,
308+ impedance_specs = (
309+ td .CustomImpedanceSpec (voltage_spec = voltage_spec , current_spec = current_spec ),
310+ ),
311+ )
306312 port_cells = None
307313 if port_refinement :
308314 port_cells = 5
@@ -311,10 +317,7 @@ def make_port(center, direction, type, name) -> Union[CoaxialLumpedPort, WavePor
311317 size = [2 * Router , 2 * Router , 0 ],
312318 direction = direction ,
313319 name = "wave" + name ,
314- mode_spec = td .ModeSpec (num_modes = 1 ),
315- mode_index = 0 ,
316- voltage_integral = voltage_integral ,
317- current_integral = current_integral ,
320+ mode_spec = mw_mode_spec ,
318321 num_grid_cells = port_cells ,
319322 )
320323 return port
0 commit comments