The project for creation and analysis signals.
Project description
signal-design
Simple way to create signals.
The project is intended for designing signals.
The package is intended to create and develop 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 signals.
In addition, documentation consist tutorial how to work with library and examples of ready-made signals. You can write own signal creation.
Installation
To install use:
$ pip install signal-design
or using poetry
$ poetry add signal-design
Also you can clone or load project from GitHub, and install requirement packages using the
$ pip install -r requirements/build.txt
or if you want develop, use
$ pip install -r requirements/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:
signal_design.core
- contains basic classesMathOperation
andRelationProtocol
.signal_design.exc
- contains exceptions.signal_design.axis
- contains classAxis
signal_design.relation
- contains classRelation
signal_design.signal
- contains classSignal
signal_design.spectrum
- contains classSpectrum
signal_design.default_methods
- contains default methods for class above.
For convenient base classes:
Axis
, Relation
, Signal
, Spectrum
- can be imported from
the signal_design
module.
For example:
from signal_design import Signal
Quick start. Simple work flow.
Below is a simple example of creating a signal and visualizing it. A more extended description of the work of the library in the documentation. Other examples are contained in the documentation contains in Tutorial section.
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 numpy as np
import matplotlib.pyplot as plt
from signal_design import Axis, Signal
time = Axis.get_using_end(start=0., end=10., sample=0.01)
amplitude = np.sin(2*np.pi*time.array)
signal = Signal(time, amplitude)
plt.plot(*signal.get_data())
plt.xlabel('Time, s')
plt.ylabel('Amplitude')
plt.title('Sin 1Hz')
Result:
Credits
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
File details
Details for the file signal_design-0.4.0.tar.gz
.
File metadata
- Download URL: signal_design-0.4.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5df316f1f3588ee8a9e3dd5e59cd86d24140e6750775daafd99688034c29716 |
|
MD5 | 0ecb4465df5dba5cdc00d9d599f2e7fd |
|
BLAKE2b-256 | 48fbf084aba54811c8c1e24282f20bfa9583f16f1245f084adc58bfdb11bfbb5 |
File details
Details for the file signal_design-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: signal_design-0.4.0-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c4f930dc1a8b8a1b7c42b262a5b93fe0e75b53693f44d33e7e590271ba6bff3 |
|
MD5 | 64cd03b6bcf72f8cd750b15cd2fb2242 |
|
BLAKE2b-256 | 725eaa535235628d1c44bb61491e8fe805a10ca65b5e16d2d284e98cb3cf69fd |