Skip to content

Commit c685b6b

Browse files
committed
add validator back to simulation for incorrect auto impedance mode spec
1 parent e320a18 commit c685b6b

File tree

9 files changed

+630
-412
lines changed

9 files changed

+630
-412
lines changed

schemas/EMESimulation.json

Lines changed: 37 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -5232,6 +5232,13 @@
52325232
],
52335233
"default": false
52345234
},
5235+
"microwave_spec": {
5236+
"allOf": [
5237+
{
5238+
"$ref": "#/definitions/MicrowaveModeSpec"
5239+
}
5240+
]
5241+
},
52355242
"num_modes": {
52365243
"default": 1,
52375244
"exclusiveMinimum": 0,
@@ -7884,109 +7891,36 @@
78847891
"MicrowaveModeSpec": {
78857892
"additionalProperties": false,
78867893
"properties": {
7887-
"angle_phi": {
7888-
"default": 0.0,
7889-
"type": "number"
7890-
},
7891-
"angle_rotation": {
7892-
"default": false,
7893-
"type": "boolean"
7894-
},
7895-
"angle_theta": {
7896-
"default": 0.0,
7897-
"type": "number"
7898-
},
78997894
"attrs": {
79007895
"default": {},
79017896
"type": "object"
79027897
},
7903-
"bend_axis": {
7904-
"enum": [
7905-
0,
7906-
1
7907-
],
7908-
"type": "integer"
7909-
},
7910-
"bend_radius": {
7911-
"type": "number"
7912-
},
7913-
"filter_pol": {
7914-
"enum": [
7915-
"te",
7916-
"tm"
7917-
],
7918-
"type": "string"
7919-
},
7920-
"group_index_step": {
7898+
"impedance_specs": {
79217899
"anyOf": [
79227900
{
7923-
"exclusiveMinimum": 0,
7924-
"type": "number"
7925-
},
7926-
{
7927-
"type": "boolean"
7928-
}
7929-
],
7930-
"default": false
7931-
},
7932-
"impedance_specs": {
7933-
"items": {
7934-
"anyOf": [
7935-
{
7936-
"$ref": "#/definitions/AutoImpedanceSpec"
7901+
"items": {
7902+
"anyOf": [
7903+
{
7904+
"$ref": "#/definitions/AutoImpedanceSpec"
7905+
},
7906+
{
7907+
"$ref": "#/definitions/CustomImpedanceSpec"
7908+
}
7909+
]
79377910
},
7938-
{
7939-
"$ref": "#/definitions/CustomImpedanceSpec"
7940-
}
7941-
]
7942-
},
7943-
"type": "array"
7944-
},
7945-
"num_modes": {
7946-
"default": 1,
7947-
"exclusiveMinimum": 0,
7948-
"type": "integer"
7949-
},
7950-
"num_pml": {
7951-
"default": [
7952-
0,
7953-
0
7954-
],
7955-
"items": [
7956-
{
7957-
"minimum": 0,
7958-
"type": "integer"
7911+
"type": "array"
79597912
},
79607913
{
7961-
"minimum": 0,
7962-
"type": "integer"
7914+
"oneOf": [
7915+
{
7916+
"$ref": "#/definitions/AutoImpedanceSpec"
7917+
},
7918+
{
7919+
"$ref": "#/definitions/CustomImpedanceSpec"
7920+
}
7921+
]
79637922
}
7964-
],
7965-
"maxItems": 2,
7966-
"minItems": 2,
7967-
"type": "array"
7968-
},
7969-
"precision": {
7970-
"default": "double",
7971-
"enum": [
7972-
"auto",
7973-
"double",
7974-
"single"
7975-
],
7976-
"type": "string"
7977-
},
7978-
"target_neff": {
7979-
"exclusiveMinimum": 0,
7980-
"type": "number"
7981-
},
7982-
"track_freq": {
7983-
"default": "central",
7984-
"enum": [
7985-
"central",
7986-
"highest",
7987-
"lowest"
7988-
],
7989-
"type": "string"
7923+
]
79907924
},
79917925
"type": {
79927926
"default": "MicrowaveModeSpec",
@@ -8039,6 +7973,7 @@
80397973
"bend_radius": null,
80407974
"filter_pol": null,
80417975
"group_index_step": false,
7976+
"microwave_spec": null,
80427977
"num_modes": 1,
80437978
"num_pml": [
80447979
0,
@@ -8225,10 +8160,7 @@
82258160
"type": "array"
82268161
},
82278162
"mode_spec": {
8228-
"anyOf": [
8229-
{
8230-
"$ref": "#/definitions/MicrowaveModeSpec"
8231-
},
8163+
"allOf": [
82328164
{
82338165
"$ref": "#/definitions/ModeSpec"
82348166
}
@@ -8242,6 +8174,7 @@
82428174
"bend_radius": null,
82438175
"filter_pol": null,
82448176
"group_index_step": false,
8177+
"microwave_spec": null,
82458178
"num_modes": 1,
82468179
"num_pml": [
82478180
0,
@@ -8374,6 +8307,13 @@
83748307
],
83758308
"default": false
83768309
},
8310+
"microwave_spec": {
8311+
"allOf": [
8312+
{
8313+
"$ref": "#/definitions/MicrowaveModeSpec"
8314+
}
8315+
]
8316+
},
83778317
"num_modes": {
83788318
"default": 1,
83798319
"exclusiveMinimum": 0,

schemas/ModeSimulation.json

Lines changed: 34 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -7115,109 +7115,36 @@
71157115
"MicrowaveModeSpec": {
71167116
"additionalProperties": false,
71177117
"properties": {
7118-
"angle_phi": {
7119-
"default": 0.0,
7120-
"type": "number"
7121-
},
7122-
"angle_rotation": {
7123-
"default": false,
7124-
"type": "boolean"
7125-
},
7126-
"angle_theta": {
7127-
"default": 0.0,
7128-
"type": "number"
7129-
},
71307118
"attrs": {
71317119
"default": {},
71327120
"type": "object"
71337121
},
7134-
"bend_axis": {
7135-
"enum": [
7136-
0,
7137-
1
7138-
],
7139-
"type": "integer"
7140-
},
7141-
"bend_radius": {
7142-
"type": "number"
7143-
},
7144-
"filter_pol": {
7145-
"enum": [
7146-
"te",
7147-
"tm"
7148-
],
7149-
"type": "string"
7150-
},
7151-
"group_index_step": {
7122+
"impedance_specs": {
71527123
"anyOf": [
71537124
{
7154-
"exclusiveMinimum": 0,
7155-
"type": "number"
7156-
},
7157-
{
7158-
"type": "boolean"
7159-
}
7160-
],
7161-
"default": false
7162-
},
7163-
"impedance_specs": {
7164-
"items": {
7165-
"anyOf": [
7166-
{
7167-
"$ref": "#/definitions/AutoImpedanceSpec"
7125+
"items": {
7126+
"anyOf": [
7127+
{
7128+
"$ref": "#/definitions/AutoImpedanceSpec"
7129+
},
7130+
{
7131+
"$ref": "#/definitions/CustomImpedanceSpec"
7132+
}
7133+
]
71687134
},
7169-
{
7170-
"$ref": "#/definitions/CustomImpedanceSpec"
7171-
}
7172-
]
7173-
},
7174-
"type": "array"
7175-
},
7176-
"num_modes": {
7177-
"default": 1,
7178-
"exclusiveMinimum": 0,
7179-
"type": "integer"
7180-
},
7181-
"num_pml": {
7182-
"default": [
7183-
0,
7184-
0
7185-
],
7186-
"items": [
7187-
{
7188-
"minimum": 0,
7189-
"type": "integer"
7135+
"type": "array"
71907136
},
71917137
{
7192-
"minimum": 0,
7193-
"type": "integer"
7138+
"oneOf": [
7139+
{
7140+
"$ref": "#/definitions/AutoImpedanceSpec"
7141+
},
7142+
{
7143+
"$ref": "#/definitions/CustomImpedanceSpec"
7144+
}
7145+
]
71947146
}
7195-
],
7196-
"maxItems": 2,
7197-
"minItems": 2,
7198-
"type": "array"
7199-
},
7200-
"precision": {
7201-
"default": "double",
7202-
"enum": [
7203-
"auto",
7204-
"double",
7205-
"single"
7206-
],
7207-
"type": "string"
7208-
},
7209-
"target_neff": {
7210-
"exclusiveMinimum": 0,
7211-
"type": "number"
7212-
},
7213-
"track_freq": {
7214-
"default": "central",
7215-
"enum": [
7216-
"central",
7217-
"highest",
7218-
"lowest"
7219-
],
7220-
"type": "string"
7147+
]
72217148
},
72227149
"type": {
72237150
"default": "MicrowaveModeSpec",
@@ -7270,6 +7197,7 @@
72707197
"bend_radius": null,
72717198
"filter_pol": null,
72727199
"group_index_step": false,
7200+
"microwave_spec": null,
72737201
"num_modes": 1,
72747202
"num_pml": [
72757203
0,
@@ -7426,10 +7354,7 @@
74267354
"type": "array"
74277355
},
74287356
"mode_spec": {
7429-
"anyOf": [
7430-
{
7431-
"$ref": "#/definitions/MicrowaveModeSpec"
7432-
},
7357+
"allOf": [
74337358
{
74347359
"$ref": "#/definitions/ModeSpec"
74357360
}
@@ -7443,6 +7368,7 @@
74437368
"bend_radius": null,
74447369
"filter_pol": null,
74457370
"group_index_step": false,
7371+
"microwave_spec": null,
74467372
"num_modes": 1,
74477373
"num_pml": [
74487374
0,
@@ -7679,10 +7605,7 @@
76797605
"type": "array"
76807606
},
76817607
"mode_spec": {
7682-
"anyOf": [
7683-
{
7684-
"$ref": "#/definitions/MicrowaveModeSpec"
7685-
},
7608+
"allOf": [
76867609
{
76877610
"$ref": "#/definitions/ModeSpec"
76887611
}
@@ -7696,6 +7619,7 @@
76967619
"bend_radius": null,
76977620
"filter_pol": null,
76987621
"group_index_step": false,
7622+
"microwave_spec": null,
76997623
"num_modes": 1,
77007624
"num_pml": [
77017625
0,
@@ -7856,10 +7780,7 @@
78567780
"type": "integer"
78577781
},
78587782
"mode_spec": {
7859-
"anyOf": [
7860-
{
7861-
"$ref": "#/definitions/MicrowaveModeSpec"
7862-
},
7783+
"allOf": [
78637784
{
78647785
"$ref": "#/definitions/ModeSpec"
78657786
}
@@ -7873,6 +7794,7 @@
78737794
"bend_radius": null,
78747795
"filter_pol": null,
78757796
"group_index_step": false,
7797+
"microwave_spec": null,
78767798
"num_modes": 1,
78777799
"num_pml": [
78787800
0,
@@ -8024,6 +7946,13 @@
80247946
],
80257947
"default": false
80267948
},
7949+
"microwave_spec": {
7950+
"allOf": [
7951+
{
7952+
"$ref": "#/definitions/MicrowaveModeSpec"
7953+
}
7954+
]
7955+
},
80277956
"num_modes": {
80287957
"default": 1,
80297958
"exclusiveMinimum": 0,

0 commit comments

Comments
 (0)