{ "cells": [ { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# %load test_tools.py\n", "from openpiv.tools import imread, save, display_vector_field\n", "from openpiv.pyprocess import extended_search_area_piv, get_coordinates\n", "import pathlib\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from matplotlib.testing import compare\n", "\n", "# np.seterr(all='raise')\n" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "# test settings.pattern_a, b\n", "from openpiv.windef import Settings\n", "from openpiv.tools import Multiprocesser\n", "\n" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "../data/test2/ 2image_00.tif 2image_01.tif\n" ] }, { "data": { "text/plain": [ "1" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\n", "settings = Settings()\n", "settings.filepath_images = '../data/test2/'\n", "settings.frame_pattern_a = '2image_00.tif'\n", "settings.frame_pattern_b = '2image_01.tif'\n", "print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)\n", "\n", "multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)\n", "multi.n_files" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "../data/test2/ 2image_*.tif (1+2),(3+4)\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n" ] } ], "source": [ "settings.frame_pattern_a = '2image_*.tif'\n", "settings.frame_pattern_b = '(1+2),(3+4)'\n", "print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)\n", "\n", "multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)\n", "\n", "for (a,b) in zip(multi.files_a, multi.files_b):\n", " print(f\"Pair: {a}-{b}\")\n" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "../data/test2/ 2image_*.tif (1+2),(2+3)\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n" ] } ], "source": [ "settings.frame_pattern_a = '2image_*.tif'\n", "settings.frame_pattern_b = '(1+2),(2+3)'\n", "print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)\n", "\n", "multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)\n", "\n", "for (a,b) in zip(multi.files_a, multi.files_b):\n", " print(f\"Pair: {a}-{b}\")" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "../data/test2/ 2image_*.tif (1+3),(2+4)\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n", "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\n" ] } ], "source": [ "settings.frame_pattern_a = '2image_*.tif'\n", "settings.frame_pattern_b = '(1+3),(2+4)'\n", "print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)\n", "\n", "multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)\n", "\n", "for (a,b) in zip(multi.files_a, multi.files_b):\n", " print(f\"Pair: {a}-{b}\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.9.13 ('openpiv')", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.13" }, "vscode": { "interpreter": { "hash": "527f8b2821ddd06ad9de53fa6852824bf4860374cd5a0b7076d3fcd9bfd7fc9a" } } }, "nbformat": 4, "nbformat_minor": 4 }