File tree Expand file tree Collapse file tree 3 files changed +7
-17
lines changed Expand file tree Collapse file tree 3 files changed +7
-17
lines changed Original file line number Diff line number Diff line change 9
9
from tidy3d .plugins .smatrix .component_modelers .modal import ComponentModeler
10
10
from tidy3d .plugins .smatrix .ports .types import PortReferenceType
11
11
12
-
13
- class PortSimulationData (Tidy3dBaseModel ): # TODO Debate typing.TypedDict instead, I prefer
14
- """Stores raw simulation data from each microwave port-specific simulation."""
15
-
16
- data : dict [PortReferenceType , SimulationData ] = pd .Field (
17
- ...,
18
- title = "Port Simulation Data" ,
19
- description = "A dictionary mapping each port TerminalPortType to its corresponding raw SimulationData object. "
20
- "This contains the raw field and mode data from the individual simulations "
21
- "run for each port to compute the S-parameters." ,
22
- )
12
+ PortSimulationMap = dict [PortReferenceType , SimulationData ] # TODO debate if class
23
13
24
14
25
15
class ComponentModelerData (Tidy3dBaseModel ):
@@ -30,7 +20,7 @@ class ComponentModelerData(Tidy3dBaseModel):
30
20
"and from which this data was generated." ,
31
21
)
32
22
33
- data : PortSimulationData = pd .Field (
23
+ data : PortSimulationMap = pd .Field (
34
24
...,
35
25
title = "ComponentModeler" ,
36
26
description = "The original :class:`ComponentModeler` object that defines the simulation setup "
Original file line number Diff line number Diff line change 15
15
from tidy3d .log import log
16
16
from tidy3d .plugins .smatrix .component_modelers .terminal import TerminalComponentModeler
17
17
from tidy3d .plugins .smatrix .data .data_array import PortDataArray , TerminalPortDataArray
18
- from tidy3d .plugins .smatrix .data .modal import PortSimulationData
18
+ from tidy3d .plugins .smatrix .data .modal import PortSimulationMap
19
19
from tidy3d .plugins .smatrix .ports .types import TerminalPortType
20
20
from tidy3d .plugins .smatrix .utils import (
21
21
ab_to_s ,
@@ -62,7 +62,7 @@ class TerminalComponentModelerData(Tidy3dBaseModel):
62
62
"and from which this data was generated." ,
63
63
)
64
64
65
- data : PortSimulationData = pd .Field (
65
+ data : PortSimulationMap = pd .Field (
66
66
...,
67
67
title = "Port-Simulation Data" ,
68
68
description = "Stores raw simulation data from each microwave port-specific simulation." ,
Original file line number Diff line number Diff line change 5
5
from tidy3d .plugins .smatrix .component_modelers .types import (
6
6
ComponentModelerType ,
7
7
)
8
- from tidy3d .plugins .smatrix .data .modal import ComponentModelerData , PortSimulationData
8
+ from tidy3d .plugins .smatrix .data .modal import ComponentModelerData , PortSimulationMap
9
9
from tidy3d .plugins .smatrix .data .terminal import TerminalComponentModelerData
10
10
from tidy3d .plugins .smatrix .data .types import ComponentModelerDataType
11
11
from tidy3d .web import Batch , BatchData
@@ -28,7 +28,7 @@ def compose_terminal_modeler_data(
28
28
port_to_sim_data_map = {
29
29
port_i : batch_data [modeler .get_task_name (port = port_i )] for port_i in modeler .ports
30
30
}
31
- port_simulation_data = PortSimulationData (data = port_to_sim_data_map )
31
+ port_simulation_data = PortSimulationMap (data = port_to_sim_data_map )
32
32
return TerminalComponentModelerData (modeler = modeler , data = port_simulation_data )
33
33
34
34
@@ -39,7 +39,7 @@ def compose_component_modeler_data(
39
39
port_to_sim_data_map = {
40
40
port_i : batch_data [modeler .get_task_name (port = port_i )] for port_i in modeler .ports
41
41
}
42
- port_simulation_data = PortSimulationData (data = port_to_sim_data_map )
42
+ port_simulation_data = PortSimulationMap (data = port_to_sim_data_map )
43
43
return ComponentModelerData (modeler = modeler , data = port_simulation_data )
44
44
45
45
You can’t perform that action at this time.
0 commit comments