diff options
| author | Your Name <[email protected]> | 2026-07-14 12:20:20 -0700 |
|---|---|---|
| committer | Your Name <[email protected]> | 2026-07-14 21:04:43 -0700 |
| commit | 99c240a1c69da19813c50f167cd51456208479d2 (patch) | |
| tree | 958d1d99fa8ab24d84f42de4fe18021e7dff1a4d /MIL_testing/spice_backend.py | |
| parent | 4f36a1654ff6560c915a39e1f9999e0efc4a9680 (diff) | |
backup before big change
Diffstat (limited to 'MIL_testing/spice_backend.py')
| -rw-r--r-- | MIL_testing/spice_backend.py | 5 |
1 files changed, 4 insertions, 1 deletions
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 ) |
