|
803 | 803 | },
|
804 | 804 | {
|
805 | 805 | "cell_type": "code",
|
806 |
| - "execution_count": null, |
| 806 | + "execution_count": 5, |
807 | 807 | "metadata": {
|
808 | 808 | "collapsed": false
|
809 | 809 | },
|
810 |
| - "outputs": [], |
| 810 | + "outputs": [ |
| 811 | + { |
| 812 | + "name": "stdout", |
| 813 | + "output_type": "stream", |
| 814 | + "text": [ |
| 815 | + "Created local directory: /home/cx1111/Downloads/wfdbrecords/macecgdb\n", |
| 816 | + "Downloading missing file(s) into directory: /home/cx1111/Downloads/wfdbrecords/macecgdb\n", |
| 817 | + "Downloaded all missing files for record.\n", |
| 818 | + "[[ 1.00000000e-01 -3.05110000e+02 -2.87190000e+02 -2.66720000e+02]\n", |
| 819 | + " [ -2.87190000e+02 -2.71830000e+02 -2.87190000e+02 1.10000000e-01]\n", |
| 820 | + " [ -2.99990000e+02 -2.87190000e+02 -2.64160000e+02 -2.87190000e+02]\n", |
| 821 | + " ..., \n", |
| 822 | + " [ -2.79520000e+02 -2.87190000e+02 -2.66710000e+02 -2.87190000e+02]\n", |
| 823 | + " [ 1.20000000e-01 -2.00160000e+02 -2.87190000e+02 -2.79520000e+02]\n", |
| 824 | + " [ -2.87190000e+02 -2.84640000e+02 -2.87190000e+02 1.20000000e-01]]\n" |
| 825 | + ] |
| 826 | + } |
| 827 | + ], |
811 | 828 | "source": [
|
812 | 829 | "import wfdb\n",
|
813 |
| - "sig, fields=wfdb.rdsamp('macecgdb/test01_00s', pbdl=1, dldir='/home/cx1111/Downloads/wfdbrecords/macecgdb', keepfiles=1)\n", |
| 830 | + "sig, fields=wfdb.rdsamp('macecgdb/test01_00s', pbdl=1, dldir='/home/cx1111/Downloads/wfdbrecords/macecgdb')\n", |
814 | 831 | "\n",
|
815 | 832 | "print(sig)"
|
816 | 833 | ]
|
|
829 | 846 | "print(sig)"
|
830 | 847 | ]
|
831 | 848 | },
|
| 849 | + { |
| 850 | + "cell_type": "code", |
| 851 | + "execution_count": 2, |
| 852 | + "metadata": { |
| 853 | + "collapsed": false |
| 854 | + }, |
| 855 | + "outputs": [ |
| 856 | + { |
| 857 | + "name": "stdout", |
| 858 | + "output_type": "stream", |
| 859 | + "text": [ |
| 860 | + "Help on built-in function array in module numpy.core.multiarray:\n", |
| 861 | + "\n", |
| 862 | + "array(...)\n", |
| 863 | + " array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0)\n", |
| 864 | + " \n", |
| 865 | + " Create an array.\n", |
| 866 | + " \n", |
| 867 | + " Parameters\n", |
| 868 | + " ----------\n", |
| 869 | + " object : array_like\n", |
| 870 | + " An array, any object exposing the array interface, an\n", |
| 871 | + " object whose __array__ method returns an array, or any\n", |
| 872 | + " (nested) sequence.\n", |
| 873 | + " dtype : data-type, optional\n", |
| 874 | + " The desired data-type for the array. If not given, then\n", |
| 875 | + " the type will be determined as the minimum type required\n", |
| 876 | + " to hold the objects in the sequence. This argument can only\n", |
| 877 | + " be used to 'upcast' the array. For downcasting, use the\n", |
| 878 | + " .astype(t) method.\n", |
| 879 | + " copy : bool, optional\n", |
| 880 | + " If true (default), then the object is copied. Otherwise, a copy\n", |
| 881 | + " will only be made if __array__ returns a copy, if obj is a\n", |
| 882 | + " nested sequence, or if a copy is needed to satisfy any of the other\n", |
| 883 | + " requirements (`dtype`, `order`, etc.).\n", |
| 884 | + " order : {'C', 'F', 'A'}, optional\n", |
| 885 | + " Specify the order of the array. If order is 'C', then the array\n", |
| 886 | + " will be in C-contiguous order (last-index varies the fastest).\n", |
| 887 | + " If order is 'F', then the returned array will be in\n", |
| 888 | + " Fortran-contiguous order (first-index varies the fastest).\n", |
| 889 | + " If order is 'A' (default), then the returned array may be\n", |
| 890 | + " in any order (either C-, Fortran-contiguous, or even discontiguous),\n", |
| 891 | + " unless a copy is required, in which case it will be C-contiguous.\n", |
| 892 | + " subok : bool, optional\n", |
| 893 | + " If True, then sub-classes will be passed-through, otherwise\n", |
| 894 | + " the returned array will be forced to be a base-class array (default).\n", |
| 895 | + " ndmin : int, optional\n", |
| 896 | + " Specifies the minimum number of dimensions that the resulting\n", |
| 897 | + " array should have. Ones will be pre-pended to the shape as\n", |
| 898 | + " needed to meet this requirement.\n", |
| 899 | + " \n", |
| 900 | + " Returns\n", |
| 901 | + " -------\n", |
| 902 | + " out : ndarray\n", |
| 903 | + " An array object satisfying the specified requirements.\n", |
| 904 | + " \n", |
| 905 | + " See Also\n", |
| 906 | + " --------\n", |
| 907 | + " empty, empty_like, zeros, zeros_like, ones, ones_like, fill\n", |
| 908 | + " \n", |
| 909 | + " Examples\n", |
| 910 | + " --------\n", |
| 911 | + " >>> np.array([1, 2, 3])\n", |
| 912 | + " array([1, 2, 3])\n", |
| 913 | + " \n", |
| 914 | + " Upcasting:\n", |
| 915 | + " \n", |
| 916 | + " >>> np.array([1, 2, 3.0])\n", |
| 917 | + " array([ 1., 2., 3.])\n", |
| 918 | + " \n", |
| 919 | + " More than one dimension:\n", |
| 920 | + " \n", |
| 921 | + " >>> np.array([[1, 2], [3, 4]])\n", |
| 922 | + " array([[1, 2],\n", |
| 923 | + " [3, 4]])\n", |
| 924 | + " \n", |
| 925 | + " Minimum dimensions 2:\n", |
| 926 | + " \n", |
| 927 | + " >>> np.array([1, 2, 3], ndmin=2)\n", |
| 928 | + " array([[1, 2, 3]])\n", |
| 929 | + " \n", |
| 930 | + " Type provided:\n", |
| 931 | + " \n", |
| 932 | + " >>> np.array([1, 2, 3], dtype=complex)\n", |
| 933 | + " array([ 1.+0.j, 2.+0.j, 3.+0.j])\n", |
| 934 | + " \n", |
| 935 | + " Data-type consisting of more than one element:\n", |
| 936 | + " \n", |
| 937 | + " >>> x = np.array([(1,2),(3,4)],dtype=[('a','<i4'),('b','<i4')])\n", |
| 938 | + " >>> x['a']\n", |
| 939 | + " array([1, 3])\n", |
| 940 | + " \n", |
| 941 | + " Creating an array from sub-classes:\n", |
| 942 | + " \n", |
| 943 | + " >>> np.array(np.mat('1 2; 3 4'))\n", |
| 944 | + " array([[1, 2],\n", |
| 945 | + " [3, 4]])\n", |
| 946 | + " \n", |
| 947 | + " >>> np.array(np.mat('1 2; 3 4'), subok=True)\n", |
| 948 | + " matrix([[1, 2],\n", |
| 949 | + " [3, 4]])\n", |
| 950 | + "\n" |
| 951 | + ] |
| 952 | + } |
| 953 | + ], |
| 954 | + "source": [ |
| 955 | + "import numpy as np\n", |
| 956 | + "\n", |
| 957 | + "help(np.array)" |
| 958 | + ] |
| 959 | + }, |
| 960 | + { |
| 961 | + "cell_type": "code", |
| 962 | + "execution_count": 6, |
| 963 | + "metadata": { |
| 964 | + "collapsed": false |
| 965 | + }, |
| 966 | + "outputs": [ |
| 967 | + { |
| 968 | + "name": "stdout", |
| 969 | + "output_type": "stream", |
| 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" |
| 1004 | + ] |
| 1005 | + } |
| 1006 | + ], |
| 1007 | + "source": [ |
| 1008 | + "help(wfdb.rdann)" |
| 1009 | + ] |
| 1010 | + }, |
832 | 1011 | {
|
833 | 1012 | "cell_type": "code",
|
834 | 1013 | "execution_count": null,
|
|
0 commit comments