Metadata-Version: 2.4
Name: lick
Version: 0.10.0
Summary: A high level Line Integral Convolution (LIC) library, including post-processing and visualization
Author: G. Wafflard-Fernandez, C.M.T. Robert
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-Expression: GPL-3.0-only
Classifier: Framework :: Matplotlib
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Typing :: Typed
License-File: LICENSE
Requires-Dist: ahe>=0.1.0
Requires-Dist: matplotlib>=3.5.0
Requires-Dist: numpy>=1.22, <3
Requires-Dist: rlic>=0.2.1
Requires-Dist: scipy>=1.7.2
Requires-Dist: typing-extensions>=4.3.0 ; python_full_version < '3.11'
Project-URL: Homepage, https://github.com/la-niche/lick

# lick
[![PyPI](https://img.shields.io/pypi/v/lick.svg?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/lick/)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/la-niche/lick/main.svg)](https://results.pre-commit.ci/latest/github/la-niche/lick/main)


Line Integral Convolution Knit : clothe a 2D field (ex: density field) with a LIC texture,
given two vector fields (ex: velocity (vx, vy)).

This package builds on top of [rLIC](https://pypi.org/project/rlic), adding
post-processing and visualization functionalities.

Authors: Gaylor Wafflard-Fernandez, Clément Robert

Author-email: gaylor.wafflard@univ-grenoble-alpes.fr

<p align="center">
    <img src="https://raw.githubusercontent.com/la-niche/lick/main/imgs/lick.png" width="600"></a>
</p>

## Installation

Install with `pip`

```
pip install lick
```

To import lick:

```python
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

```python
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,
    kernel=np.sin(np.linspace(0, np.pi, 64)),
    niter_lic=5,
    post_lic="north-west-light-source",
    cmap="inferno",
    stream_density=0.5,
)
plt.show()
```

