Project designed to create and analyze sweep signals.
Project description
sweep-design
Simple way to create sweep signal.
The project is intended for designing sweep signals.
The package is intended to create and develop sweep signals of varying complexity.
The project can be used both for educational and work purposes.
It is convenient to use Jupyter Lab or
Jupyter Notebook to speed up the development
of signals, to compare their parameters with other signals,
and to visualize them.
The project is designed so that you can easily change the creation of sweep signals. For example, write your own methods describing how the frequency and amplitude will change from the time of the sweep signal.
The project was made to be able to create various sweep signals: implemented and not implemented by a vibration source, from simple ones, like a linear sweep signal, to complex ones, like a pseudo-random sweep signal.
Tools have been written with which unrealizable sweep signals could be made realizable.
In addition, documentation consist tutorial how to work with library and examples of ready-made sweeps. You can write own sweep creation.
Installation
To install use:
$ pip install sweep-design
or using poetry
$ poetry add sweep-design
Also you can clone or load project from GitHub, and install requirement packages using the
$ pip install -r requirement.txt
or if you want develop, use
$ pip install -r requirement-dev.txt
or
$ poetry install
or coping pieces of code and create your own.
Usage
The project is a library. Working with it is the same as with
other third-part libraries of the python language.
An example of how to include the library is described
here.
The library consists sub-modules:
sweep_design.config- contains the project configurationConfigandSweepConfig.sweep_design.defaults- contains default methods to calculate.sweep_design.prepared_sweep- contains sweep signal templates.sweep_design.utility_functions- contains function to work with signals.sweep_design.core- contains basic classesMathOperationandRelationProtocol.sweep_design.exc- contains exceptions.sweep_design.axis- contains classArrayAxissweep_design.relation- contains classRelationsweep_design.signal- contains classSignalsweep_design.spectrum- contains classSpectrumsweep_design.sweep- contains classSweepsweep_design.uncalculated- contains classesUncalculatedSweepandApriorUncalculatedSweepsweep_design.spectrogram- contains classesSpectrogram
For convenient base classes:
ArrayAxis, Relation, Signal, Spectrum, Sweep, UncalculatedSweep,
ApriorUncalculatedSweep, Config, ConfigSweep - can be imported from
a sweep_design module.
For example:
from sweep_design import Signal
Utility functions can be imported from sweep_design.utility_functions.
And prepared sweep - from sweep_design.prepared_sweep.
Quick start. Simple work flow.
Below is a simple example of creating a sweep signal and visualizing it. A more extended description of the work of the library in the documentation. Other examples are contained in the examples contains in Tutorial and Prepared sweep sections.
For the following code Matplotlib need be used
to visualize a result of work. But Matplotlib can be replaced with another
library that you use.
import matplotlib.pyplot as plt
from sweep_design import ArrayAxis, UncalculatedSweep
time = ArrayAxis(start=0., end=10., sample=0.01)
usw = UncalculatedSweep(time=time)
sw = usw()
t_sw, a_sw = sw.get_data()
plt.plot(t_sw, a_sw)
plt.xlabel('Time, s')
plt.ylabel('Amplitude')
plt.title('Sweep-signal')
Result:
Credits
sweep-design was created with
numpy
scipy
EMD-signal
TODO
- Merge array axis.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sweep_design-0.3.1.tar.gz.
File metadata
- Download URL: sweep_design-0.3.1.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
937964d6dca34a6671f98076fcd86bcbaa89a00d6fbf9b5ca62db4ac0d428eb0
|
|
| MD5 |
c4ecb2f11cc64f87f2c3af1052c68096
|
|
| BLAKE2b-256 |
ee9c8c2fc7bdbdf24883205f48d7436dea38f686dbe48d04129b2bcbf593f70b
|
File details
Details for the file sweep_design-0.3.1-py3-none-any.whl.
File metadata
- Download URL: sweep_design-0.3.1-py3-none-any.whl
- Upload date:
- Size: 40.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8228e5ed5a1d6d8f20cf93b2f5e316e404ce4c384c6359dbb64613375a0f6b17
|
|
| MD5 |
3baaaa829e06e345dbd22821b6c7b4ee
|
|
| BLAKE2b-256 |
4fb9a0a5c66f7d5781d541c2d43ec8613f8fb8f9d94afb218bb3d3ba552f201f
|