Skip to content

Commit 71a5ffb

Browse files
committed
feat: mode sort and filter specifications in ModeSpec
1 parent 142c385 commit 71a5ffb

File tree

15 files changed

+1238
-111
lines changed

15 files changed

+1238
-111
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
- Added `CustomImpedanceSpec` for user-defined voltage and current path specifications in impedance calculations.
2222
- Added voltage integral specification classes: `AxisAlignedVoltageIntegralSpec` and `Custom2DVoltageIntegralSpec`.
2323
- Added current integral specification classes: `AxisAlignedCurrentIntegralSpec`, `CompositeCurrentIntegralSpec`, and `Custom2DCurrentIntegralSpec`.
24+
- `sort_spec` in `ModeSpec` allows for fine-grained filtering and sorting of modes. This also deprecates `filter_pol`. The equivalent usage for example to `filter_pol="te"` is `sort_spec=ModeSortSpec(filter_key="TE_polarization", filter_reference=0.5)`. `ModeSpec.track_freq` has also been deprecated and moved to `ModeSortSpec.track_freq`.
2425

2526
### Changed
2627
- Improved performance of antenna metrics calculation by utilizing cached wave amplitude calculations instead of recomputing wave amplitudes for each port excitation in the `TerminalComponentModelerData`.

schemas/EMESimulation.json

Lines changed: 151 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5265,6 +5265,24 @@
52655265
],
52665266
"type": "string"
52675267
},
5268+
"sort_spec": {
5269+
"allOf": [
5270+
{
5271+
"$ref": "#/definitions/ModeSortSpec"
5272+
}
5273+
],
5274+
"default": {
5275+
"attrs": {},
5276+
"filter_key": null,
5277+
"filter_order": "over",
5278+
"filter_reference": 0.0,
5279+
"sort_key": null,
5280+
"sort_order": "ascending",
5281+
"sort_reference": null,
5282+
"track_freq": "central",
5283+
"type": "ModeSortSpec"
5284+
}
5285+
},
52685286
"target_neff": {
52695287
"exclusiveMinimum": 0,
52705288
"type": "number"
@@ -7989,12 +8007,29 @@
79898007
],
79908008
"type": "string"
79918009
},
8010+
"sort_spec": {
8011+
"allOf": [
8012+
{
8013+
"$ref": "#/definitions/ModeSortSpec"
8014+
}
8015+
],
8016+
"default": {
8017+
"attrs": {},
8018+
"filter_key": null,
8019+
"filter_order": "over",
8020+
"filter_reference": 0.0,
8021+
"sort_key": null,
8022+
"sort_order": "ascending",
8023+
"sort_reference": null,
8024+
"track_freq": "central",
8025+
"type": "ModeSortSpec"
8026+
}
8027+
},
79928028
"target_neff": {
79938029
"exclusiveMinimum": 0,
79948030
"type": "number"
79958031
},
79968032
"track_freq": {
7997-
"default": "central",
79988033
"enum": [
79998034
"central",
80008035
"highest",
@@ -8051,8 +8086,19 @@
80518086
0
80528087
],
80538088
"precision": "double",
8089+
"sort_spec": {
8090+
"attrs": {},
8091+
"filter_key": null,
8092+
"filter_order": "over",
8093+
"filter_reference": 0.0,
8094+
"sort_key": null,
8095+
"sort_order": "ascending",
8096+
"sort_reference": null,
8097+
"track_freq": "central",
8098+
"type": "ModeSortSpec"
8099+
},
80548100
"target_neff": null,
8055-
"track_freq": "central",
8101+
"track_freq": null,
80568102
"type": "ModeSpec"
80578103
},
80588104
"discriminator": {
@@ -8266,8 +8312,19 @@
82668312
0
82678313
],
82688314
"precision": "double",
8315+
"sort_spec": {
8316+
"attrs": {},
8317+
"filter_key": null,
8318+
"filter_order": "over",
8319+
"filter_reference": 0.0,
8320+
"sort_key": null,
8321+
"sort_order": "ascending",
8322+
"sort_reference": null,
8323+
"track_freq": "central",
8324+
"type": "ModeSortSpec"
8325+
},
82698326
"target_neff": null,
8270-
"track_freq": "central",
8327+
"track_freq": null,
82718328
"type": "ModeSpec"
82728329
}
82738330
},
@@ -8344,6 +8401,79 @@
83448401
],
83458402
"type": "object"
83468403
},
8404+
"ModeSortSpec": {
8405+
"additionalProperties": false,
8406+
"properties": {
8407+
"attrs": {
8408+
"default": {},
8409+
"type": "object"
8410+
},
8411+
"filter_key": {
8412+
"enum": [
8413+
"TE_fraction",
8414+
"TM_fraction",
8415+
"k_eff",
8416+
"mode_area",
8417+
"n_eff",
8418+
"wg_TE_fraction",
8419+
"wg_TM_fraction"
8420+
],
8421+
"type": "string"
8422+
},
8423+
"filter_order": {
8424+
"default": "over",
8425+
"enum": [
8426+
"over",
8427+
"under"
8428+
],
8429+
"type": "string"
8430+
},
8431+
"filter_reference": {
8432+
"default": 0.0,
8433+
"type": "number"
8434+
},
8435+
"sort_key": {
8436+
"enum": [
8437+
"TE_fraction",
8438+
"TM_fraction",
8439+
"k_eff",
8440+
"mode_area",
8441+
"n_eff",
8442+
"wg_TE_fraction",
8443+
"wg_TM_fraction"
8444+
],
8445+
"type": "string"
8446+
},
8447+
"sort_order": {
8448+
"default": "ascending",
8449+
"enum": [
8450+
"ascending",
8451+
"descending"
8452+
],
8453+
"type": "string"
8454+
},
8455+
"sort_reference": {
8456+
"type": "number"
8457+
},
8458+
"track_freq": {
8459+
"default": "central",
8460+
"enum": [
8461+
"central",
8462+
"highest",
8463+
"lowest"
8464+
],
8465+
"type": "string"
8466+
},
8467+
"type": {
8468+
"default": "ModeSortSpec",
8469+
"enum": [
8470+
"ModeSortSpec"
8471+
],
8472+
"type": "string"
8473+
}
8474+
},
8475+
"type": "object"
8476+
},
83478477
"ModeSpec": {
83488478
"additionalProperties": false,
83498479
"properties": {
@@ -8425,12 +8555,29 @@
84258555
],
84268556
"type": "string"
84278557
},
8558+
"sort_spec": {
8559+
"allOf": [
8560+
{
8561+
"$ref": "#/definitions/ModeSortSpec"
8562+
}
8563+
],
8564+
"default": {
8565+
"attrs": {},
8566+
"filter_key": null,
8567+
"filter_order": "over",
8568+
"filter_reference": 0.0,
8569+
"sort_key": null,
8570+
"sort_order": "ascending",
8571+
"sort_reference": null,
8572+
"track_freq": "central",
8573+
"type": "ModeSortSpec"
8574+
}
8575+
},
84288576
"target_neff": {
84298577
"exclusiveMinimum": 0,
84308578
"type": "number"
84318579
},
84328580
"track_freq": {
8433-
"default": "central",
84348581
"enum": [
84358582
"central",
84368583
"highest",

0 commit comments

Comments
 (0)