aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/tools')
-rwxr-xr-xsrc/ee/tools/kicad_gerber.py9
-rw-r--r--src/ee/tools/read_ltspice_raw.py16
2 files changed, 15 insertions, 10 deletions
diff --git a/src/ee/tools/kicad_gerber.py b/src/ee/tools/kicad_gerber.py
index e8604b8..be0e34d 100755
--- a/src/ee/tools/kicad_gerber.py
+++ b/src/ee/tools/kicad_gerber.py
@@ -164,11 +164,14 @@ for plan in plot_plan:
if args.detect_files_only:
for plan in plot_plan:
- print plan.filename
+ print
+ plan.filename
if args.protel_extensions:
- print drlFileOut
- print drlNpthFileOut
+ print
+ drlFileOut
+ print
+ drlNpthFileOut
sys.exit(0)
# Set some important plot options:
diff --git a/src/ee/tools/read_ltspice_raw.py b/src/ee/tools/read_ltspice_raw.py
index 279fe73..f04abb0 100644
--- a/src/ee/tools/read_ltspice_raw.py
+++ b/src/ee/tools/read_ltspice_raw.py
@@ -3,24 +3,26 @@ import sys
raw = ee.read_ltspice_raw(sys.argv[1])
-#print("Variables:")
-#for i, v in enumerate(raw.variables):
+# print("Variables:")
+# for i, v in enumerate(raw.variables):
# print("{:2}: kind: {:20} expression: {}".format(i, v.kind, v.expression))
-#for i, v in enumerate(raw.variables):
+# for i, v in enumerate(raw.variables):
# print("{:2}: kind: {:20} expression: {}".format(i, v.kind, v.expression))
# for p in raw.values[i]:
# print(" {}".format(p))
-x = raw.get_variable(idx = 0)
-y = raw.get_variable(expression = 'V(load)')
+x = raw.get_variable(idx=0)
+y = raw.get_variable(expression='V(load)')
xs = raw.get_values(y)
import matplotlib
-matplotlib.use('Agg')
+
+matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter, MaxNLocator
+
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(xs)
@@ -28,4 +30,4 @@ ax.set_xlabel(x.expression)
ax.set_ylabel(y.expression)
with open("ltspice.png", "wb") as f:
- plt.savefig(f, format="png")
+ plt.savefig(f, format="png")