Skip to content

Commit 8a28327

Browse files
authored
Merge pull request #29 from upb-lea/docs
Misc
2 parents fd42d7f + 70d0dcd commit 8a28327

File tree

9 files changed

+8216
-25
lines changed

9 files changed

+8216
-25
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*.geo_unrolled
1616
*.db
1717
*.sqlite3
18+
*.pkl
1819

1920
# Folders
2021
.idea/
@@ -23,4 +24,3 @@ gpgit/
2324
build/
2425
dist/
2526
.eggs/
26-

README.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,37 @@ Example usage
4343
-------------
4444
pySignalScope helps to load, edit, display and analyze the signals.
4545
The following application example loads a noisy measurement signal, which is first filtered.
46+
47+
48+
::
49+
50+
import pysignalscope as pss
51+
52+
# Read curves from scope csv file
53+
[voltage_prim, voltage_sec, current_prim, current_sec] = pss.Scope.from_tektronix('scope_example_data_tek.csv')
54+
55+
# Add labels and units to channel: This example considers the Channel 'current_prim' only
56+
current_prim = pss.Scope.modify(current_prim, label='current measured', unit='A', color='red')
57+
58+
# Low pass filter the noisy current signal, modify the Channel attributes label, color and linestyle
59+
current_prim_filtered = pss.Scope.low_pass_filter(current_prim)
60+
current_prim_filtered = pss.Scope.modify(current_prim_filtered, label='current filtered', linestyle='--', color='green')
61+
62+
# Make some modifications on the signal itself: data offset, time offset and factor to the data.
63+
# Short the channel to one period and add label, color and linestyle to the Channel
64+
current_prim_filtered_mod = pss.Scope.modify(current_prim_filtered, data_factor=1.3, data_offset=11, time_shift=2.5e-6)
65+
current_prim_filtered_mod = pss.Scope.short_to_period(current_prim_filtered_mod, f0=200000)
66+
current_prim_filtered_mod = pss.Scope.modify(current_prim_filtered_mod, label='current modified', linestyle='-', color='orange')
67+
68+
# Plot channels, save as pdf
69+
fig1 = pss.Scope.plot_channels([current_prim, current_prim_filtered], [current_prim_filtered_mod], timebase='us')
70+
pss.save_figure(fig1, 'figure.pdf')
71+
72+
# short channels to a single period, perform FFT for current waveforms
73+
current_prim = pss.Scope.short_to_period(current_prim, f0=200000)
74+
current_prim = pss.Scope.modify(current_prim, time_shift=5e-6)
75+
pss.Scope.fft(current_prim)
76+
4677
To simplify the display, colors, linestyle and the label can be attached to the object.
4778
This is shown in the plot above.
4879

@@ -53,6 +84,12 @@ The signals are then plotted with just one plot command.
5384

5485
.. image:: https://raw.githubusercontent.com/upb-lea/pySignalScope/main/docs/source/figures/function_overview.png
5586

87+
The functionality for the Impedance module is similar to the Scope module.
88+
In here, ``ImpedanceChannel`` objects can be loaded from different sources, which can be a ``.csv`` measurement file from an impedance analyzer or a computer generated curve.
89+
``ImpedanceChannel`` objects can be modified in attributes and data, plotted and equivalent circuit parameters can be obtained from measurements.
90+
91+
.. image:: https://raw.githubusercontent.com/upb-lea/pySignalScope/main/docs/source/figures/impedance_function_overview.png
92+
5693
Have a look at the `Scope example <https://github.com/upb-lea/pySignalScope/blob/main/examples/scope_example.py>`__ and at the `Impedance example <https://github.com/upb-lea/pySignalScope/blob/main/examples/impedance_example.py>`__ to see what you can do with this toolbox.
5794

5895
Naming convention
674 KB
Loading

0 commit comments

Comments
 (0)