Metadata-Version: 2.4
Name: PaIRS_UniNa
Version: 0.2.12
Summary: PaIRS - Particle Image Reconstruction Software
Home-page: https://pairs.unina.it/
Author: Gerardo Paolillo and Tommaso Astarita
Author-email: etfd@unina.it
License: LGPL-3.0-or-later
Keywords: PIV,PaIRS
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: scipy>=1.14.0
Requires-Dist: matplotlib>=3.9.0
Requires-Dist: pillow>=10.4.0
Requires-Dist: numpy>=2.0.0
Requires-Dist: pyside6>=6.7.0
Requires-Dist: unidecode>=1.3.0
Requires-Dist: psutil>=6.0.0
Requires-Dist: certifi>=2025.7.14
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# PaIRS-UniNa: **Pa**rticle **I**mage **R**econstruction **S**oftware - **Uni**versity of **Na**ples "Federico II"
**PaIRS-UniNa** is a project developed by the Experimental Thermo Fluid-Dynamics (ETFD) group of University of Naples "Federico II" since 2000.
It is aimed to provide fast and efficient tools for digital particle image velocimetry (PIV) analysis in research and industrial applications.

PaIRS-UniNa is based on a C library (**PaIRS-PIV**) and relies on a graphical user interface (**PaIRS**) that is developed via PySide6 and makes the use of PaIRS-PIV easy and intuitive.
PaIRS-PIV includes several modules that allow to process double-frame or time-resolved 2D planar PIV images as well as stereoscopic and tomographic PIV or Lagrangian particle tracking velocimetry (4D PTV) measurements.

The current release of PaIRS-UniNa features the module for the 2D planar PIV analysis and the stereoscopic PIV analysis and a module for optical calibration of camera systems, namely **CalVi**. 

