Skip to main content

Library for composing signals from arrays and functions.

Project description

signal_composer

Library for composing signals from arrays and functions.

Usage

Creating Signals

From interpolated arrays

signal = Signal([1, 0, 1, -1, 1])

From functions

f = lambda x: x ** 3 - x ** 2
signal = Signal(f)

f = lambda x: x ** 3 - x ** 2
signal = Signal(f, function_input_span=[0, 1 + 0.25])

Composing Signals

From adding signals

signal_1 = Signal([0, 1])
signal_2 = Signal(lambda x: 1 + x ** 3)
composed_signal = signal_1 + signal_2

Time-series for the composed signal above.

From lists

signals = [
    lambda x: x ** 2,
    [-1, 0, 1],
    lambda x: 4 + x ** (1/2)
]

composed_signal = Signal.compose_from_list(signals)

How to install

Option 1: Manually

Clone the GitHub repo and install manually by passing

gh repo clone danlessa/signal_composer
cd signal_composer
pip install -e .

Option 2: PyPi

Just pass: pip install signal_composer

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

signal_composer-0.0.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

signal_composer-0.0.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file signal_composer-0.0.2.tar.gz.

File metadata

  • Download URL: signal_composer-0.0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.5

File hashes

Hashes for signal_composer-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7bdd5770e25f7897571fb9df3cf5f6db761828102b9edf12ab3d333b3a790516
MD5 8e8e4b54a3700a56e367e2fa2e3b8562
BLAKE2b-256 fb3bd19ab0427c4be16b9a5876e9804336c232776b07ad54e95bbc15b851bb8c

See more details on using hashes here.

File details

Details for the file signal_composer-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: signal_composer-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.5

File hashes

Hashes for signal_composer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3be8dc74fe4aae95e16a2614d66fa641411269214ba5b917d7ccc6d346d551d7
MD5 ad2eb1db5f02034e6162f585e9cddecd
BLAKE2b-256 7276ea94a04e2084a464a98ba07f5fab8723898454acaff5723677aa95bea285

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