From 99c240a1c69da19813c50f167cd51456208479d2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 14 Jul 2026 12:20:20 -0700 Subject: backup before big change --- MIL_testing/spice_backend.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'MIL_testing/spice_backend.py') diff --git a/MIL_testing/spice_backend.py b/MIL_testing/spice_backend.py index 674ae30..c6be8a1 100644 --- a/MIL_testing/spice_backend.py +++ b/MIL_testing/spice_backend.py @@ -1,5 +1,6 @@ import subprocess import re +from spicelib import RawRead class SpiceBackend: """This is what actually does all of the spice stuff""" @@ -8,6 +9,8 @@ class SpiceBackend: self.voltage = 0 self.current = 0 self.time = 0 + self.state = None + self.dt = 1e-9 def simulate(self, voltage_signal: float, return_current: bool = False) -> float: """runs the simulation for one time step""" @@ -43,7 +46,7 @@ class SpiceBackend: #need to find a way to pass voltage signal to ngspice here #also maybe a time series resolution?? result = subprocess.run( - ["ngspice" "-b" "spicefile.cir"], + ["ngspice" "-b" "simulation.cir"], capture_output=True, text=True ) -- cgit v1.2.3