CalVi is the calibration module of PaIRS-UniNa and allows accurate optical calibration of single and multiple camera bundles with the camera models mostly used in the PIV community: polynomials, rational functions and the pinhole camera model. Among the other features, it supports camera calibration procedures working with unknown positions and orientations of the calibration target and the integration of the pinhole camera model with a refractive correction model for cylindrical geometries (based on ray-tracing and Snell's law).

PaIRS-UniNa is supported by Python 3.10+ and is compatible with all the operating systems, however, the PaIRS-PIV library  relies on OpemMP library, which must be installed on the macOS platform. On the other side, PaIRS requires, among other packages, `SciPy` and `matplotlib`. 

For further information, please visit the [PaIRS website](https://www.pairs.unina.it/).

## What's new in PaIRS-UniNa 0.2.12

### Bug fixes:
- Fixed issues when reading completed disparity processes.
- Fixed a bug in the "Further information" section of the log of completed processes.
- Fixed undo restoration for calibration steps.
- Fixed bugs in saving .cfg files from the Process tab and in saving and setting custom processes.

### New features:
- Removed the constraint on the coordinate convention in stereoscopic PIV calibration: users can now adopt any coordinate system without being restricted to a predefined axis orientation.

### Performance improvements:
- Optimized the PaIRS-PIV library, enabling faster cross-correlation computations.

### User-interface enhancements:
- Introduced a combo box in the Vis tab for quick access to result files matching the filename pattern specified in the Output tab, simplifying result navigation and visualization.
- Improved the management of imported files in the Vis tab: each processing step now handles its own associated file independently, enhancing flexibility in the visualization of input images and output results.

### Distribution:
- Added example scripts (serialPIV.py and parallelPIV.py) to the user guide to run PIV processing outside the graphical interface, enabling batch execution, automation, and integration into custom Python workflows.

## Portable executable
Download the standalone PaIRS_UniNa executable from the [PaIRS website](https://www.pairs.unina.it/#download).

## Installation in Python
All PaIRS-UniNa wheels are distributed under LGPLv3+ licences. The installation can be performed with:
```
python -m pip install PaIRS-UniNa
```
### MacOS requirements
Normally the OpenMP library is not preinstalled in MacOs. A possible way to install this library is:
```
curl -O https://mac.r-project.org/openmp/openmp-12.0.1-darwin20-Release.tar.gz
sudo tar fvxz openmp-12.0.1-darwin20-Release.tar.gz -C /
```

## Run 
### From command prompt (Python package)
It is possible to run PaIRS directly from the command prompt with:
```
python -m PaIRS_UniNa
```
PaIRS automatically saves and stores its configuration upon exit and starts from the latter at the next run. If any trouble with loading the last configuration file (saved in the package folder) occurs, the user is suggested to execute a clean run of PaIRS via the following command:
```
python -m PaIRS_UniNa -c
```
A debug mode is also available for developers. It can be accessed via:
```
python -m PaIRS_UniNa -d
```
After the above command, the user will be asked to enter a password. Interested users can ask the password to the authors by sending an email to: etfd@unina.it. The debug mode can be turned on/off at any time via the keyboard sequence: Alt+Shift+D.
 
On macOS and Linux ```python``` must be replaced by ```python3```.

### From command prompt (executable version)
The same options are also available when using the portable/executable version of PaIRS. From the command prompt you can simply run:
```
PaIRS -c      (Windows)
./PaIRS -c    (MacOS/Linux)
```
to perform a clean run, or:
```
PaIRS -d      (Windows)
./PaIRS -d    (MacOS/Linux)
```
to start in debug mode (password required).

### In Python environment
In a Python environment, to run PaIRS the following commands can be used :
```
>>> from PaIRS_UniNa import PaIRS
>>> PaIRS.run()
```
For clean mode:
```
>>> PaIRS.cleanRun()
```
while for debug mode:
```
>>> PaIRS.debugRun()
```

## User guide
For more details about PaIRS usage, see [our user guide](https://www.pairs.unina.it/web/PaIRS-UniNa-v020-Guide.pdf).

## Authors and contact details
**Gerardo Paolillo** - Research Associate, Department of Industrial Engineering, University of Naples "Federico II", via Claudio, 21, 80125, Napoli, Italy

**Tommaso Astarita** - Full professor, Department of Industrial Engineering, University of Naples "Federico II", Piazzale Tecchio, 80, 80125, Napoli, Italy

**email**: etfd@unina.it

## Related works
Please cite the following works if you intend to use PaIRS-UniNa for your purposes:

**[1]** Astarita, T., & Cardone, G. (2005). "Analysis of interpolation schemes for image deformation methods in PIV". *Experiments in Fluids*, 38(2), 233-243. [doi: 10.1007/s00348-004-0902-3](https://doi.org/10.1007/s00348-004-0902-3)

**[2]** Astarita, T. (2006). "Analysis of interpolation schemes for image deformation methods in PIV: effect of noise on the accuracy and spatial resolution". *Experiments in Fluids*, vol. 40 (6): 977-987. [doi: 10.1007/s00348-006-0139-4](https://doi.org/10.1007/s00348-006-0139-4)

**[3]**	Astarita, T. (2007). "Analysis of weighting windows for image deformation methods in PIV." *Experiments in Fluids*, 43(6), 859-872. [doi: 10.1007/s00348-007-0314-2](https://doi.org/10.1007/s00348-007-0314-2)

**[4]**	Astarita, T. (2008). "Analysis of velocity interpolation schemes for image deformation methods in PIV". *Experiments in Fluids*, 45(2), 257-266. [doi: 10.1007/s00348-008-0475-7](https://doi.org/10.1007/s00348-008-0475-7)

**[5]**	Astarita, T. (2009). "Adaptive space resolution for PIV". *Experiments in Fluids*, 46(6), 1115-1123. [doi: 10.1007/s00348-009-0618-5](https://doi.org/10.1007/s00348-009-0618-5)

**[6]**	Giordano, R., & Astarita, T. (2009). "Spatial resolution of the Stereo PIV technique". *Experiments in Fluids*, 46(4), 643-658. [doi: 10.1007/s00348-008-0589-y](https://doi.org/10.1007/s00348-008-0589-y)

Please cite the following works if you intend to use CalVi for your purposes:

**[1]** Paolillo, G., & Astarita, T. (2020). "Perspective camera model with refraction correction for optical velocimetry measurements in complex geometries". *IEEE Transactions on Pattern Analysis and Machine Intelligence*, 44(6), 3185-3196. [doi: 10.1109/TPAMI.2020.3046467](https://doi.org/10.1109/TPAMI.2020.3046467). 

**[2]** Paolillo, G., & Astarita, T. (2021). "On the PIV/PTV uncertainty related to calibration of camera systems with refractive surfaces". *Measurement Science and Technology*, 32(9), 094006. [doi: 10.1088/1361-6501/abf3fc](https://doi.org/10.1088/1361-6501/abf3fc).

<!--[Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
to write your content.-->

