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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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