#!/usr/bin/env python # coding: utf-8 # In[1]: # %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') # In[2]: # test settings.pattern_a, b from openpiv.windef import PIVSettings from openpiv.tools import Multiprocesser # In[3]: settings = PIVSettings() settings.filepath_images = pathlib.Path('../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 # In[4]: 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}") # In[5]: 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}") # In[6]: 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}") # In[7]: settings = PIVSettings() settings.filepath_images = pathlib.Path('../data/test5') settings.frame_pattern_a = 'Pattern*_A.tif' settings.frame_pattern_b = 'Pattern*_B.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) print(f'Number of files is {multi.n_files}') for (a,b) in zip(multi.files_a, multi.files_b): print(f"Pair: {a}-{b}") # In[8]: settings = PIVSettings() settings.filepath_images = pathlib.Path('../data/test6') settings.frame_pattern_a = 'Pattern_*_A.tif' settings.frame_pattern_b = 'Pattern_*_B.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) print(f'Number of files is {multi.n_files}') for (a,b) in zip(multi.files_a, multi.files_b): print(f"Pair: {a}-{b}") # In[ ]: