fluiddyn/fluidimage
:sparkler: A libre Python framework for scientific treatments of large series of images (publish-only mirror)
FluidImage
FluidImage is a free and open-source Python framework to process images of fluids (in
particular with PIV), and analyse the resulting fields.
Documentation: http://fluidimage.readthedocs.org
Image processing for fluid mechanics is still dominated by proprietary tools. Such tools
are not ideal when you want to understand and tweak the algorithms and/or to use
clusters. There are also good and useful PIV software (PIVlab, UVmat) written in
Matlab, which is itself proprietary.
With the improvement of the Python numerical ecosystem and of tools for collaborative
development, one can think it is possible to build together a good community-driven
library/toolkit specialized in image processing for fluid mechanics. This is our project
with FluidImage.
Fluidimage has now grown into a clean software reimplementing in modern Python algorithms
and ideas taken from UVmat, OpenPIV, PIVlab and PIVmat with a focus on
performance, usability and maintanability. However, Fluidimage is not restricted to
Particle Image Velocimetry computations (PIV, i.e. displacements of pattern obtained by
correlations of cropped images) and can be used to
-
display and pre-process images,
-
compute displacement or velocity fields with PIV, Background-Oriented Schlieren
(BOS) and
optical flow, -
analyze and display vector and scalar fields.
We want to make FluidImage easy (useful documentation, easy installation, nice API,
usable with simple scripts and few simple graphical user interfaces), reliable (with good
unittests) and very efficient, in
particular when the number of images is large. Thus we want FluidImage to be able to run
efficiently and easily on a personal computer and on big clusters. The efficiency is
achieved by using
-
a framework for asynchronous computations (currently, we use
Trio) and an associated API to define "topologies" of
parallel computations. -
parallelism to efficiently use the available cores of the Central Processing Units
(CPU), -
good profiling and efficient and specialized algorithms,
-
cutting-edge tools for fast computations with Python (in particular
Pythran through
Transonic).
Installation and setup
Fluidimage can be installed from
wheels and sdist available on PyPI with tools
like pip, UV and PDM. Alternatively, it can be installed from conda-forge packages
(for example available on https://prefix.dev/channels/conda-forge/packages/fluidimage)
with tools like conda (installed with Miniforge) or Pixi.
In some cases, Fluidimage will require that the environment variable OMP_NUM_THREADS is
set to 1. With a POSIX shell like Bash, it can be done with export OMP_NUM_THREADS=1.
For more details, see
the installation page in the documentation.
Basic usage
Few minimalist examples about image visualisation, preprocessing and PIV computation are
presented in
the overview of the project.
Other usage cases can be found in our
tutorials and
examples.
Citation
If you use Fluidimage to produce scientific articles, please cite
our metapaper presenting the FluidDyn project:
@article{fluiddyn,
doi = {10.5334/jors.237},
year = {2019},
publisher = {Ubiquity Press, Ltd.},
volume = {7},
author = {Pierre Augier and Ashwin Vishnu Mohanan and Cyrille Bonamy},
title = {{FluidDyn}: A Python Open-Source Framework for Research and Teaching in Fluid Dynamics
by Simulations, Experiments and Data Processing},
journal = {Journal of Open Research Software}
}