Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.5.6 instead.
Reason given by maintainers: missing wheels

rLIC

PyPI Conda Version

Line Integral Convolution for Python, written in Rust

rLIC (pronounced 'relic') is a highly optimized, minimal implementation of the Line Integral Convolution algorithm for in-memory numpy arrays, written in Rust.

Development status and scope

rLIC is currently in beta. As of version 0.5.0, the only public API, rlic.convolve, is considered feature complete and stable. However, minor behavior changes may still happen, particularly where performance can be improved as a result.

Post-processing is out-of-scope for this library. For histogram equalization, an operation very commonly applied to LIC images, please see rLIC's sister project ahe, which follows the same minimalist philosophy and originated within rLIC's code base.

Free-threading support

rlic.convolve is trivially thread-safe, because it does not mutate any external data. Wheels are available for Python 3.15t and later.

Installation

python -m pip install rLIC

Examples

rLIC consists in a single Python function, rlic.convolve, that convolves a texture image (usually noise) with a 2D vector field described by its components u and v, via a 1D kernel array. The result is an image where pixel intensity is strongly correlated along field lines.

Let's see an example. We'll use matplotlib to visualize inputs and outputs.

import matplotlib.pyplot as plt
import numpy as np

import rlic

SHAPE = NX, NY = (256, 256)
prng = np.random.default_rng(0)

texture = prng.random(SHAPE)
x = np.linspace(0, np.pi, NY)
U = np.broadcast_to(np.cos(2 * x), SHAPE)
V = np.broadcast_to(np.sin(x).T, SHAPE)

fig, axs = plt.subplots(ncols=2, sharex=True, sharey=True, figsize=(10, 5))
for ax in axs:
    ax.set(aspect="equal", xticks=[], yticks=[])

ax = axs[0]
ax.set_title("Input texture (noise)")
ax.imshow(texture)

ax = axs[1]
ax.set_title("Input vector field")
Y, X = np.mgrid[0:NY, 0:NX]
ax.streamplot(X, Y, U, V)

Now let's compute some convolutions, varying the number of iterations

kernel = 1 - np.abs(np.linspace(-1, 1, 65))

fig_out, axs_out = plt.subplots(ncols=3, figsize=(15, 5))
for ax in axs_out:
    ax.set(aspect="equal", xticks=[], yticks=[])
for n, ax in zip((1, 5, 100), axs_out, strict=True):
    image = rlic.convolve(
        texture,
        U,
        V,
        kernel=kernel,
        boundaries="periodic",
        iterations=n,
    )
    ax.set_title(f"Convolution result ({n} iteration(s))")
    ax.imshow(image)

Polarization mode

By default, the direction of the vector field affects the result. That is, the sign of each component matters. Such a vector field is analogous to a velocity field. However, the sign of u or v may sometimes be irrelevant, and only their absolute directions should be taken into account. Such a vector field is analogous to a polarization field. rLIC supports this use case via an additional keyword argument, uv_mode, which can be either 'velocity' (default), or 'polarization'. In practice, the difference between these two modes in only visible around sharps changes in sign in either u or v, and with certain kernels. Let's illustrate one such case

import matplotlib.pyplot as plt
import numpy as np

import rlic

SHAPE = NX, NY = (256, 256)
prng = np.random.default_rng(0)

texture = prng.random(SHAPE)
kernel = 1 - np.abs(np.linspace(-1, 1, 65, dtype="float64"))

U0 = np.ones(SHAPE)
ii = np.broadcast_to(np.arange(NX), SHAPE)
U = np.where(ii < NX / 2, -U0, U0)
V = np.zeros((NX, NX))

fig, axs = plt.subplots(ncols=3, sharex=True, sharey=True, figsize=(15, 5))
for ax in axs:
    ax.set(aspect="equal", xticks=[], yticks=[])

ax = axs[0]
ax.set_title("Input vector field")
Y, X = np.mgrid[0:NY, 0:NX]
ax.streamplot(X, Y, U, V)

for uv_mode, ax in zip(("velocity", "polarization"), axs[1:], strict=True):
    image = rlic.convolve(
        texture,
        U,
        V,
        kernel=kernel,
        uv_mode=uv_mode,
        boundaries={"x": "periodic", "y": "closed"},
    )
    ax.set_title(f"{uv_mode=!r}")
    ax.imshow(image)

Memory Usage

rLIC.convolve allocates exactly two buffers with the same size as texture, u and v, regardless of the number of iterations performed, one of which is discarded when the function returns. This means that peak usage is about 5/3 of the amount needed to hold input data in memory, and usage drops to 4/3 on return.

Metadata

