# %load test_tools.py
from openpiv.tools import imread, save, display_vector_field
from openpiv.pyprocess import extended_search_area_piv, get_coordinates
import pathlib
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.testing import compare
# np.seterr(all='raise')
# test settings.pattern_a, b
from openpiv.windef import Settings
from openpiv.tools import Multiprocesser
settings = Settings()
settings.filepath_images = '../data/test2/'
settings.frame_pattern_a = '2image_00.tif'
settings.frame_pattern_b = '2image_01.tif'
print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)
multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)
multi.n_files
../data/test2/ 2image_00.tif 2image_01.tif
1
settings.frame_pattern_a = '2image_*.tif'
settings.frame_pattern_b = '(1+2),(3+4)'
print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)
multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)
for (a,b) in zip(multi.files_a, multi.files_b):
print(f"Pair: {a}-{b}")
../data/test2/ 2image_*.tif (1+2),(3+4) Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_00.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_01.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_10.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_11.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_20.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_21.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_30.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_31.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_40.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_41.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_50.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_51.tif
settings.frame_pattern_a = '2image_*.tif'
settings.frame_pattern_b = '(1+2),(2+3)'
print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)
multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)
for (a,b) in zip(multi.files_a, multi.files_b):
print(f"Pair: {a}-{b}")
../data/test2/ 2image_*.tif (1+2),(2+3) Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_00.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_01.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_01.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_10.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_10.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_11.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_11.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_20.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_20.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_21.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_21.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_30.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_30.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_31.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_31.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_40.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_40.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_41.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_41.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_50.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_50.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_51.tif
settings.frame_pattern_a = '2image_*.tif'
settings.frame_pattern_b = '(1+3),(2+4)'
print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)
multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)
for (a,b) in zip(multi.files_a, multi.files_b):
print(f"Pair: {a}-{b}")
../data/test2/ 2image_*.tif (1+3),(2+4) Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_00.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_10.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_01.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_11.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_10.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_20.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_11.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_21.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_20.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_30.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_21.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_31.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_30.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_40.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_31.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_41.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_40.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_50.tif Pair: c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_41.tif-c:\Users\alex\repos\openpiv-python\openpiv\data\test2\2image_51.tif