|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "code",
|
5 |
| - "execution_count": 4, |
6 |
| - "metadata": {}, |
| 5 | + "execution_count": 1, |
| 6 | + "metadata": { |
| 7 | + "tags": [] |
| 8 | + }, |
7 | 9 | "outputs": [],
|
8 | 10 | "source": [
|
9 | 11 | "# %load test_tools.py\n",
|
|
19 | 21 | },
|
20 | 22 | {
|
21 | 23 | "cell_type": "code",
|
22 |
| - "execution_count": 5, |
| 24 | + "execution_count": 2, |
23 | 25 | "metadata": {},
|
24 | 26 | "outputs": [],
|
25 | 27 | "source": [
|
26 | 28 | "# test settings.pattern_a, b\n",
|
27 |
| - "from openpiv.windef import Settings\n", |
| 29 | + "from openpiv.windef import PIVSettings\n", |
28 | 30 | "from openpiv.tools import Multiprocesser\n",
|
29 | 31 | "\n"
|
30 | 32 | ]
|
31 | 33 | },
|
32 | 34 | {
|
33 | 35 | "cell_type": "code",
|
34 |
| - "execution_count": 6, |
| 36 | + "execution_count": 3, |
35 | 37 | "metadata": {},
|
36 | 38 | "outputs": [
|
37 | 39 | {
|
38 | 40 | "name": "stdout",
|
39 | 41 | "output_type": "stream",
|
40 | 42 | "text": [
|
41 |
| - "../data/test2/ 2image_00.tif 2image_01.tif\n" |
| 43 | + "../data/test2 2image_00.tif 2image_01.tif\n" |
42 | 44 | ]
|
43 | 45 | },
|
44 | 46 | {
|
|
47 | 49 | "1"
|
48 | 50 | ]
|
49 | 51 | },
|
50 |
| - "execution_count": 6, |
| 52 | + "execution_count": 3, |
51 | 53 | "metadata": {},
|
52 | 54 | "output_type": "execute_result"
|
53 | 55 | }
|
54 | 56 | ],
|
55 | 57 | "source": [
|
56 | 58 | "\n",
|
57 |
| - "settings = Settings()\n", |
58 |
| - "settings.filepath_images = '../data/test2/'\n", |
| 59 | + "settings = PIVSettings()\n", |
| 60 | + "settings.filepath_images = pathlib.Path('../data/test2/')\n", |
59 | 61 | "settings.frame_pattern_a = '2image_00.tif'\n",
|
60 | 62 | "settings.frame_pattern_b = '2image_01.tif'\n",
|
61 | 63 | "print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)\n",
|
|
66 | 68 | },
|
67 | 69 | {
|
68 | 70 | "cell_type": "code",
|
69 |
| - "execution_count": 20, |
| 71 | + "execution_count": 4, |
70 | 72 | "metadata": {},
|
71 | 73 | "outputs": [
|
72 | 74 | {
|
73 | 75 | "name": "stdout",
|
74 | 76 | "output_type": "stream",
|
75 | 77 | "text": [
|
76 |
| - "../data/test2/ 2image_*.tif (1+2),(3+4)\n", |
77 |
| - "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", |
78 |
| - "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", |
79 |
| - "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", |
80 |
| - "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", |
81 |
| - "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", |
82 |
| - "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" |
| 78 | + "../data/test2 2image_*.tif (1+2),(3+4)\n", |
| 79 | + "Pair: ../data/test2/2image_00.tif-../data/test2/2image_01.tif\n", |
| 80 | + "Pair: ../data/test2/2image_10.tif-../data/test2/2image_11.tif\n", |
| 81 | + "Pair: ../data/test2/2image_20.tif-../data/test2/2image_21.tif\n", |
| 82 | + "Pair: ../data/test2/2image_30.tif-../data/test2/2image_31.tif\n", |
| 83 | + "Pair: ../data/test2/2image_40.tif-../data/test2/2image_41.tif\n", |
| 84 | + "Pair: ../data/test2/2image_50.tif-../data/test2/2image_51.tif\n" |
83 | 85 | ]
|
84 | 86 | }
|
85 | 87 | ],
|
|
96 | 98 | },
|
97 | 99 | {
|
98 | 100 | "cell_type": "code",
|
99 |
| - "execution_count": 21, |
| 101 | + "execution_count": 5, |
100 | 102 | "metadata": {},
|
101 | 103 | "outputs": [
|
102 | 104 | {
|
103 | 105 | "name": "stdout",
|
104 | 106 | "output_type": "stream",
|
105 | 107 | "text": [
|
106 |
| - "../data/test2/ 2image_*.tif (1+2),(2+3)\n", |
107 |
| - "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", |
108 |
| - "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", |
109 |
| - "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", |
110 |
| - "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", |
111 |
| - "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", |
112 |
| - "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", |
113 |
| - "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", |
114 |
| - "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", |
115 |
| - "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", |
116 |
| - "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", |
117 |
| - "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" |
| 108 | + "../data/test2 2image_*.tif (1+2),(2+3)\n", |
| 109 | + "Pair: ../data/test2/2image_00.tif-../data/test2/2image_01.tif\n", |
| 110 | + "Pair: ../data/test2/2image_01.tif-../data/test2/2image_10.tif\n", |
| 111 | + "Pair: ../data/test2/2image_10.tif-../data/test2/2image_11.tif\n", |
| 112 | + "Pair: ../data/test2/2image_11.tif-../data/test2/2image_20.tif\n", |
| 113 | + "Pair: ../data/test2/2image_20.tif-../data/test2/2image_21.tif\n", |
| 114 | + "Pair: ../data/test2/2image_21.tif-../data/test2/2image_30.tif\n", |
| 115 | + "Pair: ../data/test2/2image_30.tif-../data/test2/2image_31.tif\n", |
| 116 | + "Pair: ../data/test2/2image_31.tif-../data/test2/2image_40.tif\n", |
| 117 | + "Pair: ../data/test2/2image_40.tif-../data/test2/2image_41.tif\n", |
| 118 | + "Pair: ../data/test2/2image_41.tif-../data/test2/2image_50.tif\n", |
| 119 | + "Pair: ../data/test2/2image_50.tif-../data/test2/2image_51.tif\n" |
118 | 120 | ]
|
119 | 121 | }
|
120 | 122 | ],
|
|
131 | 133 | },
|
132 | 134 | {
|
133 | 135 | "cell_type": "code",
|
134 |
| - "execution_count": 22, |
135 |
| - "metadata": {}, |
| 136 | + "execution_count": 6, |
| 137 | + "metadata": { |
| 138 | + "tags": [] |
| 139 | + }, |
136 | 140 | "outputs": [
|
137 | 141 | {
|
138 | 142 | "name": "stdout",
|
139 | 143 | "output_type": "stream",
|
140 | 144 | "text": [
|
141 |
| - "../data/test2/ 2image_*.tif (1+3),(2+4)\n", |
142 |
| - "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", |
143 |
| - "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", |
144 |
| - "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", |
145 |
| - "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", |
146 |
| - "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", |
147 |
| - "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", |
148 |
| - "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", |
149 |
| - "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", |
150 |
| - "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", |
151 |
| - "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" |
| 145 | + "../data/test2 2image_*.tif (1+3),(2+4)\n", |
| 146 | + "Pair: ../data/test2/2image_00.tif-../data/test2/2image_10.tif\n", |
| 147 | + "Pair: ../data/test2/2image_01.tif-../data/test2/2image_11.tif\n", |
| 148 | + "Pair: ../data/test2/2image_10.tif-../data/test2/2image_20.tif\n", |
| 149 | + "Pair: ../data/test2/2image_11.tif-../data/test2/2image_21.tif\n", |
| 150 | + "Pair: ../data/test2/2image_20.tif-../data/test2/2image_30.tif\n", |
| 151 | + "Pair: ../data/test2/2image_21.tif-../data/test2/2image_31.tif\n", |
| 152 | + "Pair: ../data/test2/2image_30.tif-../data/test2/2image_40.tif\n", |
| 153 | + "Pair: ../data/test2/2image_31.tif-../data/test2/2image_41.tif\n", |
| 154 | + "Pair: ../data/test2/2image_40.tif-../data/test2/2image_50.tif\n", |
| 155 | + "Pair: ../data/test2/2image_41.tif-../data/test2/2image_51.tif\n" |
152 | 156 | ]
|
153 | 157 | }
|
154 | 158 | ],
|
|
162 | 166 | "for (a,b) in zip(multi.files_a, multi.files_b):\n",
|
163 | 167 | " print(f\"Pair: {a}-{b}\")"
|
164 | 168 | ]
|
| 169 | + }, |
| 170 | + { |
| 171 | + "cell_type": "code", |
| 172 | + "execution_count": 7, |
| 173 | + "metadata": { |
| 174 | + "tags": [] |
| 175 | + }, |
| 176 | + "outputs": [ |
| 177 | + { |
| 178 | + "name": "stdout", |
| 179 | + "output_type": "stream", |
| 180 | + "text": [ |
| 181 | + "../data/test5 Pattern*_A.tif Pattern*_B.tif\n", |
| 182 | + "Number of files is 10\n", |
| 183 | + "Pair: ../data/test5/Pattern_1_A.tif-../data/test5/Pattern_1_B.tif\n", |
| 184 | + "Pair: ../data/test5/Pattern_2_A.tif-../data/test5/Pattern_2_B.tif\n", |
| 185 | + "Pair: ../data/test5/Pattern_3_A.tif-../data/test5/Pattern_3_B.tif\n", |
| 186 | + "Pair: ../data/test5/Pattern_4_A.tif-../data/test5/Pattern_4_B.tif\n", |
| 187 | + "Pair: ../data/test5/Pattern_5_A.tif-../data/test5/Pattern_5_B.tif\n", |
| 188 | + "Pair: ../data/test5/Pattern_6_A.tif-../data/test5/Pattern_6_B.tif\n", |
| 189 | + "Pair: ../data/test5/Pattern_7_A.tif-../data/test5/Pattern_7_B.tif\n", |
| 190 | + "Pair: ../data/test5/Pattern_8_A.tif-../data/test5/Pattern_8_B.tif\n", |
| 191 | + "Pair: ../data/test5/Pattern_9_A.tif-../data/test5/Pattern_9_B.tif\n", |
| 192 | + "Pair: ../data/test5/Pattern_10_A.tif-../data/test5/Pattern_10_B.tif\n" |
| 193 | + ] |
| 194 | + } |
| 195 | + ], |
| 196 | + "source": [ |
| 197 | + "settings = PIVSettings()\n", |
| 198 | + "settings.filepath_images = pathlib.Path('../data/test5')\n", |
| 199 | + "settings.frame_pattern_a = 'Pattern*_A.tif'\n", |
| 200 | + "settings.frame_pattern_b = 'Pattern*_B.tif'\n", |
| 201 | + "print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)\n", |
| 202 | + "\n", |
| 203 | + "multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)\n", |
| 204 | + "print(f'Number of files is {multi.n_files}')\n", |
| 205 | + "\n", |
| 206 | + "for (a,b) in zip(multi.files_a, multi.files_b):\n", |
| 207 | + " print(f\"Pair: {a}-{b}\")" |
| 208 | + ] |
| 209 | + }, |
| 210 | + { |
| 211 | + "cell_type": "code", |
| 212 | + "execution_count": 8, |
| 213 | + "metadata": { |
| 214 | + "tags": [] |
| 215 | + }, |
| 216 | + "outputs": [ |
| 217 | + { |
| 218 | + "name": "stdout", |
| 219 | + "output_type": "stream", |
| 220 | + "text": [ |
| 221 | + "../data/test6 Pattern_*_A.tif Pattern_*_B.tif\n", |
| 222 | + "Number of files is 5\n", |
| 223 | + "Pair: ../data/test6/Pattern_0001_A.tif-../data/test6/Pattern_1001_B.tif\n", |
| 224 | + "Pair: ../data/test6/Pattern_0002_A.tif-../data/test6/Pattern_1002_B.tif\n", |
| 225 | + "Pair: ../data/test6/Pattern_0003_A.tif-../data/test6/Pattern_1003_B.tif\n", |
| 226 | + "Pair: ../data/test6/Pattern_0004_A.tif-../data/test6/Pattern_1004_B.tif\n", |
| 227 | + "Pair: ../data/test6/Pattern_0005_A.tif-../data/test6/Pattern_1005_B.tif\n" |
| 228 | + ] |
| 229 | + } |
| 230 | + ], |
| 231 | + "source": [ |
| 232 | + "settings = PIVSettings()\n", |
| 233 | + "settings.filepath_images = pathlib.Path('../data/test6')\n", |
| 234 | + "settings.frame_pattern_a = 'Pattern_*_A.tif'\n", |
| 235 | + "settings.frame_pattern_b = 'Pattern_*_B.tif'\n", |
| 236 | + "print(settings.filepath_images,settings.frame_pattern_a, settings.frame_pattern_b)\n", |
| 237 | + "\n", |
| 238 | + "multi = Multiprocesser(settings.filepath_images, settings.frame_pattern_a, settings.frame_pattern_b)\n", |
| 239 | + "print(f'Number of files is {multi.n_files}')\n", |
| 240 | + "\n", |
| 241 | + "for (a,b) in zip(multi.files_a, multi.files_b):\n", |
| 242 | + " print(f\"Pair: {a}-{b}\")" |
| 243 | + ] |
| 244 | + }, |
| 245 | + { |
| 246 | + "cell_type": "code", |
| 247 | + "execution_count": null, |
| 248 | + "metadata": {}, |
| 249 | + "outputs": [], |
| 250 | + "source": [] |
165 | 251 | }
|
166 | 252 | ],
|
167 | 253 | "metadata": {
|
168 | 254 | "kernelspec": {
|
169 |
| - "display_name": "Python 3.9.13 ('openpiv')", |
| 255 | + "display_name": "Python 3 (ipykernel)", |
170 | 256 | "language": "python",
|
171 | 257 | "name": "python3"
|
172 | 258 | },
|
|
180 | 266 | "name": "python",
|
181 | 267 | "nbconvert_exporter": "python",
|
182 | 268 | "pygments_lexer": "ipython3",
|
183 |
| - "version": "3.9.13" |
| 269 | + "version": "3.11.0" |
184 | 270 | },
|
185 | 271 | "vscode": {
|
186 | 272 | "interpreter": {
|
|
0 commit comments