Release files for rlic 0.5.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rlic 0.5.5
File Size Uploaded
rlic-0.5.5.tar.gz 27.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for rlic 0.5.5
File
rlic-0.5.5-cp315-abi3.abi3t-win_arm64.whl CPython 3.15 abi3t, abi3 Windows ARM64 Details
rlic-0.5.5-cp315-abi3.abi3t-win_amd64.whl CPython 3.15 abi3, abi3t Windows x86-64 Details
rlic-0.5.5-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl CPython 3.15 abi3t, abi3 Linux musl 1.2+ x86-64 Details
rlic-0.5.5-cp315-abi3.abi3t-macosx_10_12_x86_64.whl CPython 3.15 abi3, abi3t macOS 10.12+ x86-64 Details
rlic-0.5.5-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details
rlic-0.5.5-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
rlic-0.5.5-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
rlic-0.5.5-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details

Total release size: 2.1 MB

Release files / rlic-0.5.5.tar.gz

Download URL rlic-0.5.5.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
64ce4a831375287106af36443e09733af0c4235d97023ab5f5e9403559c9f605
BLAKE2b-256 checksum
How to use checksums
b7108d205755dd69904df5957f0b2eff68df5298549a873554516b02531887cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / rlic-0.5.5-cp315-abi3.abi3t-win_arm64.whl

Download URL rlic-0.5.5-cp315-abi3.abi3t-win_arm64.whl
Size 127.5 kB
Tags CPython 3.15 Windows ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
4a77ad07714abff4363535e19459ec36e23dd4764c8de56a2c5a565b58dc8d13
BLAKE2b-256 checksum
How to use checksums
2545298ae6b0fab78c3363f2e43e431bb305f71ebbbbdd34c75b755f397abe1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / rlic-0.5.5-cp315-abi3.abi3t-win_amd64.whl

Download URL rlic-0.5.5-cp315-abi3.abi3t-win_amd64.whl
Size 139.9 kB
Tags CPython 3.15 Windows x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
fdc82627c5919c7b3a08307ca2fb8d4ca3e3a32d7656fd90f6f1ac9bc0662bdc
BLAKE2b-256 checksum
How to use checksums
e01a645defe72f087b94b6511de2c9f6f67291ed723a3e4284c53779af9d0647
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / rlic-0.5.5-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl

Download URL rlic-0.5.5-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl
Size 455.8 kB
Tags CPython 3.15 Linux musl 1.2+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
eba6049806ba0d372252616e5da044d1d5e55de9114edc6bda5aac498862d0dd
BLAKE2b-256 checksum
How to use checksums
8d9b560f3fca9a8163b81b656647714088739a6cc9b9cf904ab792a38086559c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / rlic-0.5.5-cp315-abi3.abi3t-macosx_10_12_x86_64.whl

Download URL rlic-0.5.5-cp315-abi3.abi3t-macosx_10_12_x86_64.whl
Size 222.1 kB
Tags CPython 3.15 abi3 abi3t macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
51cacd76747358943e38ad89d9a206bced51f974f940f3736be5f4bfe35c5e5a
BLAKE2b-256 checksum
How to use checksums
e105d4b712f60556dfc4cc017f94f054057b40c1835bec5015b932b20c8bb34e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / rlic-0.5.5-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL rlic-0.5.5-cp311-abi3-musllinux_1_2_aarch64.whl
Size 404.3 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
1fdcbf849006576d9347c9fd77dcc02d650f44348bad4f403f0794cc7d4ec5ac
BLAKE2b-256 checksum
How to use checksums
de03df8640c59b6b047b79a9a97c6c2a3ccfac6175af7f5b17ae43e0005d35be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / rlic-0.5.5-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL rlic-0.5.5-cp311-abi3-manylinux_2_28_x86_64.whl
Size 243.4 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
fed44ace457943c33838a6d38219144e25750a23c33deacd73f58c07c6266f17
BLAKE2b-256 checksum
How to use checksums
9171b9b3b3a0ce2e71a0243c607e0af4c6c06bf203bab3efba96552738b8ee0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / rlic-0.5.5-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL rlic-0.5.5-cp311-abi3-manylinux_2_28_aarch64.whl
Size 226.5 kB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
29f428ccad7f782a62626c1d66b25be4f7b23d09c62b6bad389c2edbfa07c957
BLAKE2b-256 checksum
How to use checksums
6d6c9f5770bcd1b742b303dee1f89330f19dc1cb7af152014a14889aa4ba6c69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / rlic-0.5.5-cp311-abi3-macosx_11_0_arm64.whl

Download URL rlic-0.5.5-cp311-abi3-macosx_11_0_arm64.whl
Size 206.6 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
140c95c291605c746ec566374cea86283be40300cf7149d63ab9a784046cbfb7
BLAKE2b-256 checksum
How to use checksums
0f415111f45839dacbeec3d54b8f53f9536ec6eba1620c4f6d198395e73e6a0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.6

17 release files

This release

0.5.5 This release

9 release files

0.5.4

9 release files

0.5.3

10 release files

0.5.2

10 release files

0.5.1

9 release files

0.5.0

9 release files

0.4.0

9 release files

0.3.4

9 release files

0.3.3

9 release files

0.3.2

9 release files

0.3.1

9 release files

0.3.0

9 release files

0.2.2

9 release files

0.2.1

9 release files

0.2.0

9 release files

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page