app: stacked cores: complete some 41-xx runs
This commit is contained in:
@@ -27,6 +27,10 @@ class Piecewise:
|
||||
""" xy is a list of (x, y) pairs """
|
||||
self.xy = list(xy)
|
||||
|
||||
@property
|
||||
def num_pieces(self) -> int:
|
||||
return len(self.xy) - 1
|
||||
|
||||
def normalized(self, prev_max: float) -> 'Piecewise':
|
||||
""" map every coordinate from [-prev_max, prev_max] to [0, 1] """
|
||||
p = prev_max
|
||||
|
@@ -56,17 +56,18 @@ of_interest = []
|
||||
# of_interest += filter_meas(rad_um=800, drive=1e11, couplings=24, wrappings=3)
|
||||
# of_interest += [(p, c.shifted_y(-0.13)) for (p, c) in filter_meas(rad_um=800, drive=1e11, couplings=12, wrappings=7)]
|
||||
|
||||
of_interest += filter_meas(rad_um=800, drive=1e11, couplings=8, wrappings=11)
|
||||
of_interest += filter_meas(rad_um=800, drive=1e11, couplings=10, wrappings=9)
|
||||
of_interest += filter_meas(rad_um=1200, drive=1e11, couplings=12, wrappings=9)
|
||||
of_interest += filter_meas(rad_um=1200, drive=1e11, couplings=10, wrappings=11)
|
||||
of_interest += filter_meas(rad_um=1200, drive=2e11, couplings=12, wrappings=9)
|
||||
# of_interest += filter_meas(run="40", rad_um=800, drive=1e11, couplings=8, wrappings=11)
|
||||
# of_interest += filter_meas(run="40", rad_um=800, drive=1e11, couplings=10, wrappings=9)
|
||||
# of_interest += filter_meas(run="40", rad_um=1200, drive=1e11, couplings=12, wrappings=9)
|
||||
# of_interest += filter_meas(run="40", rad_um=1200, drive=1e11, couplings=10, wrappings=11)
|
||||
# of_interest += filter_meas(run="40", rad_um=1200, drive=2e11, couplings=12, wrappings=9)
|
||||
|
||||
of_interest += filter_meas(run="41")
|
||||
|
||||
|
||||
# plot all viable inverters
|
||||
# of_interest += [(p, c) for (p, c) in filter_meas() if c.logically_inverted().is_viable_inverter()]
|
||||
|
||||
|
||||
for (params, curve) in of_interest:
|
||||
curve = curve.logically_inverted()
|
||||
curve.plot(title = f"{params.human_name} mapping")
|
||||
|
@@ -43,13 +43,14 @@ class SimParams:
|
||||
|
||||
@property
|
||||
def tuple(self):
|
||||
return (self.um, self.couplings, self.wrappings, self.drive)
|
||||
return (self.run, self.um, self.couplings, self.wrappings, self.drive)
|
||||
|
||||
def matches(self, rad_um: int, drive: float, couplings: int, wrappings: int) -> bool:
|
||||
def matches(self, run: str, rad_um: int, drive: float, couplings: int, wrappings: int) -> bool:
|
||||
"""
|
||||
all parameters are optional
|
||||
"""
|
||||
match_tuple = (
|
||||
self.run if run is None else run,
|
||||
self.um if rad_um is None else rad_um,
|
||||
self.couplings if couplings is None else couplings,
|
||||
self.wrappings if wrappings is None else wrappings,
|
||||
@@ -112,14 +113,18 @@ sims = [
|
||||
(SimParams40(10, 5, 1200, "1e11"), "fwd_40_1200um_10_11_1_1e11", 8000),
|
||||
(SimParams40(12, 4, 1200, "2e11"), "fwd_40_1200um_12_9_1_2e11", 8000),
|
||||
|
||||
(SimParams41(9, 1, 400, "3e9"), None, 20000),
|
||||
(SimParams41(9, 3, 600, "3e9"), None, 20000),
|
||||
(SimParams41(9, 1, 400, "3e9"), None, 20000),
|
||||
(SimParams41(10, 3, 800, "25e8"), None, 20000),
|
||||
(SimParams41(9, 1, 400, "5e9"), None, 20000),
|
||||
(SimParams41(9, 1, 400, "2e9"), None, 20000),
|
||||
(SimParams41(9, 1, 400, "1e10"), None, 20000),
|
||||
(SimParams41(10, 3, 800, "3e9"), None, 20000),
|
||||
]
|
||||
|
||||
measurements = { real.machine_name: [human, norm, None, None] for (real, human, norm) in sims }
|
||||
|
||||
def filter_meas(rad_um: int = None, drive: float = None, couplings: int = None, wrappings: int = None) -> list:
|
||||
def filter_meas(run: str = None, rad_um: int = None, drive: float = None, couplings: int = None, wrappings: int = None) -> list:
|
||||
"""
|
||||
return only that set of (SimParams, Piecewise) which matches the given criteria.
|
||||
leave any option as `None` to not filter on it.
|
||||
@@ -128,7 +133,9 @@ def filter_meas(rad_um: int = None, drive: float = None, couplings: int = None,
|
||||
return sorted(
|
||||
[
|
||||
(p, get_meas(p)) for (p, _, _) in sims
|
||||
if p.matches(rad_um, drive, couplings, wrappings) and get_meas(p)
|
||||
if p.matches(run, rad_um, drive, couplings, wrappings) \
|
||||
and get_meas(p) \
|
||||
and get_meas(p).num_pieces > 0
|
||||
],
|
||||
key = lambda v: v[0].tuple
|
||||
)
|
||||
@@ -140,8 +147,9 @@ def set_meas(real: str, expr: str):
|
||||
pw = eval(expr)
|
||||
measurements[real][2] = expr
|
||||
human, norm, _, _ = measurements[real]
|
||||
measurements[real][3] = pw = pw.normalized(norm)
|
||||
if human:
|
||||
globals()[human] = measurements[real][3] = pw.normalized(norm)
|
||||
globals()[human] = pw
|
||||
|
||||
def try_measure(real: str):
|
||||
try:
|
||||
@@ -1124,13 +1132,139 @@ Piecewise(
|
||||
)
|
||||
""")
|
||||
|
||||
set_meas("41-0.00059999997rad-9coupling-7_1_winding-3e9-drive", """
|
||||
Piecewise(
|
||||
[
|
||||
[ -17102, 6449 ], # -2.0
|
||||
[ -17031, 6440 ], # -1.5
|
||||
[ -16783, 6426 ], # -1.0
|
||||
[ -16089, 6493 ], # -0.8
|
||||
[ -9028, 8147 ], # -0.6
|
||||
[ -6768, 8679 ], # -0.5
|
||||
[ -6195, 8807 ], # -0.4
|
||||
[ -5589, 8931 ], # -0.3
|
||||
[ -5268, 8992 ], # -0.25
|
||||
[ -4937, 9056 ], # -0.2
|
||||
[ -4735, 9094 ], # -0.17
|
||||
[ -4600, 9118 ], # -0.15
|
||||
[ -4463, 9142 ], # -0.13
|
||||
[ -4257, 9181 ], # -0.1
|
||||
[ -4052, 9219 ], # -0.07
|
||||
[ -3915, 9246 ], # -0.05
|
||||
[ -3573, 9323 ], # 0.0
|
||||
[ -3236, 9403 ], # 0.05
|
||||
[ -2906, 9484 ], # 0.1
|
||||
[ -2270, 9641 ], # 0.2
|
||||
[ -1639, 9803 ], # 0.3
|
||||
[ 4763, 11378 ], # 0.5
|
||||
[ 16092, 13915 ], # 0.8
|
||||
[ 16937, 13981 ], # 1.0
|
||||
[ 17192, 13998 ], # 1.5
|
||||
[ 17253, 14001 ], # 2.0
|
||||
]
|
||||
)
|
||||
""")
|
||||
|
||||
set_meas("41-0.0004rad-9coupling-3_1_winding-3e9-drive", """
|
||||
Piecewise(
|
||||
[
|
||||
[ -16887, -4873 ], # -2.0
|
||||
[ -16802, -4812 ], # -1.0
|
||||
[ -16749, -4794 ], # -0.8
|
||||
[ -16343, -4696 ], # -0.6
|
||||
[ -14391, -4098 ], # -0.5
|
||||
[ -13065, -3673 ], # -0.4
|
||||
[ -12414, -3462 ], # -0.3
|
||||
[ -12066, -3349 ], # -0.25
|
||||
[ -11687, -3228 ], # -0.2
|
||||
[ -11442, -3150 ], # -0.17
|
||||
[ -11270, -3094 ], # -0.15
|
||||
[ -11088, -3036 ], # -0.13
|
||||
[ -10791, -2940 ], # -0.1
|
||||
[ -10471, -2836 ], # -0.07
|
||||
[ -10248, -2763 ], # -0.05
|
||||
[ -9667, -2573 ], # 0.0
|
||||
[ -9056, -2372 ], # 0.05
|
||||
[ -8283, -2113 ], # 0.1
|
||||
[ -3257, -395 ], # 0.2
|
||||
[ 2914, 1681 ], # 0.3
|
||||
[ 15191, 5995 ], # 0.5
|
||||
[ 16935, 6397 ], # 0.8
|
||||
[ 16994, 6381 ], # 1.0
|
||||
[ 17039, 6389 ], # 1.5
|
||||
[ 17079, 6399 ], # 2.0
|
||||
]
|
||||
)
|
||||
""")
|
||||
|
||||
set_meas("41-0.0008rad-10coupling-7_1_winding-25e8-drive", """
|
||||
Piecewise(
|
||||
[
|
||||
[ -12586, 10173 ], # -1.0
|
||||
[ -1330, 11989 ], # -0.17
|
||||
[ -1243, 12002 ], # -0.15
|
||||
[ -1157, 12014 ], # -0.13
|
||||
[ -1034, 12033 ], # -0.1
|
||||
[ -916, 12051 ], # -0.07
|
||||
[ -841, 12062 ], # -0.05
|
||||
[ -662, 12087 ], # 0.0
|
||||
[ -506, 12107 ], # 0.05
|
||||
[ -378, 12124 ], # 0.1
|
||||
[ 12563, 12412 ], # 1.0
|
||||
]
|
||||
)
|
||||
""")
|
||||
|
||||
set_meas("41-0.0004rad-9coupling-3_1_winding-5e9-drive", """
|
||||
Piecewise(
|
||||
[
|
||||
[ -16858, -15999 ], # -1.0
|
||||
[ -12812, -15788 ], # -0.17
|
||||
[ -12636, -15779 ], # -0.15
|
||||
[ -12458, -15768 ], # -0.13
|
||||
[ -12187, -15753 ], # -0.1
|
||||
[ -11911, -15737 ], # -0.07
|
||||
[ -11721, -15725 ], # -0.05
|
||||
[ -11192, -15692 ], # 0.0
|
||||
[ -10148, -15605 ], # 0.05
|
||||
[ -5572, -15000 ], # 0.1
|
||||
[ 17079, 1636 ], # 1.0
|
||||
]
|
||||
)
|
||||
""")
|
||||
|
||||
set_meas("41-0.0004rad-9coupling-3_1_winding-2e9-drive", """
|
||||
Piecewise(
|
||||
[
|
||||
[ -16571, 2372 ], # -1.0
|
||||
[ -5986, 5641 ], # -0.17
|
||||
[ -5733, 5725 ], # -0.15
|
||||
[ -5481, 5809 ], # -0.13
|
||||
[ -5105, 5933 ], # -0.1
|
||||
[ -4734, 6057 ], # -0.07
|
||||
[ -4491, 6139 ], # -0.05
|
||||
[ -3909, 6334 ], # 0.0
|
||||
[ -3352, 6521 ], # 0.05
|
||||
[ -2818, 6702 ], # 0.1
|
||||
[ 16714, 12996 ], # 1.0
|
||||
]
|
||||
)
|
||||
""")
|
||||
|
||||
set_meas("41-0.0004rad-9coupling-3_1_winding-1e10-drive", """
|
||||
Piecewise(
|
||||
[
|
||||
[ -16931, -16791 ], # -1.0
|
||||
[ -15511, -16791 ], # -0.17
|
||||
[ -14631, -16790 ], # -0.15
|
||||
[ -14115, -16790 ], # -0.13
|
||||
[ -13476, -16790 ], # -0.1
|
||||
[ -12908, -16788 ], # -0.07
|
||||
[ -12523, -16787 ], # -0.05
|
||||
[ -11224, -16783 ], # 0.0
|
||||
[ -5604, -16743 ], # 0.05
|
||||
[ 4926, -14787 ], # 0.1
|
||||
[ 17210, -1376 ], # 1.0
|
||||
]
|
||||
)
|
||||
""")
|
||||
|
Reference in New Issue
Block a user