Skip to content

Commit 4e8ce02

Browse files
committed
Metadata getters added to IsmImport
Further getters for metadata have been added and attributes refactored.
1 parent 5958d9e commit 4e8ce02

File tree

82 files changed

+8042
-8151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+8042
-8151
lines changed

Examples/BasicIntroduction/BasicIntroduction.ipynb

Lines changed: 99 additions & 24 deletions
Large diffs are not rendered by default.

Examples/BasicIntroduction/BasicIntroduction.py

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,50 @@
33
from zahner_analysis.file_import.ism_import import IsmImport
44
import matplotlib.pyplot as plt
55

6-
if __name__ == "__main__":
7-
impedanceCircuitModel = IsfxModelImport("rc-model.isfx")
8-
impedanceData = IsmImport("rc-data.ism")
6+
impedanceCircuitModel = IsfxModelImport("rc-model.isfx")
7+
impedanceData = IsmImport("rc-data.ism")
98

10-
print(impedanceCircuitModel)
9+
print(impedanceCircuitModel)
1110

12-
fitting = EisFitting()
11+
fitting = EisFitting()
1312

14-
fittingResult = fitting.fit(impedanceCircuitModel, impedanceData)
13+
fittingResult = fitting.fit(impedanceCircuitModel, impedanceData)
1514

16-
print(fittingResult)
15+
print(fittingResult)
1716

18-
foldername = "fit_results"
19-
fittingResult.save(foldername=foldername)
17+
foldername = "fit_results"
18+
fittingResult.save(foldername=foldername)
2019

21-
(fig2, (impedanceAxis2, phaseAxis2)) = EisFittingPlotter.plotBode(fittingResult)
20+
(fig2, (impedanceAxis2, phaseAxis2)) = EisFittingPlotter.plotBode(fittingResult)
2221

23-
impedanceAxis2.legend(
24-
impedanceAxis2.get_lines() + phaseAxis2.get_lines(),
25-
2 * ["Measured Data", "Fitted Model"],
26-
)
22+
impedanceAxis2.legend(
23+
impedanceAxis2.get_lines() + phaseAxis2.get_lines(),
24+
2 * ["Measured Data", "Fitted Model"],
25+
)
2726

28-
fig2.set_size_inches(18, 10)
29-
plt.show()
27+
fig2.set_size_inches(18, 10)
28+
plt.show()
3029

31-
fig2.savefig(f"{foldername}/bode.svg")
30+
fig2.savefig(f"{foldername}/bode.svg")
3231

33-
fittetModel = fittingResult.getFittedModel()
32+
fittetModel = fittingResult.getFittedModel()
33+
34+
print(
35+
f"{fittetModel['C0'].getType()}: {fittetModel['C0']['C'].getValue():1.3e} {fittetModel['C0']['C'].getUnit()}"
36+
)
37+
print(
38+
f"{fittetModel['R0'].getType()}: {fittetModel['R0']['R'].getValue():1.3e} {fittetModel['R0']['R'].getUnit()}"
39+
)
40+
41+
print(f"System: {impedanceData.getSystemString()}")
42+
print(f"Voltage: {impedanceData.getStartVoltageString()}")
43+
print(f"Current: {impedanceData.getStartCurrentString()}")
44+
print(f"Temperature: {impedanceData.getStartTemperatureString()}")
45+
print(f"Time window: {impedanceData.getTimeWindowString()}")
46+
print(f"Comment: {impedanceData.getCommentStrings()}")
47+
print(f"Amplitude: {impedanceData.getAmplitude()}")
48+
49+
for track in impedanceData.getTrackTypesList():
50+
print(track)
51+
print(impedanceData.getTrack(track)[0:3])
3452

35-
print(
36-
f"{fittetModel['C0'].getType()}: {fittetModel['C0']['C'].getValue():1.3e} {fittetModel['C0']['C'].getUnit()}"
37-
)
38-
print(
39-
f"{fittetModel['R0'].getType()}: {fittetModel['R0']['R'].getValue():1.3e} {fittetModel['R0']['R'].getUnit()}"
40-
)

0 commit comments

Comments
 (0)