Skip to main content

Line integral convolution for numpy arrays

Project description

PyPI PyPI - License PyPI - Python Version Gitlab pipeline status Coverage Documentation Status

⎣⫯ℂ: Line Integral Convolution for numpy Arrays

This package provides line integral convolution (lic) algorithms to Python.

lic image of the Kelvin-Helmholtz instability

lic image of the Kelvin-Helmholtz instability

There are functions which can be imported and are highly configurable for the power user. Moreover, there is a command line tool to generate lic images without having to code a single line.

Installation

The installation is straight forward. You can install the package via pip, pipenv, poetry and alike or by downloading the source from the gitlab repository.

From gitlab.com

To get the latest features or contribute to the development, you can clone the whole project using git:

git clone https://gitlab.com/szs/lic.git

Now you can, for instance, copy lic.py over to your project and import it directly or use it as a command line tool.

Usage

You can import lic in your program and use the functions directly or use the command line tool.

Importing the module

Once the package is installed where Python can find it, you can use the function lic directly.

import lic
import matplotlib.pyplot as plt

# ... get x and y arrays from somewhere ...

lic_result = lic.lic(x, y, length=30)

plt.imshow(lic_result, origin='lower', cmap='gray')
plt.show()

Find out more about the options by reading the source documentation:

pydoc lic.lic

You can also control the seed, i.e., the underlying texture for the lic:

pydoc lic.gen_seed

You can run the example from the root folder to see the result:

PYTHONPATH="." python3 examples/ex1.py

Command Line Tool

You will need npy data files (saved using numpy.save) to use lic from the command line:

lic data_x.npy data_y.npy -v -l 30 -c

See lic --help for a full list of options.

How to Contribute

If you find a bug, want to propose a feature or need help getting this package to work with your data on your system, please don’t hesitate to file an issue or write an email. Merge requests are also much appreciated!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for lic, version 0.4.5
Filename, size File type Python version Upload date Hashes
Filename, size lic-0.4.5-py3-none-any.whl (251.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size lic-0.4.5.tar.gz (205.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page