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 48b8846..8ae6d50 100755 --- a/crates/applications/stacked_cores/scripts/stacked_cores_40xx_db.py +++ b/crates/applications/stacked_cores/scripts/stacked_cores_40xx_db.py @@ -5,6 +5,11 @@ from inverter_characteristics import Piecewise import subprocess import sys +# these floats can't be represented as f32, so stringify bad on the rust side +_15e9 = "15000000512e0" +_3e10 = "30000001024e0" +_15e10 = "149999992832e0" + class SimParams: def __init__(self, couplings: int, wrappings_spec: int, um: int, drive: str) -> str: self.couplings = couplings @@ -181,7 +186,7 @@ sims = [ (SimParams41(9, 1, 400, "8e9"), None, 20000), (SimParams41(9, 1, 400, "1e10"), None, 20000), (SimParams41(9, 1, 400, "12e9"), None, 20000), - (SimParams41(9, 1, 400, "15000000512e0"), None, 20000), # 15e9, but badly formatted T_T + (SimParams41(9, 1, 400, _15e9), None, 20000), (SimParams41(9, 1, 400, "2e10"), None, 20000), (SimParams41(6, 2, 400, "5e9"), None, 20000), (SimParams41(6, 2, 400, "1e10"), None, 20000), @@ -219,21 +224,21 @@ sims = [ (SimParams42(9, 1, 400, "8e9"), None, 20000), (SimParams42(9, 1, 400, "1e10"), None, 20000), (SimParams42(9, 1, 400, "12e9"), None, 20000), - (SimParams42(9, 1, 400, "15000000512e0"), None, 20000), # 15e9, but badly formatted T_T + (SimParams42(9, 1, 400, _15e9), None, 20000), (SimParams42(9, 1, 400, "2e10"), None, 20000), (SimParams42(6, 2, 400, "1e10"), None, 20000), - (SimParams42(6, 2, 400, "15000000512e0"), None, 20000), # 15e9 + (SimParams42(6, 2, 400, _15e9), None, 20000), (SimParams42(6, 2, 400, "2e10"), None, 20000), - (SimParams42(6, 2, 400, "30000001024e0"), None, 20000), # 3e10 + (SimParams42(6, 2, 400, _3e10), None, 20000), (SimParams42(4, 3, 400, "1e10"), None, 20000), - (SimParams42(4, 3, 400, "15000000512e0"), None, 20000), # 15e9 + (SimParams42(4, 3, 400, _15e9), None, 20000), (SimParams42(4, 3, 400, "2e10"), None, 20000), - (SimParams42(4, 3, 400, "30000001024e0"), None, 20000), # 3e10 + (SimParams42(4, 3, 400, _3e10), None, 20000), (SimParams42(2, 6, 400, "2e10"), None, 20000), - (SimParams42(2, 6, 400, "30000001024e0"), None, 20000), # 3e10 + (SimParams42(2, 6, 400, _3e10), None, 20000), (SimParams42(2, 6, 400, "4e10"), None, 20000), (SimParams42(2, 6, 400, "8e10"), None, 20000), - (SimParams42(2, 6, 400, "149999992832e0"), None, 20000), # 15e10 + (SimParams42(2, 6, 400, _15e10), None, 20000), (SimParams43(2, 3, 400, "1e10"), None, 20000), (SimParams43(2, 3, 400, "2e10"), None, 20000), @@ -242,13 +247,13 @@ sims = [ (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, "30000001024e0"), None, 20000), + (SimParams43(3, 2, 400, _3e10), None, 20000), (SimParams43(5, 1, 400, "2e9"), None, 20000), (SimParams43(5, 1, 400, "3e9"), None, 20000), (SimParams43(5, 1, 400, "5e9"), None, 20000), (SimParams43(5, 1, 400, "8e9"), None, 20000), (SimParams43(5, 1, 400, "1e10"), None, 20000), - (SimParams43(5, 1, 400, "149999992832e0"), None, 20000), # 15e10 + (SimParams43(5, 1, 400, _15e10), None, 20000), (SimParams43(5, 1, 400, "2e10"), None, 20000), (SimParams43(5, 1, 400, "4e10"), None, 20000), (SimParams43(7, 1, 600, "3e9"), None, 20000), @@ -257,7 +262,7 @@ sims = [ (SimParams43(7, 1, 600, "2e10"), None, 20000), (SimParams43(4, 2, 600, "1e10"), None, 20000), (SimParams43(4, 2, 600, "2e10"), None, 20000), - (SimParams43(4, 2, 600, "30000001024e0"), None, 20000), # 3e10 + (SimParams43(4, 2, 600, _3e10), None, 20000), (SimParams46(5, 1, 400, "5e9"), None, 20000), (SimParams46(5, 1, 400, "8e9"), None, 20000),