OpenPIV 0.25.0__tar.gz → 0.25.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {OpenPIV-0.25.0/OpenPIV.egg-info → openpiv-0.25.2}/PKG-INFO +35 -19
- {OpenPIV-0.25.0 → openpiv-0.25.2}/README.md +10 -9
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/PIV_3D_plotting.py +1 -1
- openpiv-0.25.2/openpiv/data/test1/test_data.vec +71 -0
- openpiv-0.25.2/openpiv/data/test3/pair_4_frame_0.jpg +0 -0
- openpiv-0.25.2/openpiv/data/test3/pair_4_frame_1.jpg +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_10_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_10_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_1_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_1_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_2_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_2_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_3_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_3_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_4_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_4_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_5_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_5_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_6_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_6_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_7_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_7_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_8_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_8_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_9_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test5/Pattern_9_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_0001_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_0002_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_0003_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_0004_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_0005_A.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_1001_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_1002_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_1003_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_1004_B.tif +0 -0
- openpiv-0.25.2/openpiv/data/test6/Pattern_1005_B.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/installation_instruction.rst +2 -3
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/piv.py +3 -3
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/smoothn.py +1 -1
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_process.ipynb +19 -10
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_process.py +50 -29
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_pyprocess3D.py +3 -1
- openpiv-0.25.2/openpiv/test/test_tools.ipynb +279 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_validation.py +52 -61
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_vectorized_extended_search.py +2 -16
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_windef.py +35 -14
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/tools.py +226 -91
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/windef.py +1 -1
- openpiv-0.25.2/pyproject.toml +54 -0
- OpenPIV-0.25.0/CHANGES.txt +0 -20
- OpenPIV-0.25.0/INSTALL +0 -57
- OpenPIV-0.25.0/MANIFEST.in +0 -24
- OpenPIV-0.25.0/MILESTONES +0 -22
- OpenPIV-0.25.0/OpenPIV.egg-info/SOURCES.txt +0 -124
- OpenPIV-0.25.0/OpenPIV.egg-info/dependency_links.txt +0 -1
- OpenPIV-0.25.0/OpenPIV.egg-info/requires.txt +0 -11
- OpenPIV-0.25.0/OpenPIV.egg-info/top_level.txt +0 -1
- OpenPIV-0.25.0/PKG-INFO +0 -126
- OpenPIV-0.25.0/openpiv/test/OpenPIV_results_16_test1/field_A0000.png +0 -0
- OpenPIV-0.25.0/openpiv/test/test_tools.ipynb +0 -193
- OpenPIV-0.25.0/pyproject.toml +0 -8
- OpenPIV-0.25.0/setup.cfg +0 -4
- OpenPIV-0.25.0/setup.py +0 -59
- {OpenPIV-0.25.0 → openpiv-0.25.2}/LICENSE.txt +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/__init__.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test1/exp1_001_a.bmp +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test1/exp1_001_b.bmp +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_00.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_01.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_10.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_11.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_20.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_21.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_30.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_31.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_40.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_41.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_50.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test2/2image_51.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test4/Camera1-0101.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/data/test4/Camera1-0102.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/Makefile +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/OpenPIV.pdf +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/OpenPIV_advanced_processing_parameters.pdf +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/conf.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/images/B005_1.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/images/B005_2.tif +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/images/image1.png +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/images/image2.png +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/images/image3.png +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/images/image4.png +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/index.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/make.bat +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/requirements.txt +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/api_reference.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/developers.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/faq.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.filters._gaussian_kernel.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.filters.gaussian.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.filters.replace_outliers.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.lib.replace_nans.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.lib.sincinterp.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.preprocess.dynamic_masking.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.process.CorrelationFunction.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.process.correlate_windows.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.process.extended_search_area_piv.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.process.get_coordinates.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.process.get_field_shape.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.process.normalize_intensity.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.pyprocess.correlate_windows.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.pyprocess.find_first_peak.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.pyprocess.find_second_peak.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.pyprocess.find_subpixel_peak_position.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.pyprocess.get_coordinates.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.pyprocess.get_field_shape.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.pyprocess.moving_window_array.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.pyprocess.normalize_intensity.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.pyprocess.piv.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.scaling.uniform.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.tools.Multiprocesser.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.tools.display.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.tools.display_vector_field.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.tools.imread.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.tools.save.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.validation.global_std.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.validation.global_val.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.validation.local_median_val.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/generated/openpiv.validation.sig2noise_val.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/gui_doc.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/introduction.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/masking.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/modules.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/openpiv.rst +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/openpiv_pivuq.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/piv_basics.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/tutorial1.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/docs/src/windef.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/filters.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/lib.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/phase_separation.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/preprocess.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/pyprocess.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/pyprocess3D.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/scaling.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/__init__.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/extended_search_area_vectorized.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/moon.png +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_filters.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_filters.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_find_peaks.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_preprocess.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_scaling.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_tools.png +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_tools.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_validation.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/test/test_windef.ipynb +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/tutorials/masking_tutorial.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/tutorials/tutorial1.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/tutorials/tutorial2.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/tutorials/windef_tutorial.py +0 -0
- {OpenPIV-0.25.0 → openpiv-0.25.2}/openpiv/validation.py +0 -0
|
@@ -1,22 +1,36 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: OpenPIV
|
|
3
|
-
Version: 0.25.
|
|
3
|
+
Version: 0.25.2
|
|
4
|
+
Summary: OpenPIV consists in a Python and Cython modules for scripting and executing the analysis of a set of PIV image pairs. In addition, a Qt and Tk graphical user interfaces are in development, to ease the use for those users who don't have python skills.
|
|
5
|
+
License: GPLv3
|
|
6
|
+
Author: Alex Liberzon
|
|
7
|
+
Requires-Python: >=3.7,<3.11
|
|
4
8
|
Classifier: Development Status :: 4 - Beta
|
|
5
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
6
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
7
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
9
|
-
Classifier: Operating System :: MacOS :: MacOS X
|
|
10
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
11
|
-
Classifier: Operating System :: POSIX
|
|
12
9
|
Classifier: Intended Audience :: Science/Research
|
|
13
10
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
11
|
+
Classifier: License :: Other/Proprietary License
|
|
14
12
|
Classifier: Natural Language :: English
|
|
13
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
14
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
15
15
|
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Operating System :: POSIX
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
22
|
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Requires-Dist: imageio (>=2.22.4,<3.0.0)
|
|
24
|
+
Requires-Dist: importlib_resources (==5.12.0)
|
|
25
|
+
Requires-Dist: matplotlib (>=3,<4)
|
|
26
|
+
Requires-Dist: natsort (>=8.4.0,<9.0.0)
|
|
27
|
+
Requires-Dist: numpy (>=1.21.6,<2.0.0)
|
|
28
|
+
Requires-Dist: scikit-image (>=0.19.3,<0.20.0)
|
|
29
|
+
Requires-Dist: scipy (>=1.7.3,<2.0.0)
|
|
30
|
+
Requires-Dist: tqdm (>=4.66.1,<5.0.0)
|
|
31
|
+
Project-URL: Documentation, http://openpiv.readthedocs.org
|
|
32
|
+
Project-URL: Repository, https://pypi.python.org/pypi/OpenPIV
|
|
17
33
|
Description-Content-Type: text/markdown
|
|
18
|
-
Provides-Extra: tests
|
|
19
|
-
License-File: LICENSE.txt
|
|
20
34
|
|
|
21
35
|
# OpenPIV
|
|
22
36
|
[](https://travis-ci.org/OpenPIV/openpiv-python)
|
|
@@ -26,13 +40,7 @@ License-File: LICENSE.txt
|
|
|
26
40
|
|
|
27
41
|
|
|
28
42
|

|
|
29
|
-
|
|
30
|
-
[](https://anaconda.org/conda-forge/openpiv)
|
|
31
|
-
[](https://anaconda.org/conda-forge/openpiv)
|
|
32
|
-
[](https://conda.anaconda.org/conda-forge)
|
|
33
|
-
|
|
34
|
-
[](https://anaconda.org/conda-forge/openpiv)
|
|
35
|
-
[](https://anaconda.org/conda-forge/openpiv)
|
|
43
|
+
[](https://anaconda.org/alexlib/openpiv)
|
|
36
44
|
|
|
37
45
|
|
|
38
46
|
OpenPIV consists in a Python and Cython modules for scripting and executing the analysis of
|
|
@@ -62,11 +70,17 @@ Use PyPI: <https://pypi.python.org/pypi/OpenPIV>:
|
|
|
62
70
|
|
|
63
71
|
## Or `conda`
|
|
64
72
|
|
|
65
|
-
conda install -c
|
|
73
|
+
conda install -c alexlib openpiv
|
|
74
|
+
|
|
75
|
+
## Or [Poetry](https://python-poetry.org/)
|
|
76
|
+
|
|
77
|
+
poetry add openpiv
|
|
66
78
|
|
|
67
79
|
|
|
68
80
|
### To build from source
|
|
69
81
|
|
|
82
|
+
<!-- TODO: Change this build method to use poetry -->
|
|
83
|
+
|
|
70
84
|
Download the package from the Github: https://github.com/OpenPIV/openpiv-python/archive/master.zip
|
|
71
85
|
or clone using git
|
|
72
86
|
|
|
@@ -113,7 +127,8 @@ These and many additional examples are in another repository: [OpenPIV-Python-Ex
|
|
|
113
127
|
11. [David Bohringer](https://github.com/davidbhr)
|
|
114
128
|
12. [Erich Zimmer](https://github.com/ErichZimmer)
|
|
115
129
|
13. [Peter Vennemann](https://github.com/eguvep)
|
|
116
|
-
14. [Lento Manickathan](https://github.com/lento234)
|
|
130
|
+
14. [Lento Manickathan](https://github.com/lento234)
|
|
131
|
+
15. [Yuri Ishizawa](https://github.com/yuriishizawa)
|
|
117
132
|
|
|
118
133
|
|
|
119
134
|
Copyright statement: `smoothn.py` is a Python version of `smoothn.m` originally created by D. Garcia [https://de.mathworks.com/matlabcentral/fileexchange/25634-smoothn], written by Prof. Lewis and available on Github [https://github.com/profLewis/geogg122/blob/master/Chapter5_Interpolation/python/smoothn.py]. We include a version of it in the `openpiv` folder for convenience and preservation. We are thankful to the original authors for releasing their work as an open source. OpenPIV license does not relate to this code. Please communicate with the authors regarding their license.
|
|
@@ -124,3 +139,4 @@ Copyright statement: `smoothn.py` is a Python version of `smoothn.m` originally
|
|
|
124
139
|
|
|
125
140
|
|
|
126
141
|
|
|
142
|
+
|
|
@@ -6,13 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|

|
|
9
|
-
|
|
10
|
-
[](https://anaconda.org/conda-forge/openpiv)
|
|
11
|
-
[](https://anaconda.org/conda-forge/openpiv)
|
|
12
|
-
[](https://conda.anaconda.org/conda-forge)
|
|
13
|
-
|
|
14
|
-
[](https://anaconda.org/conda-forge/openpiv)
|
|
15
|
-
[](https://anaconda.org/conda-forge/openpiv)
|
|
9
|
+
[](https://anaconda.org/alexlib/openpiv)
|
|
16
10
|
|
|
17
11
|
|
|
18
12
|
OpenPIV consists in a Python and Cython modules for scripting and executing the analysis of
|
|
@@ -42,11 +36,17 @@ Use PyPI: <https://pypi.python.org/pypi/OpenPIV>:
|
|
|
42
36
|
|
|
43
37
|
## Or `conda`
|
|
44
38
|
|
|
45
|
-
conda install -c
|
|
39
|
+
conda install -c alexlib openpiv
|
|
40
|
+
|
|
41
|
+
## Or [Poetry](https://python-poetry.org/)
|
|
42
|
+
|
|
43
|
+
poetry add openpiv
|
|
46
44
|
|
|
47
45
|
|
|
48
46
|
### To build from source
|
|
49
47
|
|
|
48
|
+
<!-- TODO: Change this build method to use poetry -->
|
|
49
|
+
|
|
50
50
|
Download the package from the Github: https://github.com/OpenPIV/openpiv-python/archive/master.zip
|
|
51
51
|
or clone using git
|
|
52
52
|
|
|
@@ -93,7 +93,8 @@ These and many additional examples are in another repository: [OpenPIV-Python-Ex
|
|
|
93
93
|
11. [David Bohringer](https://github.com/davidbhr)
|
|
94
94
|
12. [Erich Zimmer](https://github.com/ErichZimmer)
|
|
95
95
|
13. [Peter Vennemann](https://github.com/eguvep)
|
|
96
|
-
14. [Lento Manickathan](https://github.com/lento234)
|
|
96
|
+
14. [Lento Manickathan](https://github.com/lento234)
|
|
97
|
+
15. [Yuri Ishizawa](https://github.com/yuriishizawa)
|
|
97
98
|
|
|
98
99
|
|
|
99
100
|
Copyright statement: `smoothn.py` is a Python version of `smoothn.m` originally created by D. Garcia [https://de.mathworks.com/matlabcentral/fileexchange/25634-smoothn], written by Prof. Lewis and available on Github [https://github.com/profLewis/geogg122/blob/master/Chapter5_Interpolation/python/smoothn.py]. We include a version of it in the `openpiv` folder for convenience and preservation. We are thankful to the original authors for releasing their work as an open source. OpenPIV license does not relate to this code. Please communicate with the authors regarding their license.
|
|
@@ -313,7 +313,7 @@ def quiver_3D(
|
|
|
313
313
|
colors = [c for c, d in zip(colors, df) if d > 0] + list(
|
|
314
314
|
chain(*[[c, c] for c, d in zip(colors, df) if d > 0])
|
|
315
315
|
)
|
|
316
|
-
# colors in ax.quiver 3d
|
|
316
|
+
# colors in ax.quiver 3d will probably change with updates:
|
|
317
317
|
# requires list with: first len(u) entries define the colors of the shaft, then the next len(u)*2 entries define
|
|
318
318
|
# the color ofleft and right arrow head side in alternating order. Try for example:
|
|
319
319
|
# colors = ["red" for i in range(len(cf))] + list(chain(*[["blue", "yellow"] for i in range(len(cf))]))
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# x y u v mask
|
|
2
|
+
0.4041 3.3983 0.1059 -2.7964 0.0000
|
|
3
|
+
0.9014 3.3983 0.1055 -2.8239 0.0000
|
|
4
|
+
1.3987 3.3983 0.0993 -2.8579 0.0000
|
|
5
|
+
1.8960 3.3983 0.0847 -2.9079 0.0000
|
|
6
|
+
2.3933 3.3983 0.0636 -2.9569 0.0000
|
|
7
|
+
2.8906 3.3983 0.0027 -2.9658 0.0000
|
|
8
|
+
3.3879 3.3983 -0.0587 -2.9562 0.0000
|
|
9
|
+
3.8852 3.3983 -0.1373 -2.9133 0.0000
|
|
10
|
+
4.3825 3.3983 -0.1947 -2.8557 0.0000
|
|
11
|
+
4.8798 3.3983 -0.3670 -2.6830 0.0000
|
|
12
|
+
0.4041 2.9010 0.0665 -2.8040 0.0000
|
|
13
|
+
0.9014 2.9010 0.0722 -2.8245 0.0000
|
|
14
|
+
1.3987 2.9010 0.4053 -2.7250 0.0000
|
|
15
|
+
1.8960 2.9010 0.0578 -2.8927 0.0000
|
|
16
|
+
2.3933 2.9010 0.0323 -2.9326 0.0000
|
|
17
|
+
2.8906 2.9010 -0.0168 -2.9186 0.0000
|
|
18
|
+
3.3879 2.9010 -0.0805 -2.8935 0.0000
|
|
19
|
+
3.8852 2.9010 -0.1594 -2.8354 0.0000
|
|
20
|
+
4.3825 2.9010 -0.2061 -2.7844 0.0000
|
|
21
|
+
4.8798 2.9010 -0.3066 -2.6590 0.0000
|
|
22
|
+
0.4041 2.4036 -0.0594 -2.7840 0.0000
|
|
23
|
+
0.9014 2.4036 0.0691 -2.8055 0.0000
|
|
24
|
+
1.3987 2.4036 0.0673 -2.8306 0.0000
|
|
25
|
+
1.8960 2.4036 0.0471 -2.8555 0.0000
|
|
26
|
+
2.3933 2.4036 -0.0328 -3.1216 0.0000
|
|
27
|
+
2.8906 2.4036 -0.0386 -2.8746 0.0000
|
|
28
|
+
3.3879 2.4036 -0.1014 -2.8450 0.0000
|
|
29
|
+
3.8852 2.4036 -0.1698 -2.7944 0.0000
|
|
30
|
+
4.3825 2.4036 -0.2126 -2.7545 0.0000
|
|
31
|
+
4.8798 2.4036 -0.2916 -2.6564 0.0000
|
|
32
|
+
0.4041 1.9063 0.0525 -2.7684 0.0000
|
|
33
|
+
0.9014 1.9063 0.0386 -2.7413 0.0000
|
|
34
|
+
1.3987 1.9063 -0.2324 -2.9411 0.0000
|
|
35
|
+
1.8960 1.9063 0.0251 -2.8002 0.0000
|
|
36
|
+
2.3933 1.9063 0.1382 -2.9616 0.0000
|
|
37
|
+
2.8906 1.9063 -0.0768 -2.7952 0.0000
|
|
38
|
+
3.3879 1.9063 -0.1411 -2.7683 0.0000
|
|
39
|
+
3.8852 1.9063 -0.1849 -2.7214 0.0000
|
|
40
|
+
4.3825 1.9063 -0.2214 -2.6969 0.0000
|
|
41
|
+
4.8798 1.9063 -0.2577 -2.6471 0.0000
|
|
42
|
+
0.4041 1.4090 0.0971 -2.7341 0.0000
|
|
43
|
+
0.9014 1.4090 0.0887 -2.7155 0.0000
|
|
44
|
+
1.3987 1.4090 0.0636 -2.7338 0.0000
|
|
45
|
+
1.8960 1.4090 0.0181 -2.7250 0.0000
|
|
46
|
+
2.3933 1.4090 -0.0418 -2.7314 0.0000
|
|
47
|
+
2.8906 1.4090 -0.0996 -2.7079 0.0000
|
|
48
|
+
3.3879 1.4090 -0.1617 -2.7015 0.0000
|
|
49
|
+
3.8852 1.4090 -0.3670 -2.6830 0.0000
|
|
50
|
+
4.3825 1.4090 -0.2229 -2.6631 0.0000
|
|
51
|
+
4.8798 1.4090 -0.2474 -2.6431 0.0000
|
|
52
|
+
0.4041 0.9117 0.1195 -2.7126 0.0000
|
|
53
|
+
0.9014 0.9117 0.1056 -2.6844 0.0000
|
|
54
|
+
1.3987 0.9117 0.0769 -2.6932 0.0000
|
|
55
|
+
1.8960 0.9117 0.1454 -2.5757 0.0000
|
|
56
|
+
2.3933 0.9117 -0.1543 -2.7084 0.0000
|
|
57
|
+
2.8906 0.9117 -0.0990 -2.6575 0.0000
|
|
58
|
+
3.3879 0.9117 -0.3521 -2.5478 0.0000
|
|
59
|
+
3.8852 0.9117 -0.1831 -2.6454 0.0000
|
|
60
|
+
4.3825 0.9117 -0.2044 -2.6432 0.0000
|
|
61
|
+
4.8798 0.9117 -0.0650 -2.6367 0.0000
|
|
62
|
+
0.4041 0.4144 0.1767 -2.6746 0.0000
|
|
63
|
+
0.9014 0.4144 0.5106 -2.6316 0.0000
|
|
64
|
+
1.3987 0.4144 0.1007 -2.6398 0.0000
|
|
65
|
+
1.8960 0.4144 0.0127 -2.2562 0.0000
|
|
66
|
+
2.3933 0.4144 -0.0425 -2.6163 0.0000
|
|
67
|
+
2.8906 0.4144 -0.1095 -2.6114 0.0000
|
|
68
|
+
3.3879 0.4144 -0.0219 -2.5749 0.0000
|
|
69
|
+
3.8852 0.4144 -0.1777 -2.6289 0.0000
|
|
70
|
+
4.3825 0.4144 -0.1981 -2.6318 0.0000
|
|
71
|
+
4.8798 0.4144 -0.2080 -2.6325 0.0000
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -31,12 +31,11 @@ Installation
|
|
|
31
31
|
|
|
32
32
|
Use `conda` ::
|
|
33
33
|
|
|
34
|
-
conda install -c
|
|
34
|
+
conda install -c alexlib openpiv
|
|
35
35
|
|
|
36
36
|
Or use `pip` ::
|
|
37
37
|
|
|
38
|
-
pip install
|
|
39
|
-
pip install openpiv --pre
|
|
38
|
+
pip install openpiv
|
|
40
39
|
|
|
41
40
|
Get OpenPIV source code!
|
|
42
41
|
========================
|
|
@@ -2,7 +2,7 @@ import numpy as np
|
|
|
2
2
|
import matplotlib.pyplot as plt
|
|
3
3
|
|
|
4
4
|
from openpiv import pyprocess, tools
|
|
5
|
-
|
|
5
|
+
from importlib_resources import files
|
|
6
6
|
|
|
7
7
|
# import numpy as np
|
|
8
8
|
|
|
@@ -71,8 +71,8 @@ def piv_example():
|
|
|
71
71
|
|
|
72
72
|
"""
|
|
73
73
|
# if im1 is None and im2 is None:
|
|
74
|
-
im1 =
|
|
75
|
-
im2 =
|
|
74
|
+
im1 = files('openpiv.data').joinpath('test1/exp1_001_a.bmp')
|
|
75
|
+
im2 = files('openpiv.data').joinpath('test1/exp1_001_b.bmp')
|
|
76
76
|
|
|
77
77
|
frame_a = tools.imread(im1)
|
|
78
78
|
frame_b = tools.imread(im2)
|
|
@@ -245,7 +245,7 @@ def smoothn(
|
|
|
245
245
|
Lambda = zeros(sizy)
|
|
246
246
|
for i in axis:
|
|
247
247
|
# create a 1 x d array (so e.g. [1,1] for a 2D case
|
|
248
|
-
siz0 = ones((1, y.ndim), dtype=
|
|
248
|
+
siz0 = ones((1, y.ndim), dtype=int)[0]
|
|
249
249
|
siz0[i] = sizy[i]
|
|
250
250
|
# cos(pi*(reshape(1:sizy(i),siz0)-1)/sizy(i)))
|
|
251
251
|
# (arange(1,sizy[i]+1).reshape(siz0) - 1.)/sizy[i]
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"from skimage.util import random_noise\n",
|
|
15
15
|
"from skimage import img_as_ubyte\n",
|
|
16
16
|
"\n",
|
|
17
|
+
"from scipy.ndimage import shift as shift_img\n",
|
|
18
|
+
"\n",
|
|
17
19
|
"threshold = 0.1\n",
|
|
18
20
|
"shift_u = -5\n",
|
|
19
21
|
"shift_v = 4\n",
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
" # bottom left corner, and the image is rolled from the\n",
|
|
33
35
|
" # top left corner\n",
|
|
34
36
|
"\n",
|
|
35
|
-
" frame_b =
|
|
37
|
+
" frame_b = shift_img(frame_a, (v,u))\n",
|
|
36
38
|
" return frame_a.astype(np.int32), frame_b.astype(np.int32)\n",
|
|
37
39
|
"\n",
|
|
38
40
|
"def test_piv():\n",
|
|
@@ -40,22 +42,22 @@
|
|
|
40
42
|
" default window_size = 32\n",
|
|
41
43
|
" \"\"\"\n",
|
|
42
44
|
" frame_a, frame_b = create_pair(image_size=64)\n",
|
|
43
|
-
" u, v = piv(frame_a, frame_b, window_size=64)\n",
|
|
45
|
+
" u, v, s2n = piv(frame_a, frame_b, window_size=64)\n",
|
|
44
46
|
" print(u,v)\n",
|
|
45
47
|
" assert dist(u, shift_u) < threshold\n",
|
|
46
|
-
" assert dist(v,
|
|
48
|
+
" assert dist(v, shift_v) < threshold\n",
|
|
47
49
|
"\n",
|
|
48
50
|
"def test_piv_smaller_window():\n",
|
|
49
51
|
" \"\"\" test of the search area larger than the window \"\"\"\n",
|
|
50
52
|
" frame_a, frame_b = create_pair(image_size=32, u=-3, v=-2)\n",
|
|
51
|
-
" u, v = piv(frame_a, frame_b, window_size=16, search_area_size=32)\n",
|
|
53
|
+
" u, v, s2n = piv(frame_a, frame_b, window_size=16, search_area_size=32)\n",
|
|
52
54
|
" assert dist(u, -3) < threshold\n",
|
|
53
55
|
" assert dist(v, 2) < threshold\n",
|
|
54
56
|
"\n",
|
|
55
57
|
"def test_extended_search_area():\n",
|
|
56
58
|
" \"\"\" test of the extended area PIV with larger image \"\"\"\n",
|
|
57
59
|
" frame_a, frame_b = create_pair(image_size=64)\n",
|
|
58
|
-
" u, v = piv(frame_a, frame_b,\n",
|
|
60
|
+
" u, v, s2n = piv(frame_a, frame_b,\n",
|
|
59
61
|
" window_size=16, search_area_size=32, overlap=0)\n",
|
|
60
62
|
"\n",
|
|
61
63
|
" assert (dist(u, shift_u) + dist(v, -shift_v)) < 2 * threshold\n",
|
|
@@ -63,7 +65,7 @@
|
|
|
63
65
|
"def test_extended_search_area_overlap():\n",
|
|
64
66
|
" \"\"\" test of the extended area PIV with different overlap \"\"\"\n",
|
|
65
67
|
" frame_a, frame_b = create_pair(image_size=64)\n",
|
|
66
|
-
" u, v = piv(frame_a, frame_b,\n",
|
|
68
|
+
" u, v, s2n = piv(frame_a, frame_b,\n",
|
|
67
69
|
" window_size=16, search_area_size=32, overlap=8)\n",
|
|
68
70
|
" assert (dist(u, shift_u) + dist(v, -shift_v)) < 2 * threshold\n",
|
|
69
71
|
"\n",
|
|
@@ -82,17 +84,24 @@
|
|
|
82
84
|
"def test_process_extended_search_area():\n",
|
|
83
85
|
" \"\"\" test of the extended area PIV from Cython \"\"\"\n",
|
|
84
86
|
" frame_a, frame_b = create_pair(image_size=64)\n",
|
|
85
|
-
" u, v = piv(frame_a, frame_b, window_size=16, search_area_size=32, dt=1, overlap=0)\n",
|
|
87
|
+
" u, v, s2n = piv(frame_a, frame_b, window_size=16, search_area_size=32, dt=1, overlap=0)\n",
|
|
86
88
|
" # assert(np.max(np.abs(u[:-1,:-1]-3)+np.abs(v[:-1,:-1]+2)) <= 0.3)\n",
|
|
87
89
|
" assert (dist(u, shift_u) + dist(v, -shift_v)) < 2 * threshold"
|
|
88
90
|
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"cell_type": "code",
|
|
94
|
+
"execution_count": null,
|
|
95
|
+
"metadata": {},
|
|
96
|
+
"outputs": [],
|
|
97
|
+
"source": []
|
|
89
98
|
}
|
|
90
99
|
],
|
|
91
100
|
"metadata": {
|
|
92
101
|
"kernelspec": {
|
|
93
|
-
"display_name": "Python
|
|
102
|
+
"display_name": "Python 3",
|
|
94
103
|
"language": "python",
|
|
95
|
-
"name": "
|
|
104
|
+
"name": "python3"
|
|
96
105
|
},
|
|
97
106
|
"language_info": {
|
|
98
107
|
"codemirror_mode": {
|
|
@@ -104,7 +113,7 @@
|
|
|
104
113
|
"name": "python",
|
|
105
114
|
"nbconvert_exporter": "python",
|
|
106
115
|
"pygments_lexer": "ipython3",
|
|
107
|
-
"version": "3.
|
|
116
|
+
"version": "3.10.6"
|
|
108
117
|
}
|
|
109
118
|
},
|
|
110
119
|
"nbformat": 4,
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
""" Testing basic PIV processes """
|
|
2
|
+
import numpy as np
|
|
3
|
+
from skimage.util import random_noise
|
|
4
|
+
from skimage import img_as_ubyte
|
|
5
|
+
from scipy.ndimage import shift as shift_img
|
|
6
|
+
# import pkg_resources as pkg
|
|
7
|
+
from importlib_resources import files
|
|
1
8
|
from openpiv.pyprocess import extended_search_area_piv as piv
|
|
2
9
|
from openpiv.pyprocess import fft_correlate_images, \
|
|
3
10
|
correlation_to_displacement
|
|
4
|
-
import
|
|
11
|
+
from openpiv import tools
|
|
5
12
|
|
|
6
|
-
import numpy as np
|
|
7
13
|
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
from skimage import img_as_ubyte
|
|
11
|
-
from scipy.ndimage import shift
|
|
12
|
-
|
|
13
|
-
threshold = 0.25
|
|
15
|
+
THRESHOLD = 0.25
|
|
14
16
|
|
|
15
17
|
# define "PIV" shift, i.e. creating u,v values that we want to get
|
|
16
18
|
# -5.5 pixels to the left and 3.2 pixels upwards
|
|
@@ -19,18 +21,18 @@ threshold = 0.25
|
|
|
19
21
|
# the second value is 1 pixel positive to the right
|
|
20
22
|
# shifted_digit_image=shift(some_digit_image,[2,1])
|
|
21
23
|
# so we expect to get later
|
|
22
|
-
# shift(image, [-1*
|
|
24
|
+
# shift(image, [-1*SHIFT_V, SHIFT_U])
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
# <------
|
|
26
|
-
|
|
28
|
+
SHIFT_U = -3.5 # shift to the left, should be placed in columns, axis=1
|
|
27
29
|
# ^
|
|
28
30
|
# |
|
|
29
31
|
# |
|
|
30
|
-
|
|
32
|
+
SHIFT_V = 2.5 # shift upwards, should be placed in rows, axis=0
|
|
31
33
|
|
|
32
34
|
|
|
33
|
-
def create_pair(image_size=32, u=
|
|
35
|
+
def create_pair(image_size=32, u=SHIFT_U, v=SHIFT_V):
|
|
34
36
|
""" creates a pair of images with a roll/shift """
|
|
35
37
|
frame_a = np.zeros((image_size, image_size))
|
|
36
38
|
frame_a = random_noise(frame_a)
|
|
@@ -42,7 +44,7 @@ def create_pair(image_size=32, u=shift_u, v=shift_v):
|
|
|
42
44
|
|
|
43
45
|
# frame_b = np.roll(np.roll(frame_a, u, axis=1), v, axis=0)
|
|
44
46
|
# scipy shift allows to shift by floating values
|
|
45
|
-
frame_b =
|
|
47
|
+
frame_b = shift_img(frame_a, (v, u), mode='wrap')
|
|
46
48
|
|
|
47
49
|
# fig, ax = plt.subplots(1, 2, figsize=(10, 5))
|
|
48
50
|
# ax[0].imshow(frame_a, cmap=plt.cm.gray)
|
|
@@ -60,16 +62,16 @@ def test_piv():
|
|
|
60
62
|
# extended_search_area_piv returns image based coordinate system
|
|
61
63
|
u, v, _ = piv(frame_a, frame_b, window_size=32)
|
|
62
64
|
print(u, v)
|
|
63
|
-
assert np.allclose(u,
|
|
64
|
-
assert np.allclose(v,
|
|
65
|
+
assert np.allclose(u, SHIFT_U, atol=THRESHOLD)
|
|
66
|
+
assert np.allclose(v, SHIFT_V, atol=THRESHOLD)
|
|
65
67
|
|
|
66
68
|
|
|
67
69
|
def test_piv_smaller_window():
|
|
68
70
|
""" test of the search area larger than the window """
|
|
69
71
|
frame_a, frame_b = create_pair(image_size=32, u=-3.5, v=-2.1)
|
|
70
72
|
u, v, _ = piv(frame_a, frame_b, window_size=16, search_area_size=32)
|
|
71
|
-
assert np.allclose(u, -3.5, atol=
|
|
72
|
-
assert np.allclose(v, -2.1, atol=
|
|
73
|
+
assert np.allclose(u, -3.5, atol=THRESHOLD)
|
|
74
|
+
assert np.allclose(v, -2.1, atol=THRESHOLD)
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
def test_extended_search_area():
|
|
@@ -80,10 +82,10 @@ def test_extended_search_area():
|
|
|
80
82
|
search_area_size=32,
|
|
81
83
|
overlap=0)
|
|
82
84
|
|
|
83
|
-
assert np.allclose(u, -3.5, atol=
|
|
84
|
-
assert np.allclose(v, -2.1, atol=
|
|
85
|
-
# assert dist(u,
|
|
86
|
-
# assert dist(v,
|
|
85
|
+
assert np.allclose(u, -3.5, atol=THRESHOLD)
|
|
86
|
+
assert np.allclose(v, -2.1, atol=THRESHOLD)
|
|
87
|
+
# assert dist(u, SHIFT_U) < THRESHOLD
|
|
88
|
+
# assert dist(v, SHIFT_V) < THRESHOLD
|
|
87
89
|
|
|
88
90
|
|
|
89
91
|
def test_extended_search_area_overlap():
|
|
@@ -94,8 +96,8 @@ def test_extended_search_area_overlap():
|
|
|
94
96
|
search_area_size=32,
|
|
95
97
|
overlap=8)
|
|
96
98
|
print(f"\n u={u}\n v={v}\n")
|
|
97
|
-
assert np.allclose(u,
|
|
98
|
-
assert np.allclose(v,
|
|
99
|
+
assert np.allclose(u, SHIFT_U, atol=THRESHOLD)
|
|
100
|
+
assert np.allclose(v, SHIFT_V, atol=THRESHOLD)
|
|
99
101
|
|
|
100
102
|
|
|
101
103
|
def test_extended_search_area_sig2noise():
|
|
@@ -110,8 +112,8 @@ def test_extended_search_area_sig2noise():
|
|
|
110
112
|
subpixel_method="gaussian"
|
|
111
113
|
)
|
|
112
114
|
|
|
113
|
-
assert np.allclose(u, -3.5, atol=
|
|
114
|
-
assert np.allclose(v, 2.1, atol=
|
|
115
|
+
assert np.allclose(u, -3.5, atol=THRESHOLD)
|
|
116
|
+
assert np.allclose(v, 2.1, atol=THRESHOLD)
|
|
115
117
|
|
|
116
118
|
|
|
117
119
|
def test_process_extended_search_area():
|
|
@@ -120,18 +122,37 @@ def test_process_extended_search_area():
|
|
|
120
122
|
u, v, _ = piv(frame_a, frame_b, window_size=16,
|
|
121
123
|
search_area_size=32, dt=2., overlap=0)
|
|
122
124
|
|
|
123
|
-
assert np.allclose(u,
|
|
124
|
-
assert np.allclose(v,
|
|
125
|
+
assert np.allclose(u, SHIFT_U/2., atol=THRESHOLD)
|
|
126
|
+
assert np.allclose(v, SHIFT_V/2., atol=THRESHOLD)
|
|
125
127
|
|
|
126
128
|
|
|
127
129
|
def test_sig2noise_ratio():
|
|
128
|
-
|
|
130
|
+
""" s2n ratio test """
|
|
131
|
+
im1 = files('openpiv.data').joinpath('test1/exp1_001_a.bmp')
|
|
132
|
+
im2 = files('openpiv.data').joinpath('test1/exp1_001_b.bmp')
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
frame_a = tools.imread(im1)
|
|
136
|
+
frame_b = tools.imread(im2)
|
|
137
|
+
|
|
138
|
+
u, v, s2n = piv(
|
|
139
|
+
frame_a.astype(np.int32),
|
|
140
|
+
frame_b.astype(np.int32),
|
|
141
|
+
window_size=32,
|
|
142
|
+
search_area_size=64,
|
|
143
|
+
sig2noise_method="peak2peak",
|
|
144
|
+
subpixel_method="gaussian"
|
|
145
|
+
)
|
|
146
|
+
# print(s2n.flatten().min(),s2n.mean(),s2n.max())
|
|
147
|
+
assert np.allclose(s2n.mean(), 1.422, rtol=1e-3)
|
|
148
|
+
assert np.allclose(s2n.max(), 2.264, rtol=1e-3)
|
|
129
149
|
|
|
130
150
|
|
|
131
151
|
def test_fft_correlate():
|
|
152
|
+
""" test of the fft correlation """
|
|
132
153
|
frame_a, frame_b = create_pair(image_size=32)
|
|
133
154
|
corr = fft_correlate_images(frame_a, frame_b)
|
|
134
155
|
u, v = correlation_to_displacement(corr[np.newaxis, ...], 1, 1)
|
|
135
|
-
assert np.allclose(u,
|
|
136
|
-
assert np.allclose(v,
|
|
156
|
+
assert np.allclose(u, SHIFT_U, atol=THRESHOLD)
|
|
157
|
+
assert np.allclose(v, SHIFT_V, atol=THRESHOLD)
|
|
137
158
|
|
|
@@ -4,6 +4,8 @@ import numpy as np
|
|
|
4
4
|
from skimage.util import random_noise
|
|
5
5
|
from skimage import img_as_ubyte
|
|
6
6
|
|
|
7
|
+
from scipy.ndimage import shift as shift_img
|
|
8
|
+
|
|
7
9
|
# import warnings
|
|
8
10
|
|
|
9
11
|
threshold = 0.1
|
|
@@ -23,7 +25,7 @@ def create_pair(image_size=32, u=3, v=2, w=1):
|
|
|
23
25
|
# bottom left corner, and the image is rolled from the
|
|
24
26
|
# top left corner
|
|
25
27
|
|
|
26
|
-
frame_b =
|
|
28
|
+
frame_b = shift_img(frame_a, (v, u, w))
|
|
27
29
|
return frame_a.astype(np.int32), frame_b.astype(np.int32)
|
|
28
30
|
|
|
29
31
|
|