Skip to main content

Package that uses a Line Integral Convolution library to clothe a 2D field (ex: density field) with a LIC texture, given two vector fields (ex: velocity (vx, vy))

Project description

lick

PyPI

Line Integral Convolution Knit : Package that uses a Line Integral Convolution library to clothe a 2D field (ex: density field) with a LIC texture, given two vector fields (ex: velocity (vx, vy)).
Version: 0.1.0
Author: Gaylor Wafflard-Fernandez
Author-email: gaylor.wafflard@univ-grenoble-alpes.fr

Installation

Install with pip

pip install lick

To import lick:

import lick as lk

The important functions are lick_box and lick_box_plot. While lick_box interpolates the data and perform a line integral convolution, lick_box_plot directly plots the final image. Use lick_box if you want to have more control of the plots you want to do with the lic. Use lick_box_plot if you want to take advantage of the fine-tuning of the pcolormesh parameters.

Example

import numpy as np
import matplotlib.pyplot as plt
from lick import lick_box_plot

fig, ax = plt.subplots()
x = np.geomspace(0.1, 10, 128)
y = np.geomspace(0.1, 5, 128)
a, b = np.meshgrid(x, y)
v1 = np.cos(a)
v2 = np.sin(b)
field = v1 ** 2 + v2 ** 2
lick_box_plot(
    fig,
    ax,
    x,
    y,
    v1,
    v2,
    field,
    size_interpolated=256,
    xmin=1,
    xmax=9,
    ymin=1,
    ymax=4,
    niter_lic=5,
    kernel_length=64,
    cmap="inferno",
    stream_density=0.5
)
plt.show()

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

lick-0.1.0.post1.tar.gz (8.9 MB view details)

Uploaded Source

Built Distribution

lick-0.1.0.post1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file lick-0.1.0.post1.tar.gz.

File metadata

  • Download URL: lick-0.1.0.post1.tar.gz
  • Upload date:
  • Size: 8.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for lick-0.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 2e7c881d911c11a7f0cb885ce5865263edf0adfc22b2f30e7dd26328c75c004a
MD5 1282da864b00684b0da81e7aef1d2b72
BLAKE2b-256 46ed31a956544f248da6e7b5b49b4692a8df99386b84da5aa08336d65cd6d702

See more details on using hashes here.

File details

Details for the file lick-0.1.0.post1-py3-none-any.whl.

File metadata

  • Download URL: lick-0.1.0.post1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for lick-0.1.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e144085ea53836dca5cace392657edc04b1c6d726e668873639c34cf2d39943
MD5 08df0c08804b17a9f54108247b031636
BLAKE2b-256 9201d362321200975e89a3fc1f7cc01515439eb0669150e61006429b74b04def

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