Animate Images
Helper functions to make animations of images with corresponding traces and labels using matplotlib
Example uses:
If you have a 3d movie (time, x, y):
from Animate.Movie import Movie
import numpy as np
m = Movie(dt=1.0 / 14, height_ratio=1.5)
img = np.random.randint(10, size=(40, 5, 5))
m.add_image(img, style='dark_img')
m.add_axis(x_label='time (s)', y_label='value')
m.add_trace(img.mean(axis=(1, 2)))
m.save('path/to/file/with_name', fps=1)
If you have a 2d movie (x, y) where you want to have a sliding window movie:
import numpy as np
from Animate.Movie import Movie
# prepare data
x_len = 300
x_res = 20.0
y_amplitude = 20
noise_amplitude = 5
x = np.arange(x_len) / x_res
y = np.sin(x) * y_amplitude
pix_number = 10
img = np.random.randint(0, noise_amplitude, size=pix_number*x_len).reshape(pix_number, x_len) + y
# make a movie
rate = 5.0
m = Movie(dt=1.0/rate)
m.add_image(img, animation_type='window', window_size=19, window_step=5)
m.add_axis('Time (s)', 'Mean value')
m.add_trace(img.mean(axis=0))
m.save('testing', fps=rate)
Testing
pytest --pep8 --cov=Animate --cov-report html
Deploying
bumpversion patch
python setup.py sdist
twine upload \dist\...
Metadata
Release files for animateimages 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| animateimages-0.2.4.tar.gz | 14.3 kB | Without provenance | Details for animateimages-0.2.4.tar.gz |
Release files / animateimages-0.2.4.tar.gz
| Download URL | animateimages-0.2.4.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a46ad24b2bda975cef288a9d077949027c2ec47b47563a1247cc2fa9807f75c0
|
|
BLAKE2b-256 checksum How to use checksums |
3d5cdc39073973970963470fa588d6add8ca77c0341d2889536ae88db6d95b0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for animateimages 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.