Skip to content

Commit 0503253

Browse files
V1.0
updated docs
1 parent 9b63cb3 commit 0503253

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

docs/source/quickstart.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Import the `heartbeat` module and load a file
1313
1414
import heartbeat as hb
1515
16-
hrdata = hb.get_data('yourdata.csv', column_name='hr')
16+
hrdata = hb.get_data('data.csv')
1717
1818
1919
This returns a :code:`numpy.ndarray`.
@@ -24,7 +24,7 @@ Analysis requires the sampling rate for your data. If you know this *a priori*,
2424
2525
import heartbeat as hb
2626
27-
data = hb.get_data('yourdata.csv')
27+
data = hb.get_data('data.csv') #data.csv is sampled at 100Hz
2828
measures = hb.process(data, 100.0)
2929
3030
@@ -89,6 +89,9 @@ This returns a 1-dimensional :code:`numpy.ndarray` containing the heart rate dat
8989
:code:`get_data(filename, delim = ',', column_name = 'None')` requires one argument:
9090
9191
* **filename:** absolute or relative path to a valid (delimited .csv/.txt or matlab .mat) file;
92+
93+
Several optional arguments are available:
94+
9295
* **delim** _optional_: when loading a delimited .csv or .txt file, this specifies the delimiter used. Default delim = ',';
9396
* **column_name** _optional_: In delimited files with header: specifying column_name will return data from that column. Not specifying column_name for delimited files will assume the file contains only numerical data, returning np.nan values where data is not numerical. For matlab files: column_name specifies the table name in the matlab file.
9497
@@ -133,6 +136,9 @@ The toolkit has a simple built-in sample-rate detection. It can handle ms-based
133136
:code:`get_samplerate_datetime(datetimedata, timeformat = '%H:%M:%S.f')` requires one argument:
134137
135138
* **datetimedata:** a list, numpy array or array-like object containing datetime-based timestamps (string);
139+
140+
One optional argument is available:
141+
136142
* **timeformat** _optional_: the format of the datetime-strings in your dataset. Default timeformat='%H:%M:%S.f', 24-hour based time including ms: 21:43:12.569.
137143
138144
@@ -165,7 +171,7 @@ This returns:
165171
166172
import heartbeat as hb
167173
hrdata = hb.get_data('data2.csv', column_name='hr')
168-
timerdata = hb.get_data('data2.csv., column_name='timer')
174+
timerdata = hb.get_data('data2.csv', column_name='timer')
169175
170176
hb.process(dataset, hb.get_samplerate_mstimer(timerdata))
171177
@@ -190,7 +196,7 @@ This returns:
190196
191197
<module 'matplotlib.pyplot' [...]>
192198
193-
Object can then be saved or visualised:
199+
Object can then be saved, appended to, or visualised:
194200
195201
.. code-block:: python
196202
@@ -199,5 +205,5 @@ Object can then be saved or visualised:
199205
200206
plot_object.savefig('plot_1.jpg') #saves the plot as JPEG image.
201207
202-
plt.object.show() #displays plot
208+
plt_object.show() #displays plot
203209

0 commit comments

Comments
 (0)