A utility to generate custom waveform graphics for use in presentations and such.
Allows basic customization with reasonable randomness.
$ pip install -e .
$ waveform single
Recommended to use a virtual environment. I use pyenv
and pyenv-virtualenv
.
See more about pyenv
here and pyenv-virtualenv
here.
Then, install the version of python as specified in the .python-version
file. e.g.
$ pyenv install 3.10.12
Create a virtual environment and activate it, e.g.
$ cd /path/to/waveform-generator
$ mkvirtualenv -a `pwd` waveform
Install the requirements.
$ pip install -e .
$ waveform --help
Usage: waveform [OPTIONS] COMMAND [ARGS]...
Waveform CLI.
Options:
--help Show this message and exit.
Commands:
batch Save a batch of waveform graphics with random variations.
single Plot and optionally save a single waveform graphic.
Basic, default usage. This will open a window with a single waveform graphic so you can see what it looks like.
$ waveform single
$ waveform single --closed-loop
Save a batch of random variations to your base settings to the tmp/ directory.
$ waveform batch --save-path tmp/
Some fun variations that will open in a window for you to see. You can set --save-path
to save them to a directory and run in batch
mode to save a bunch at once (set
--num-images
to the number of variations you want to save). Note: remove
--seed
to get different variations each time with same base settings.
$ waveform single --seed 19 --spread 0.5
$ waveform single --seed 9 --spread 0.25 --closed-loop --perturbation-base-curve 0.25 --perturbation-between-curves 0.02 --num-points 20
See the filenames for the seed and other values used to generate the images below.