aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-09-07 21:44:16 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-09-07 21:44:16 +0200
commit6ea743740ff4524287e5b63a18a45bd19d2451bb (patch)
treed14ec9c5b580450b8e2db2b115be85aea48afc42 /src/ee/tools
parenta3da99e22540c026e4acf7bdc735aa221a4dd752 (diff)
downloadee-python-6ea743740ff4524287e5b63a18a45bd19d2451bb.tar.gz
ee-python-6ea743740ff4524287e5b63a18a45bd19d2451bb.tar.bz2
ee-python-6ea743740ff4524287e5b63a18a45bd19d2451bb.tar.xz
ee-python-6ea743740ff4524287e5b63a18a45bd19d2451bb.zip
o Reformat all.
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")