-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathusage.py
28 lines (24 loc) · 906 Bytes
/
usage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import gamry_parser as parser
import random
file = "tests/cv_data.dta"
gp = parser.GamryParser()
gp.load(filename=file)
print("GamryParser() usage:")
print("experiment type: {}".format(gp.experiment_type))
print("loaded curves: {}".format(gp.curve_count))
curve_index = random.randint(1, gp.curve_count)
print("showing curve #{}".format(curve_index))
print(gp.curve(curve_index))
cv = parser.CyclicVoltammetry(filename=file)
cv.load()
vrange = cv.v_range
print("\nCyclic Voltammetry class")
print("Programmed Scan Rate: {} mV/s".format(cv.scan_rate))
print("Programmed V range: [{}, {}] V".format(vrange[0], vrange[1]))
print(
"\tnote: range will not match with below; the raw file has been modified for faster test execution"
)
curve = cv.curve(curve_index)
print("showing curve #{}".format(curve_index))
print("Acheived V range: [{}, {}]".format(min(curve["Vf"]), max(curve["Vf"])))
print(curve)