app: stacked_cores: 43-xx: ingest results

This commit is contained in:
2022-10-13 17:27:16 -07:00
parent f4d637fc98
commit b07da366f1
2 changed files with 208 additions and 6 deletions

View File

@@ -119,11 +119,11 @@ of_interest += [(p, get_meas(p)) for p in
# plot all viable inverters
# of_interest += filter_meas(run="41", rad_um=400, viable_inverter=True)
of_interest += filter_meas(run="42", rad_um=400, couplings=4)
# of_interest += filter_meas(run="42", rad_um=400, couplings=4)
# of_interest += filter_meas(run="42", rad_um=400, couplings=9)
# of_interest += filter_meas(run="42", rad_um=400, couplings=2)
# of_interest += filter_meas(run="42", rad_um=400, couplings=6)
# of_interest += filter_meas(run="42")
of_interest += filter_meas(run="43")
for (params, curve) in of_interest:
if not params.is_inverter:

View File

@@ -43,6 +43,10 @@ class SimParams:
def is_inverter(self) -> bool:
raise NotImplementedError
@property
def t_last(self) -> float:
return 3e-9
@property
def machine_name(self) -> str:
return f"{self.run}-{self.um_str}rad-{self.couplings}coupling-{self.wrappings}_1_winding-{self.drive_str}-drive"
@@ -95,6 +99,19 @@ class SimParams42(SimParams):
def is_inverter(self) -> bool:
return True
class SimParams43(SimParams):
@property
def run(self) -> str:
return "43"
@property
def is_inverter(self) -> bool:
return False
@property
def t_last(self) -> float:
return 5e-9
sims = [
# params, human friendly db name, normalization
@@ -200,6 +217,14 @@ sims = [
(SimParams42(2, 6, 400, "4e10"), None, 20000),
(SimParams42(2, 6, 400, "8e10"), None, 20000),
(SimParams42(2, 6, 400, "149999992832e0"), None, 20000), # 15e10
(SimParams43(3, 2, 400, "3e9"), None, 20000),
(SimParams43(3, 2, 400, "5e9"), None, 20000),
(SimParams43(3, 2, 400, "1e10"), None, 20000),
(SimParams43(3, 2, 400, "2e10"), None, 20000),
(SimParams43(3, 2, 400, "3e10"), None, 20000),
(SimParams43(2, 3, 400, "2e10"), None, 20000),
(SimParams43(5, 1, 400, "8e9"), None, 20000),
]
measurements = { real.machine_name: [human, norm, None, None] for (real, human, norm) in sims }
@@ -235,12 +260,14 @@ def set_meas(real: str, expr: str):
if human:
globals()[human] = pw
def try_measure(real: str):
def try_measure(real: str, t_last: float):
try:
new_value = subprocess.check_output(
[
"./stacked_cores_39xx.py",
f"../../../../out/applications/stacked_cores/{real}"
f"../../../../out/applications/stacked_cores/{real}",
"2e-9",
str(t_last),
]
).decode()
except subprocess.CalledProcessError as e:
@@ -250,8 +277,8 @@ def try_measure(real: str):
set_meas(real, "\n" + new_value)
def update_all():
for (real, _human, _norm) in sims:
try_measure(real.machine_name)
for (params, _human, _norm) in sims:
try_measure(params.machine_name, t_last=params.t_last)
def dump(path: str):
orig = open(path).read()
@@ -3119,4 +3146,179 @@ Piecewise(
)
""")
set_meas("43-0.0004rad-3coupling-5_1_winding-3e9-drive", """
Piecewise(
[
[ -16518, 6297 ], # -2.0
[ -4652, 7064 ], # -1.0
[ -172, 7240 ], # -0.5
[ -45, 7267 ], # -0.3
[ -27, 7271 ], # -0.25
[ -14, 7274 ], # -0.2
[ -5, 7276 ], # -0.15
[ 0, 7277 ], # -0.1
[ 1, 7277 ], # -0.05
[ 5, 7281 ], # 0.15
[ 16, 7285 ], # 0.2
[ 35, 7293 ], # 0.25
[ 62, 7303 ], # 0.3
[ 271, 7382 ], # 0.5
[ 4683, 7975 ], # 1.0
[ 16522, 9525 ], # 2.0
]
)
""")
set_meas("43-0.0004rad-3coupling-5_1_winding-5e9-drive", """
Piecewise(
[
[ -16645, 5703 ], # -2.0
[ -16040, 5792 ], # -1.0
[ -1445, 6076 ], # -0.5
[ -89, 6124 ], # -0.3
[ 13, 6128 ], # -0.25
[ 103, 6132 ], # -0.2
[ 182, 6136 ], # -0.15
[ 252, 6139 ], # -0.1
[ 303, 6142 ], # -0.05
[ 351, 6144 ], # 0.0
[ 484, 6149 ], # 0.05
[ 712, 6158 ], # 0.1
[ 1024, 6171 ], # 0.15
[ 1399, 6186 ], # 0.2
[ 1823, 6202 ], # 0.25
[ 2280, 6220 ], # 0.3
[ 4334, 6297 ], # 0.5
[ 16046, 6691 ], # 1.0
[ 16666, 6738 ], # 2.0
]
)
""")
set_meas("43-0.0004rad-3coupling-5_1_winding-1e10-drive", """
Piecewise(
[
[ -16760, -3662 ], # -2.0
[ -16662, -3712 ], # -1.0
[ -16048, -3716 ], # -0.5
[ -4607, -3242 ], # -0.3
[ -1438, -3105 ], # -0.25
[ 862, -3004 ], # -0.2
[ 2005, -2956 ], # -0.15
[ 2751, -2924 ], # -0.1
[ 3422, -2895 ], # -0.05
[ 3812, -2879 ], # -0.02
[ 3940, -2873 ], # -0.01
[ 4069, -2868 ], # 0.0
[ 4199, -2862 ], # 0.01
[ 4333, -2857 ], # 0.02
[ 4469, -2851 ], # 0.03
[ 4610, -2844 ], # 0.04
[ 4756, -2839 ], # 0.05
[ 5530, -2806 ], # 0.1
[ 6348, -2773 ], # 0.15
[ 7199, -2738 ], # 0.2
[ 8104, -2701 ], # 0.25
[ 9110, -2662 ], # 0.3
[ 16015, -2413 ], # 0.5
[ 16684, -2401 ], # 1.0
[ 16776, -2409 ], # 2.0
]
)
""")
set_meas("43-0.0004rad-3coupling-5_1_winding-2e10-drive", """
Piecewise(
[
[ -16832, -15970 ], # -2.0
[ -16778, -15971 ], # -1.0
[ -16685, -15969 ], # -0.5
[ -16537, -15970 ], # -0.3
[ -16059, -15965 ], # -0.25
[ -11196, -15897 ], # -0.2
[ -4720, -15790 ], # -0.15
[ 797, -15677 ], # -0.1
[ 1601, -15658 ], # -0.09
[ 2309, -15643 ], # -0.08
[ 2926, -15628 ], # -0.07
[ 3468, -15616 ], # -0.06
[ 3968, -15603 ], # -0.05
[ 4424, -15592 ], # -0.04
[ 4848, -15583 ], # -0.03
[ 5253, -15572 ], # -0.02
[ 5645, -15562 ], # -0.01
[ 6024, -15554 ], # 0.0
[ 6392, -15544 ], # 0.01
[ 6753, -15535 ], # 0.02
[ 7107, -15525 ], # 0.03
[ 7458, -15515 ], # 0.04
[ 7806, -15506 ], # 0.05
[ 8151, -15497 ], # 0.06
[ 8496, -15489 ], # 0.07
[ 8841, -15479 ], # 0.08
[ 9190, -15469 ], # 0.09
[ 9540, -15458 ], # 0.1
[ 11407, -15404 ], # 0.15
[ 13924, -15320 ], # 0.2
[ 16013, -15247 ], # 0.25
[ 16489, -15231 ], # 0.3
[ 16700, -15224 ], # 0.5
[ 16789, -15223 ], # 1.0
[ 16836, -15223 ], # 2.0
]
)
""")
set_meas("43-0.0004rad-2coupling-7_1_winding-2e10-drive", """
Piecewise(
[
[ -16668, -7942 ], # -2.0
[ -16532, -7937 ], # -1.0
[ -16350, -7936 ], # -0.5
[ -8796, -7712 ], # -0.3
[ -4996, -7592 ], # -0.25
[ -1907, -7497 ], # -0.2
[ 35, -7432 ], # -0.15
[ 1341, -7388 ], # -0.1
[ 2408, -7348 ], # -0.05
[ 3386, -7305 ], # 0.0
[ 4351, -7257 ], # 0.05
[ 5386, -7214 ], # 0.1
[ 6513, -7176 ], # 0.15
[ 7732, -7140 ], # 0.2
[ 9157, -7101 ], # 0.25
[ 11134, -7049 ], # 0.3
[ 16529, -6901 ], # 0.5
[ 16653, -6902 ], # 1.0
[ 16760, -6900 ], # 2.0
]
)
""")
set_meas("43-0.0004rad-5coupling-3_1_winding-8e9-drive", """
Piecewise(
[
[ -16848, -10669 ], # -2.0
[ -16802, -10679 ], # -1.0
[ -16691, -10678 ], # -0.5
[ -11982, -10359 ], # -0.3
[ -7374, -10013 ], # -0.25
[ -2727, -9654 ], # -0.2
[ 1840, -9307 ], # -0.15
[ 5760, -9021 ], # -0.1
[ 7616, -8890 ], # -0.05
[ 8766, -8811 ], # 0.0
[ 9753, -8742 ], # 0.05
[ 10718, -8675 ], # 0.1
[ 11693, -8607 ], # 0.15
[ 12682, -8538 ], # 0.2
[ 13713, -8467 ], # 0.25
[ 14679, -8401 ], # 0.3
[ 16540, -8290 ], # 0.5
[ 16770, -8284 ], # 1.0
[ 16826, -8280 ], # 2.0
]
)
""")
if __name__ == '__main__': main()