|
50 | 50 | "import json\n", |
51 | 51 | "import os\n", |
52 | 52 | "\n", |
53 | | - "import matplotlib as mpl\n", |
54 | 53 | "import matplotlib.pyplot as plt\n", |
55 | 54 | "import numpy as np\n", |
56 | 55 | "\n", |
57 | | - "from PIL import Image\n", |
58 | | - "from time import sleep" |
| 56 | + "from PIL import Image" |
59 | 57 | ] |
60 | 58 | }, |
61 | 59 | { |
|
93 | 91 | "id": "77d78e7d", |
94 | 92 | "metadata": {}, |
95 | 93 | "outputs": [ |
| 94 | + { |
| 95 | + "name": "stderr", |
| 96 | + "output_type": "stream", |
| 97 | + "text": [ |
| 98 | + "A newer version (0.63.1) of dandi/dandi-cli is available. You are using 0.61.2\n" |
| 99 | + ] |
| 100 | + }, |
96 | 101 | { |
97 | 102 | "name": "stdout", |
98 | 103 | "output_type": "stream", |
|
255 | 260 | "name": "stderr", |
256 | 261 | "output_type": "stream", |
257 | 262 | "text": [ |
258 | | - "c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\scipy\\__init__.py:169: UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.4\n", |
259 | | - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n", |
260 | 263 | "WARNING:root:many=True not supported from argparse\n", |
261 | 264 | "INFO:NwayMatching:NWAY_COMMIT_SHA None\n", |
262 | 265 | "INFO:NwayMatching:Nway matching version 0.6.0\n", |
263 | | - "c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\scipy\\__init__.py:169: UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.4\n", |
264 | | - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n", |
265 | | - "c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\scipy\\__init__.py:169: UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.4\n", |
266 | | - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n", |
267 | | - "c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\scipy\\__init__.py:169: UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.4\n", |
268 | | - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n", |
269 | 266 | "WARNING:root:many=True not supported from argparse\n", |
270 | 267 | "WARNING:root:many=True not supported from argparse\n", |
271 | 268 | "INFO:PairwiseMatching:Matching 1193675753 to 1194754135\n", |
272 | 269 | "INFO:PairwiseMatching:Matching 1193675753 to 1194754135: best registration was ['Crop', 'CLAHE', 'PhaseCorrelate']\n", |
273 | | - "multiprocessing.pool.RemoteTraceback: \n", |
274 | | - "\"\"\"\n", |
275 | | - "Traceback (most recent call last):\n", |
276 | | - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\multiprocessing\\pool.py\", line 125, in worker\n", |
277 | | - " result = (True, func(*args, **kwds))\n", |
278 | | - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\multiprocessing\\pool.py\", line 48, in mapstar\n", |
279 | | - " return list(map(*args))\n", |
280 | | - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\nway_matching.py\", line 121, in pair_match_job\n", |
281 | | - " pair_match.run()\n", |
282 | | - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\pairwise_matching.py\", line 495, in run\n", |
283 | | - " segmask_moving_3d_registered = transform_mask(\n", |
284 | | - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\pairwise_matching.py\", line 384, in transform_mask\n", |
285 | | - " dtype=np.int)\n", |
286 | | - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\numpy\\__init__.py\", line 338, in __getattr__\n", |
287 | | - " raise AttributeError(__former_attrs__[attr])\n", |
288 | | - "AttributeError: module 'numpy' has no attribute 'int'.\n", |
289 | | - "`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.\n", |
290 | | - "The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n", |
291 | | - " https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations\n", |
292 | | - "\"\"\"\n", |
293 | | - "\n", |
294 | | - "The above exception was the direct cause of the following exception:\n", |
295 | | - "\n", |
296 | | - "Traceback (most recent call last):\n", |
297 | | - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\runpy.py\", line 196, in _run_module_as_main\n", |
298 | | - " return _run_code(code, main_globals, None,\n", |
299 | | - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\runpy.py\", line 86, in _run_code\n", |
300 | | - " exec(code, run_globals)\n", |
301 | | - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\nway_matching.py\", line 502, in <module>\n", |
302 | | - " nmod.run()\n", |
303 | | - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\nway_matching.py\", line 462, in run\n", |
304 | | - " self.pair_matches = pool.map(pair_match_job, pair_arg_list)\n", |
305 | | - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\multiprocessing\\pool.py\", line 367, in map\n", |
306 | | - " return self._map_async(func, iterable, mapstar, chunksize).get()\n", |
307 | | - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\multiprocessing\\pool.py\", line 774, in get\n", |
308 | | - " raise self._value\n", |
309 | | - "AttributeError: module 'numpy' has no attribute 'int'.\n", |
310 | | - "`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.\n", |
311 | | - "The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n", |
312 | | - " https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations\n" |
| 270 | + "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\nway\\utils.py:48: FutureWarning: In a future version of pandas all arguments of DataFrame.sort_index will be keyword-only.\n", |
| 271 | + " df = df.sort_index(0)\n", |
| 272 | + "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\nway\\utils.py:49: FutureWarning: In a future version of pandas all arguments of DataFrame.sort_index will be keyword-only.\n", |
| 273 | + " df = df.sort_index(1)\n", |
| 274 | + "INFO:NwayMatching:registration success(1) or failure (0):\n", |
| 275 | + " 0 1\n", |
| 276 | + "0 1 1\n", |
| 277 | + "1 1 1\n", |
| 278 | + "id map{\n", |
| 279 | + " \"0\": 1193675753,\n", |
| 280 | + " \"1\": 1194754135\n", |
| 281 | + "}\n", |
| 282 | + "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\nway\\nway_matching.py:208: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", |
| 283 | + " matching_frame = matching_frame.append(pairframe)\n", |
| 284 | + "INFO:NwayMatching:Nway matching is done!\n", |
| 285 | + "INFO:NwayMatching:Creating match summary plots\n", |
| 286 | + "WARNING:root:setting Dict fields not supported from argparse\n", |
| 287 | + "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\argschema\\utils.py:346: FutureWarning: '--nway_output.nway_matches' is using old-style command-line syntax with each element as a separate argument. This will not be supported in argschema after 2.0. See http://argschema.readthedocs.io/en/master/user/intro.html#command-line-specification for details.\n", |
| 288 | + " warnings.warn(warn_msg, FutureWarning)\n", |
| 289 | + "WARNING:root:many=True not supported from argparse\n", |
| 290 | + "INFO:NwayMatching:wrote matching_output\\nway_match_fraction_plot_2024_11_14_13_37_50.png\n", |
| 291 | + "INFO:NwayMatching:wrote matching_output\\nway_warp_overlay_plot_2024_11_14_13_37_50.png\n", |
| 292 | + "INFO:NwayMatching:wrote matching_output\\nway_warp_summary_plot_2024_11_14_13_37_50.png\n", |
| 293 | + "INFO:NwayMatching:wrote ./output.json\n" |
313 | 294 | ] |
314 | 295 | } |
315 | 296 | ], |
316 | 297 | "source": [ |
317 | | - "!python -m nway.nway_matching --input_json input.json --output_json \"./output.json\" --output_dir matching_output" |
| 298 | + "!python3 -m nway.nway_matching --input_json input.json --output_json \"./output.json\" --output_dir matching_output" |
318 | 299 | ] |
319 | 300 | }, |
320 | 301 | { |
|
385 | 366 | { |
386 | 367 | "data": { |
387 | 368 | "text/plain": [ |
388 | | - "<matplotlib.image.AxesImage at 0x1c3b53e35b0>" |
| 369 | + "<matplotlib.image.AxesImage at 0x21dff47bfa0>" |
389 | 370 | ] |
390 | 371 | }, |
391 | 372 | "execution_count": 13, |
|
421 | 402 | { |
422 | 403 | "data": { |
423 | 404 | "text/plain": [ |
424 | | - "<matplotlib.image.AxesImage at 0x1c3b7dbdf00>" |
| 405 | + "<matplotlib.image.AxesImage at 0x21dff4fe680>" |
425 | 406 | ] |
426 | 407 | }, |
427 | 408 | "execution_count": 14, |
|
0 commit comments