Skip to content

Commit de9d595

Browse files
flexible api
1 parent 78ab207 commit de9d595

File tree

9 files changed

+827
-240
lines changed

9 files changed

+827
-240
lines changed

schemas/EMESimulation.json

Lines changed: 105 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,6 +1748,30 @@
17481748
},
17491749
"type": "object"
17501750
},
1751+
"ChebSampling": {
1752+
"additionalProperties": false,
1753+
"properties": {
1754+
"attrs": {
1755+
"default": {},
1756+
"type": "object"
1757+
},
1758+
"num_points": {
1759+
"minimum": 3,
1760+
"type": "integer"
1761+
},
1762+
"type": {
1763+
"default": "ChebSampling",
1764+
"enum": [
1765+
"ChebSampling"
1766+
],
1767+
"type": "string"
1768+
}
1769+
},
1770+
"required": [
1771+
"num_points"
1772+
],
1773+
"type": "object"
1774+
},
17511775
"ClipOperation": {
17521776
"additionalProperties": false,
17531777
"properties": {
@@ -3907,6 +3931,39 @@
39073931
],
39083932
"type": "object"
39093933
},
3934+
"CustomSampling": {
3935+
"additionalProperties": false,
3936+
"properties": {
3937+
"attrs": {
3938+
"default": {},
3939+
"type": "object"
3940+
},
3941+
"freqs": {
3942+
"anyOf": [
3943+
{
3944+
"items": {
3945+
"type": "number"
3946+
},
3947+
"type": "array"
3948+
},
3949+
{
3950+
"type": "ArrayLike"
3951+
}
3952+
]
3953+
},
3954+
"type": {
3955+
"default": "CustomSampling",
3956+
"enum": [
3957+
"CustomSampling"
3958+
],
3959+
"type": "string"
3960+
}
3961+
},
3962+
"required": [
3963+
"freqs"
3964+
],
3965+
"type": "object"
3966+
},
39103967
"CustomSellmeier": {
39113968
"additionalProperties": false,
39123969
"properties": {
@@ -8158,20 +8215,37 @@
81588215
"method": {
81598216
"default": "linear",
81608217
"enum": [
8161-
"cheb",
81628218
"cubic",
8163-
"linear"
8219+
"linear",
8220+
"poly"
81648221
],
81658222
"type": "string"
81668223
},
8167-
"num_points": {
8168-
"minimum": 2,
8169-
"type": "integer"
8170-
},
81718224
"reduce_data": {
81728225
"default": false,
81738226
"type": "boolean"
81748227
},
8228+
"sampling_spec": {
8229+
"discriminator": {
8230+
"mapping": {
8231+
"ChebSampling": "#/definitions/ChebSampling",
8232+
"CustomSampling": "#/definitions/CustomSampling",
8233+
"UniformSampling": "#/definitions/UniformSampling"
8234+
},
8235+
"propertyName": "type"
8236+
},
8237+
"oneOf": [
8238+
{
8239+
"$ref": "#/definitions/ChebSampling"
8240+
},
8241+
{
8242+
"$ref": "#/definitions/CustomSampling"
8243+
},
8244+
{
8245+
"$ref": "#/definitions/UniformSampling"
8246+
}
8247+
]
8248+
},
81758249
"type": {
81768250
"default": "ModeInterpSpec",
81778251
"enum": [
@@ -8181,7 +8255,7 @@
81818255
}
81828256
},
81838257
"required": [
8184-
"num_points"
8258+
"sampling_spec"
81858259
],
81868260
"type": "object"
81878261
},
@@ -12112,6 +12186,30 @@
1211212186
],
1211312187
"type": "object"
1211412188
},
12189+
"UniformSampling": {
12190+
"additionalProperties": false,
12191+
"properties": {
12192+
"attrs": {
12193+
"default": {},
12194+
"type": "object"
12195+
},
12196+
"num_points": {
12197+
"minimum": 2,
12198+
"type": "integer"
12199+
},
12200+
"type": {
12201+
"default": "UniformSampling",
12202+
"enum": [
12203+
"UniformSampling"
12204+
],
12205+
"type": "string"
12206+
}
12207+
},
12208+
"required": [
12209+
"num_points"
12210+
],
12211+
"type": "object"
12212+
},
1211512213
"VarshniEnergyBandGap": {
1211612214
"additionalProperties": false,
1211712215
"properties": {

schemas/ModeSimulation.json

Lines changed: 105 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,6 +1748,30 @@
17481748
},
17491749
"type": "object"
17501750
},
1751+
"ChebSampling": {
1752+
"additionalProperties": false,
1753+
"properties": {
1754+
"attrs": {
1755+
"default": {},
1756+
"type": "object"
1757+
},
1758+
"num_points": {
1759+
"minimum": 3,
1760+
"type": "integer"
1761+
},
1762+
"type": {
1763+
"default": "ChebSampling",
1764+
"enum": [
1765+
"ChebSampling"
1766+
],
1767+
"type": "string"
1768+
}
1769+
},
1770+
"required": [
1771+
"num_points"
1772+
],
1773+
"type": "object"
1774+
},
17511775
"ClipOperation": {
17521776
"additionalProperties": false,
17531777
"properties": {
@@ -3950,6 +3974,39 @@
39503974
],
39513975
"type": "object"
39523976
},
3977+
"CustomSampling": {
3978+
"additionalProperties": false,
3979+
"properties": {
3980+
"attrs": {
3981+
"default": {},
3982+
"type": "object"
3983+
},
3984+
"freqs": {
3985+
"anyOf": [
3986+
{
3987+
"items": {
3988+
"type": "number"
3989+
},
3990+
"type": "array"
3991+
},
3992+
{
3993+
"type": "ArrayLike"
3994+
}
3995+
]
3996+
},
3997+
"type": {
3998+
"default": "CustomSampling",
3999+
"enum": [
4000+
"CustomSampling"
4001+
],
4002+
"type": "string"
4003+
}
4004+
},
4005+
"required": [
4006+
"freqs"
4007+
],
4008+
"type": "object"
4009+
},
39534010
"CustomSellmeier": {
39544011
"additionalProperties": false,
39554012
"properties": {
@@ -7364,20 +7421,37 @@
73647421
"method": {
73657422
"default": "linear",
73667423
"enum": [
7367-
"cheb",
73687424
"cubic",
7369-
"linear"
7425+
"linear",
7426+
"poly"
73707427
],
73717428
"type": "string"
73727429
},
7373-
"num_points": {
7374-
"minimum": 2,
7375-
"type": "integer"
7376-
},
73777430
"reduce_data": {
73787431
"default": false,
73797432
"type": "boolean"
73807433
},
7434+
"sampling_spec": {
7435+
"discriminator": {
7436+
"mapping": {
7437+
"ChebSampling": "#/definitions/ChebSampling",
7438+
"CustomSampling": "#/definitions/CustomSampling",
7439+
"UniformSampling": "#/definitions/UniformSampling"
7440+
},
7441+
"propertyName": "type"
7442+
},
7443+
"oneOf": [
7444+
{
7445+
"$ref": "#/definitions/ChebSampling"
7446+
},
7447+
{
7448+
"$ref": "#/definitions/CustomSampling"
7449+
},
7450+
{
7451+
"$ref": "#/definitions/UniformSampling"
7452+
}
7453+
]
7454+
},
73817455
"type": {
73827456
"default": "ModeInterpSpec",
73837457
"enum": [
@@ -7387,7 +7461,7 @@
73877461
}
73887462
},
73897463
"required": [
7390-
"num_points"
7464+
"sampling_spec"
73917465
],
73927466
"type": "object"
73937467
},
@@ -11818,6 +11892,30 @@
1181811892
],
1181911893
"type": "object"
1182011894
},
11895+
"UniformSampling": {
11896+
"additionalProperties": false,
11897+
"properties": {
11898+
"attrs": {
11899+
"default": {},
11900+
"type": "object"
11901+
},
11902+
"num_points": {
11903+
"minimum": 2,
11904+
"type": "integer"
11905+
},
11906+
"type": {
11907+
"default": "UniformSampling",
11908+
"enum": [
11909+
"UniformSampling"
11910+
],
11911+
"type": "string"
11912+
}
11913+
},
11914+
"required": [
11915+
"num_points"
11916+
],
11917+
"type": "object"
11918+
},
1182111919
"VarshniEnergyBandGap": {
1182211920
"additionalProperties": false,
1182311921
"properties": {

0 commit comments

Comments
 (0)