|
376 | 376 | "# Make a temporary download directory in your current working directory\n",
|
377 | 377 | "cwd = os.getcwd()\n",
|
378 | 378 | "dl_dir = os.path.join(cwd, 'tmp_dl_dir')\n",
|
379 |
| - "# Make sure to use a new directory\n", |
380 |
| - "while os.path.exists(dl_dir):\n", |
381 |
| - " dl_dir = dl_dir+'1'\n", |
382 | 379 | "\n",
|
383 | 380 | "# Download all the WFDB content\n",
|
384 | 381 | "wfdb.dl_database('ahadb', dl_dir=dl_dir)\n",
|
|
525 | 522 | "comparitor.plot(title='xqrs detected qrs vs reference annotations')"
|
526 | 523 | ]
|
527 | 524 | },
|
| 525 | + { |
| 526 | + "cell_type": "code", |
| 527 | + "execution_count": null, |
| 528 | + "metadata": {}, |
| 529 | + "outputs": [], |
| 530 | + "source": [] |
| 531 | + }, |
| 532 | + { |
| 533 | + "cell_type": "code", |
| 534 | + "execution_count": null, |
| 535 | + "metadata": {}, |
| 536 | + "outputs": [], |
| 537 | + "source": [ |
| 538 | + "# Cleanup for all demos\n", |
| 539 | + "for file in ['100x.hea', '100.dat', # demo 10\n", |
| 540 | + " 'ecg-record.hea', 'ecg-record.dat', # demo 11 \n", |
| 541 | + " 'test01_00s_framex.hea', 'test01_00s.dat', # demo 12\n", |
| 542 | + " '100.cpy', # demo 13\n", |
| 543 | + " 'b001.cpy', # demo 14\n", |
| 544 | + " ]:\n", |
| 545 | + " if os.path.isfile(file):\n", |
| 546 | + " os.remove(file)\n", |
| 547 | + "\n", |
| 548 | + "dl_dir = os.path.join(cwd, 'tmp_dl_dir') # demo 17, 18\n", |
| 549 | + "if os.path.isdir(dl_dir):\n", |
| 550 | + " shutil.rmtree(dl_dir)" |
| 551 | + ] |
| 552 | + }, |
528 | 553 | {
|
529 | 554 | "cell_type": "code",
|
530 | 555 | "execution_count": null,
|
|
0 commit comments