Skip to main content

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 configuration Config and SweepConfig.
  • 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 classes MathOperation and RelationProtocol.
  • sweep_design.exc - contains exceptions.
  • sweep_design.axis - contains class ArrayAxis
  • sweep_design.relation - contains class Relation
  • sweep_design.signal - contains class Signal
  • sweep_design.spectrum - contains class Spectrum
  • sweep_design.sweep - contains class Sweep
  • sweep_design.uncalculated - contains classes UncalculatedSweep and ApriorUncalculatedSweep
  • sweep_design.spectrogram - contains classes Spectrogram

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:

sweep_with_matplotlib

Credits

sweep-design was created with
numpy
scipy
EMD-signal

TODO

  1. 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

sweep_design-0.3.1.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

sweep_design-0.3.1-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

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

Hashes for sweep_design-0.3.1.tar.gz
Algorithm Hash digest
SHA256 937964d6dca34a6671f98076fcd86bcbaa89a00d6fbf9b5ca62db4ac0d428eb0
MD5 c4ecb2f11cc64f87f2c3af1052c68096
BLAKE2b-256 ee9c8c2fc7bdbdf24883205f48d7436dea38f686dbe48d04129b2bcbf593f70b

See more details on using hashes here.

File details

Details for the file sweep_design-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sweep_design-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8228e5ed5a1d6d8f20cf93b2f5e316e404ce4c384c6359dbb64613375a0f6b17
MD5 3baaaa829e06e345dbd22821b6c7b4ee
BLAKE2b-256 4fb9a0a5c66f7d5781d541c2d43ec8613f8fb8f9d94afb218bb3d3ba552f201f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page