From b8a7cc54e2091c9bfd26cefc4c31e3dd50e204dd Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 2 Oct 2022 23:06:38 -0700 Subject: [PATCH] app: stacked_cores: 41-xx: define 2 more sims (600um) --- .../stacked_cores/scripts/plot_inverters.py | 16 +++++----- .../scripts/stacked_cores_40xx_db.py | 12 ++++++-- crates/applications/stacked_cores/src/main.rs | 29 ++++++++++--------- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/crates/applications/stacked_cores/scripts/plot_inverters.py b/crates/applications/stacked_cores/scripts/plot_inverters.py index 9d50e9b..b6da9cd 100755 --- a/crates/applications/stacked_cores/scripts/plot_inverters.py +++ b/crates/applications/stacked_cores/scripts/plot_inverters.py @@ -62,7 +62,7 @@ of_interest = [] # 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") +# of_interest += filter_meas(run="41", viable_inverter=True) # of_interest = [ # (p, c) for (p, c) in of_interest if p not in [ # SimParams41(9, 3, 600, "3e9"), @@ -80,19 +80,21 @@ of_interest = [] # ] of_interest += [(p, get_meas(p)) for p in [ - SimParams41(9, 1, 400, "1e10"), - SimParams41(12, 2, 600, "1e10"), +# SimParams41(18, 1, 600, "1e10"), +# SimParams41(18, 1, 600, "2e10"), +# SimParams41(9, 1, 400, "1e10"), +# SimParams41(12, 2, 600, "1e10"), SimParams41(10, 3, 800, "2e10"), - SimParams41(6, 2, 400, "1e10"), - SimParams41(9, 3, 600, "2e10"), +# SimParams41(6, 2, 400, "1e10"), +# SimParams41(9, 3, 600, "2e10"), SimParams41(10, 3, 800, "1e10"), - SimParams41(9, 1, 400, "5e9"), +# SimParams41(9, 1, 400, "5e9"), ] if get_meas(p)] # plot all viable inverters -# of_interest += [(p, c) for (p, c) in filter_meas() if c.logically_inverted().is_viable_inverter()] +# of_interest += filter_meas(viable_inverter=True) for (params, curve) in of_interest: curve = curve.logically_inverted() diff --git a/crates/applications/stacked_cores/scripts/stacked_cores_40xx_db.py b/crates/applications/stacked_cores/scripts/stacked_cores_40xx_db.py index 3ee4ac0..0881b11 100755 --- a/crates/applications/stacked_cores/scripts/stacked_cores_40xx_db.py +++ b/crates/applications/stacked_cores/scripts/stacked_cores_40xx_db.py @@ -125,6 +125,8 @@ sims = [ (SimParams41(10, 3, 800, "3e9"), None, 20000), # in progress + (SimParams41(18, 1, 600, "1e10"), None, 20000), + (SimParams41(18, 1, 600, "2e10"), None, 20000), (SimParams41(9, 1, 400, "1e10"), None, 20000), (SimParams41(12, 2, 600, "1e10"), None, 20000), (SimParams41(10, 3, 800, "2e10"), None, 20000), @@ -136,7 +138,10 @@ sims = [ measurements = { real.machine_name: [human, norm, None, None] for (real, human, norm) in sims } -def filter_meas(run: str = None, rad_um: int = None, drive: float = None, couplings: int = None, wrappings: int = None) -> list: +def matches(actual, expected) -> bool: + return expected == None or actual == expected + +def filter_meas(run: str = None, rad_um: int = None, drive: float = None, couplings: int = None, wrappings: int = None, viable_inverter = None) -> list: """ return only that set of (SimParams, Piecewise) which matches the given criteria. leave any option as `None` to not filter on it. @@ -147,7 +152,8 @@ def filter_meas(run: str = None, rad_um: int = None, drive: float = None, coupli (p, get_meas(p)) for (p, _, _) in sims if p.matches(run, rad_um, drive, couplings, wrappings) \ and get_meas(p) \ - and get_meas(p).num_pieces > 0 + and get_meas(p).num_pieces > 0 \ + and matches(get_meas(p).logically_inverted().is_viable_inverter(), viable_inverter) ], key = lambda v: v[0].tuple ) @@ -1533,7 +1539,9 @@ Piecewise( [ -327, -12941 ], # 0.15 [ 1794, -11684 ], # 0.17 [ 4975, -9524 ], # 0.2 + [ 7093, -7868 ], # 0.22 [ 10263, -5050 ], # 0.25 + [ 12345, -3038 ], # 0.27 [ 15184, -54 ], # 0.3 [ 16971, 1553 ], # 0.5 [ 17049, 1613 ], # 0.8 diff --git a/crates/applications/stacked_cores/src/main.rs b/crates/applications/stacked_cores/src/main.rs index 1c0b8b0..833b025 100644 --- a/crates/applications/stacked_cores/src/main.rs +++ b/crates/applications/stacked_cores/src/main.rs @@ -4058,27 +4058,30 @@ fn main() { ][..], ] { for (coupling_loops, s0_loops, s_major, cur_flt) in [ - (9, 1, um(400), 5e9), // incomplete; good tx 0; not enough samples + (18, 1, um(600), 1e10), // unstarted + (18, 1, um(600), 2e10), // unstarted (10, 3, um(800), 1e10), // incomplete; verified geom; too low slope // VIABLE INVERTERS from 40xx, modified for new control - (9, 1, um(400), 1e10), // incomplete; VIABLE INVERTER - (12, 2, um(600), 1e10), // incomplete; VIABLE INVERTER - (10, 3, um(800), 2e10), // incomplete; VIABLE INVERTER; verified geom - (6, 2, um(400), 1e10), // incomplete; VIABLE INVERTER - (9, 3, um(600), 2e10), // incomplete; VIABLE INVERTER + (9, 1, um(400), 1e10), // incomplete; VIABLE INVERTER (0.59, 0.88) + (12, 2, um(600), 1e10), // incomplete; VIABLE INVERTER (0.65, 0.90) + (10, 3, um(800), 2e10), // incomplete; VIABLE INVERTER (0.76, 0.83); verified geom + (6, 2, um(400), 1e10), // incomplete; VIABLE INVERTER (0.65, 0.83) + (9, 3, um(600), 2e10), // incomplete; VIABLE INVERTER (0.77, 0.87) + + // (9, 1, um(400), 5e9), // incomplete; barely too low slope // (9, 1, um(400), 2e10), // incomplete; too low tx // (9, 3, um(600), 1e10), // incomplete; too low slope - // (9, 3, um(600), 3e9), // incomplete; too low slope; too high tx @ 0 - // (9, 1, um(400), 3e9), // incomplete; too low slope; too high tx @ 0 + // (9, 3, um(600), 3e9), // incomplete; too low slope; too high tx @ 0 + // (9, 1, um(400), 3e9), // incomplete; too low slope; too high tx @ 0 // (10, 3, um(800), 25e8), // incomplete; verified geom; too low slope; too high tx @ 0 - // (9, 1, um(400), 2e9), // incomplete; too low slope; too high tx @ 0 - // (10, 3, um(800), 2e9), // unstarted; verified geom. too low current - // (10, 3, um(800), 3e9), // incomplete; verified geom. mildly high current - // (10, 3, um(800), 1e9), // incomplete; verified geom. too low current - // (10, 3, um(800), 5e9), // incomplete; verified geom. too high current + // (9, 1, um(400), 2e9), // incomplete; too low slope; too high tx @ 0 + // (10, 3, um(800), 2e9), // unstarted; verified geom. too low current + // (10, 3, um(800), 3e9), // incomplete; verified geom. mildly high current + // (10, 3, um(800), 1e9), // incomplete; verified geom. too low current + // (10, 3, um(800), 5e9), // incomplete; verified geom. too high current // (10, 3, um(800), 5e10), // incomplete; verified geom. too high current ] { for &init_flt in init_set {