Compare commits

...

3 Commits

4 changed files with 3200 additions and 3122 deletions

View File

@ -156,6 +156,8 @@ _48xx_study = [(p, get_meas(p)) for p in
SimParams48(5e2, 5e3, 1000, 50, 9, 1, 400, "1e10"),
# # y0=0.60, slope0=0.96
# SimParams48(5e2, 5e3, 1000, 50, 9, 1, 400, "2e10"),
# y0=0.63, slope0=1.0 until x=0.15
SimParams48(1e3, 1e4, 2000, 100, 9, 1, 400, "2e10"),
# y0=0.57, slope0=1.25 until x=0.30
SimParams48(1e3, 1e4, 2000, 100, 9, 1, 400, "1e10"),
# y0=0.47, slope0=1.1 until x=0.30

View File

@ -28,15 +28,16 @@ def extract_one(path: str, t_first: float, t_last: float, t_mid: float = None):
def extract_polarity(stem: str) -> float:
s = None
if re.search("-p\d\d\d", stem):
s = re.search("-p\d\d\d", stem).group(0)
if re.search("-n\d\d\d", stem):
s = re.search("-n\d\d\d", stem).group(0)
if re.search("-p\d\d\d\d?", stem):
s = re.search("-p\d\d\d\d?", stem).group(0)
if re.search("-n\d\d\d\d?", stem):
s = re.search("-n\d\d\d\d?", stem).group(0)
if s:
sign = {'n': -1, 'p': 1}[s[1]]
mag = int(s[2:])
return sign * mag * 0.01
max_mag = 10**(len(s[2:]) - 1)
return sign * mag / max_mag
if "-000" in stem:
return 0.00
@ -61,7 +62,7 @@ def extract_39xx(base_path: str, t_first: str = "2e-9", t_last: str = "3e-9", t_
for i, (o, polarity, mid) in sorted(mappings.items()):
comments = []
if polarity is not None:
comments += [f"{polarity:= 04.2f}"]
comments += [f"{polarity:= 05.3f}"]
for core, val in enumerate(mid):
comments += [f"M{core+1}={val:5}"]

View File

@ -1340,13 +1340,19 @@ fn asymmetric_inverter_name_v2(p: &Params, sim_id: &str, ctl_loops: u32, couplin
/// v3 has coupling_loops specified externally,
/// and encodes conductivities + clocks
fn asymmetric_inverter_name_v3(p: &Params, sim_id: &str, ctl_loops: u32, coupling_loops: u32, windings: u32, init_flt: f32) -> String {
let init_int = (init_flt.abs() * 100.0 + 0.5) as u32;
let init_level = if init_flt > 0.0 {
format!("p{init_int:03}")
} else if init_flt < 0.0 {
format!("n{init_int:03}")
let init_int = (init_flt.abs() * 1000.0 + 0.5) as u32;
let init_int_str = if init_int % 10 == 0 {
format!("{:03}", init_int / 10)
} else {
"000".to_owned()
format!("{:04}", init_int)
};
let init_level = if init_flt > 0.0 {
format!("p{init_int_str}")
} else if init_flt < 0.0 {
format!("n{init_int_str}")
} else {
init_int_str
};
let s_major = p.s_major;
@ -5108,11 +5114,33 @@ fn main() {
// -0.09,
// -0.08,
// targeted for (5e2, 5e3, ps(1000), ps(50), 9, 1, um(400), 2e10)
// -0.08,
// -0.06,
// -0.04,
// -0.03,
// -0.07,
// -0.08,
// -0.09,
// -0.11,
// -0.02,
// -0.01,
// -0.01,
// 0.02,
// 0.03,
// 0.04,
// 0.05,
-0.055,
-0.045,
-0.043,
-0.053,
-0.052,
-0.041,
-0.054,
-0.051,
-0.049,
-0.057,
-0.047,
-0.042,
-0.038,
-0.035,
// targeted for (1e3, 1e4, ps(2000), ps(100), 9, 1, um(400), 1e10)
// -0.08,
// -0.09,
@ -5258,11 +5286,11 @@ fn main() {
// -0.23,
][..],
&[
-0.20,
-0.05,
0.00,
-0.10,
-0.05,
-0.15,
-0.20,
// -0.35,
// -0.50,
// -0.25,
@ -5327,6 +5355,7 @@ fn main() {
// (5e2, 1e4, ps(1000), ps(50), 9, 1, um(400), 2e10), // complete. y0=0.66, slope0=1.2
// (5e2, 5e3, ps(1000), ps(50), 9, 1, um(400), 1e10), // complete. y0=0.55, slope0=1.2
// (1e3, 1e4, ps(2000), ps(100), 9, 1, um(400), 1e10), // incomplete. y0=0.57, slope0=1.2
(1e3, 1e4, ps(2000), ps(100), 9, 1, um(400), 2e10), // complete. y0=0.63, slope0=1.0
// (5e2, 1e4, ps(1000), ps(50), 9, 1, um(400), 5e9), // complete. y=0.52. slope0=1.3
// (5e2, 5e3, ps(1000), ps(50), 9, 1, um(400), 2e10), // complete. y0=0.60. slope=0.96