Skip to main content

Scope toolbox for documentation purposes and comparisons

pySignalScope processes and compares time domain data similar to oscilloscopes in electronics. Signals can be filtered, derived, integrated or evaluated. Furthermore, pySignalScope includes a module for evaluating and editing the impedance curves of an impedance analyzer or comparing them with the simulation. The main purpose is the quick and easy evaluation of signals, as well as the targeted generation of images for technical documentation. Some examples are:

  • Bachelor / Master / Ph.D. theses,

  • Scientific papers,

  • Technical manuals, and

  • Measurement reports.

Overview

Bring measurements from the oscilloscope and the circuit simulator into a standardized Channel format. Edit the signals by using the Scope functionality: shifting them in time (different zero points) or define the zero point for measuring equipment that can only record AC. Calculate the FFT or important values such as RMS, mean etc. Bring the originally different input formats into common plots to make comparisons easy.

With the Impedance functionality, ImpedanceChannels can be read in, edited and compared. A conversion to e.g. the inductance value is possible with just one command.

https://raw.githubusercontent.com/upb-lea/pySignalScope/main/docs/source/figures/introduction.png

Getting started

Install this repository into your virtual environment (venv) or jupyter notebook:

pip install pysignalscope

Use the toolbox in your python program:

import pysignalscope as pss
...

Example usage

pySignalScope helps to load, edit, display and analyze the signals. The following application example loads a noisy measurement signal, which is first filtered.

import pysignalscope as pss

# Read curves from scope csv file
[voltage_prim, voltage_sec, current_prim, current_sec] = pss.Scope.from_tektronix('scope_example_data_tek.csv')

# Add labels and units to channel: This example considers the Channel 'current_prim' only
current_prim = pss.Scope.modify(current_prim, label='current measured', unit='A', color='red')

# Low pass filter the noisy current signal, modify the Channel attributes label, color and linestyle
current_prim_filtered = pss.Scope.low_pass_filter(current_prim)
current_prim_filtered = pss.Scope.modify(current_prim_filtered, label='current filtered', linestyle='--', color='green')

# Make some modifications on the signal itself: data offset, time offset and factor to the data.
# Short the channel to one period and add label, color and linestyle to the Channel
current_prim_filtered_mod = pss.Scope.modify(current_prim_filtered, data_factor=1.3, data_offset=11, time_shift=2.5e-6)
current_prim_filtered_mod = pss.Scope.short_to_period(current_prim_filtered_mod, f0=200000)
current_prim_filtered_mod = pss.Scope.modify(current_prim_filtered_mod, label='current modified', linestyle='-', color='orange')

# Plot channels, save as pdf
fig1 = pss.Scope.plot_channels([current_prim, current_prim_filtered], [current_prim_filtered_mod], timebase='us')
pss.save_figure(fig1, 'figure.pdf')

# short channels to a single period, perform FFT for current waveforms
current_prim = pss.Scope.short_to_period(current_prim, f0=200000)
current_prim = pss.Scope.modify(current_prim, time_shift=5e-6)
pss.Scope.fft(current_prim)

To simplify the display, colors, linestyle and the label can be attached to the object. This is shown in the plot above.

The lower plot shows the post-processing of the filtered signal. This is multiplied by a small gain, provided with an offset and shortened to a period duration. The label, color and line style are changed. The signals are then plotted with just one plot command.

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

The functionality for the Impedance module is similar to the Scope module. 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. ImpedanceChannel objects can be modified in attributes and data, plotted and equivalent circuit parameters can be obtained from measurements.

https://raw.githubusercontent.com/upb-lea/pySignalScope/main/docs/source/figures/impedance_function_overview.png

Have a look at the Scope example and at the Impedance example to see what you can do with this toolbox.

Naming convention

This toolbox is divided into two modules: The functionality of an oscilloscope (Scope) and the functionality of an impedance analyzer (Impedance).

Scope

The Scope module provides functionalities for editing and evaluating individual channels that are also provided by a real oscilloscope - just on a PC. Scope creates, imports, edits or evaluates Channels. The following prefixes apply:

  • generate_: Generates a new Channel

  • no prefix: Is applied to a Channel and results in a new Channel (e.g. add() adds two channels)

  • from_: Generates a Channel from an oscilloscope data set, a simulation program or a calculation (e.g. from_tektronix generates a Channel from a tektronix scope file)

  • calc_: Calculates individual values from a Channel (e.g. calc_rms() calculates the RMS from a given Channel)

  • plot_: Plots channels in the desired arrangement (e.g. plot_channels() plots the given Channels)

Impedance

The Impedance module provides functionalities to evaluate impedance curves. Impedance creates, imports, edits or evaluates ImpedanceChannel.

  • generate_: Generates a new ImpedanceChannel

  • no prefix: Is applied to a ImpedanceChannel and results in a new ImpedanceChannel (e.g. modify() modifies an ImpedanceChannel)

  • from_: Generates a ImpedanceChannel from an impedance analyzer data set, a simulation program or a calculation (e.g. from_waynekerr generates a ImpedanceChannel from a real measurement file)

  • calc_: Calculates individual values from a ImpedanceChannel (e.g. calc_rlc() calculates the equivalent resistance, inductance and capacitance)

  • plot_: Plots ImpedanceChannel (e.g. plot_impedance() plots the given ImpedanceChannels)

Documentation

Find the documentation here.

Bug Reports

Please use the issues report button within GitHub to report bugs.

Changelog

Find the changelog here.

Metadata

Release files for pysignalscope 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysignalscope 0.2.1
File Size Uploaded Provenance
pysignalscope-0.2.1.tar.gz 6.5 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pysignalscope 0.2.1
File Interpreter ABI Platform
pysignalscope-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 MB

Release files / pysignalscope-0.2.1.tar.gz

Download URL pysignalscope-0.2.1.tar.gz
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
b337ab3409d5372c14e7c727ff6ee362a2eaa6d52a1deb1f26ebbfaebd276c83
BLAKE2b-256 checksum
How to use checksums
44635d4f2d263477e923413b207d768dcb93770e4b07d36d6cdfd01388725ad9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.21

Release files / pysignalscope-0.2.1-py3-none-any.whl

Download URL pysignalscope-0.2.1-py3-none-any.whl
Size 37.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5dc67113c77c5fec98d287cbb40e7a6b0d1c3c713a1f6b0efd4c5fb500eb2e9
BLAKE2b-256 checksum
How to use checksums
adb44a4bec0b76854a1f4211ae3242273287ff9304898bbd4808d66627a7e032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.21

Security for pysignalscope 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page