|
959 | 959 | },
|
960 | 960 | {
|
961 | 961 | "cell_type": "code",
|
962 |
| - "execution_count": 6, |
| 962 | + "execution_count": 4, |
963 | 963 | "metadata": {
|
964 | 964 | "collapsed": false
|
965 | 965 | },
|
|
968 | 968 | "name": "stdout",
|
969 | 969 | "output_type": "stream",
|
970 | 970 | "text": [
|
971 |
| - "Help on function rdann in module wfdb._rdann:\n", |
972 |
| - "\n", |
973 |
| - "rdann(recordname, annot, sampfrom=0, sampto=[], anndisp=1)\n", |
974 |
| - " Read a WFDB annotation file recordname.annot and return the fields as lists or arrays\n", |
975 |
| - " \n", |
976 |
| - " Usage: annsamp, anntype, num, subtype, chan, aux, annfs = rdann(recordname, annot, \n", |
977 |
| - " sampfrom=0, sampto=[], \n", |
978 |
| - " anndisp=1)\n", |
979 |
| - " \n", |
980 |
| - " Input arguments:\n", |
981 |
| - " - recordname (required): The record name of the WFDB annotation file. ie. for \n", |
982 |
| - " file '100.atr', recordname='100'\n", |
983 |
| - " - annot (required): The annotator extension of the annotation file. ie. for \n", |
984 |
| - " file '100.atr', annot='atr'\n", |
985 |
| - " - sampfrom (default=0): The minimum sample number for annotations to be returned.\n", |
986 |
| - " - sampto (default=the final annotation sample): The maximum sample number for \n", |
987 |
| - " annotations to be returned.\n", |
988 |
| - " - anndisp (default = 1): The annotation display flag that controls the data type \n", |
989 |
| - " of the 'anntype' output parameter. 'anntype' will either be an integer key(0), \n", |
990 |
| - " a shorthand display symbol(1), or a longer annotation code.\n", |
991 |
| - " \n", |
992 |
| - " Output arguments:\n", |
993 |
| - " - annsamp: The annotation location in samples relative to the beginning of the record.\n", |
994 |
| - " - anntype: The annotation type according the the standard WFDB keys.\n", |
995 |
| - " - subtype: The marked class/category of the annotation.\n", |
996 |
| - " - chan: The signal channel associated with the annotations.\n", |
997 |
| - " - num: The marked annotation number. This is not equal to the index of the current annotation.\n", |
998 |
| - " - aux: The auxiliary information string for the annotation.\n", |
999 |
| - " - annfs: The sampling frequency written in the beginning of the annotation file if present.\n", |
1000 |
| - " \n", |
1001 |
| - " *NOTE: Every annotation contains the 'annsamp' and 'anntype' field. All \n", |
1002 |
| - " other fields default to 0 or empty if not present.\n", |
1003 |
| - "\n" |
| 971 | + "<class 'int'>\n", |
| 972 | + "Downloading missing file(s) into directory: /home/cx1111/PhysionetProjects/wfdb-python\n", |
| 973 | + "Downloaded all missing files for record.\n" |
1004 | 974 | ]
|
| 975 | + }, |
| 976 | + { |
| 977 | + "data": { |
| 978 | + "text/plain": [ |
| 979 | + "(array([[ 1.00000000e-01, -3.05110000e+02, -2.87190000e+02,\n", |
| 980 | + " -2.66720000e+02],\n", |
| 981 | + " [ -2.87190000e+02, -2.71830000e+02, -2.87190000e+02,\n", |
| 982 | + " 1.10000000e-01],\n", |
| 983 | + " [ -2.99990000e+02, -2.87190000e+02, -2.64160000e+02,\n", |
| 984 | + " -2.87190000e+02],\n", |
| 985 | + " ..., \n", |
| 986 | + " [ -2.79520000e+02, -2.87190000e+02, -2.66710000e+02,\n", |
| 987 | + " -2.87190000e+02],\n", |
| 988 | + " [ 1.20000000e-01, -2.00160000e+02, -2.87190000e+02,\n", |
| 989 | + " -2.79520000e+02],\n", |
| 990 | + " [ -2.87190000e+02, -2.84640000e+02, -2.87190000e+02,\n", |
| 991 | + " 1.20000000e-01]]),\n", |
| 992 | + " {'basedate': '',\n", |
| 993 | + " 'baseline': [0, 0, 0, 0],\n", |
| 994 | + " 'basetime': '',\n", |
| 995 | + " 'byteoffset': [0, 0, 0, 0],\n", |
| 996 | + " 'comments': [' <age>: 25 <sex>: M <diagnoses>: (none) <medications>: (none)'],\n", |
| 997 | + " 'filename': ['test01_00s.dat',\n", |
| 998 | + " 'test01_00s.dat',\n", |
| 999 | + " 'test01_00s.dat',\n", |
| 1000 | + " 'test01_00s.dat'],\n", |
| 1001 | + " 'fmt': ['16', '16', '16', '16'],\n", |
| 1002 | + " 'fs': 500.0,\n", |
| 1003 | + " 'gain': [100.0, 100.0, 100.0, 100.0],\n", |
| 1004 | + " 'initvalue': [10, -8, -57, -66],\n", |
| 1005 | + " 'nsamp': 4000,\n", |
| 1006 | + " 'nsampseg': [],\n", |
| 1007 | + " 'nseg': 1,\n", |
| 1008 | + " 'nsig': 4,\n", |
| 1009 | + " 'sampsperframe': [1, 1, 1, 1],\n", |
| 1010 | + " 'signame': ['ECG', 'ECG', 'ECG', 'ECG'],\n", |
| 1011 | + " 'skew': [0, 0, 0, 0],\n", |
| 1012 | + " 'units': ['mV', 'mV', 'mV', 'mV']})" |
| 1013 | + ] |
| 1014 | + }, |
| 1015 | + "execution_count": 4, |
| 1016 | + "metadata": {}, |
| 1017 | + "output_type": "execute_result" |
1005 | 1018 | }
|
1006 | 1019 | ],
|
1007 | 1020 | "source": [
|
1008 |
| - "help(wfdb.rdann)" |
| 1021 | + "import wfdb\n", |
| 1022 | + "\n", |
| 1023 | + "wfdb.rdsamp('macecgdb/test01_00s', pbdl=1)\n" |
1009 | 1024 | ]
|
1010 | 1025 | },
|
1011 | 1026 | {
|
|
0 commit comments