Skip to content

Commit 859e952

Browse files
author
Chen Xie
committed
pip installable through pypi
1 parent 3907097 commit 859e952

File tree

4 files changed

+56
-38
lines changed

4 files changed

+56
-38
lines changed

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Include the license file
22
include LICENSE
33

4+
# Include readme file
5+
include README.md
6+
47
# Include the data files
58
# recursive-include data *
69

devtests.ipynb

Lines changed: 50 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@
959959
},
960960
{
961961
"cell_type": "code",
962-
"execution_count": 6,
962+
"execution_count": 4,
963963
"metadata": {
964964
"collapsed": false
965965
},
@@ -968,44 +968,59 @@
968968
"name": "stdout",
969969
"output_type": "stream",
970970
"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"
1004974
]
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"
10051018
}
10061019
],
10071020
"source": [
1008-
"help(wfdb.rdann)"
1021+
"import wfdb\n",
1022+
"\n",
1023+
"wfdb.rdsamp('macecgdb/test01_00s', pbdl=1)\n"
10091024
]
10101025
},
10111026
{

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
setup(
1818
name='wfdb',
1919

20-
# Versions should comply with PEP440. For a discussion on single-sourcing
20+
# Versions should comply with PEP440. For a discussion on single-sourcing
2121
# the version across setup.py and the project code, see
2222
# https://packaging.python.org/en/latest/single_source_version.html
23-
version='0.1.0',
23+
version='0.1.1',
2424

2525
description='The WFDB Python Toolbox',
2626
long_description=long_description,

wfdb/_rdsamp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ def rdsamp(
10221022
10231023
Example: sig, fields = wfdb.rdsamp('macecgdb/test01_00s', sampfrom=800, pbdl=1, dldir='/home/username/Downloads/wfdb')
10241024
"""
1025-
1025+
10261026
if sampfrom < 0:
10271027
sys.exit("sampfrom must be non-negative")
10281028
if channels and min(channels) < 0:

0 commit comments

Comments
 (0)