Python Library   

Example Code

The following example code downloads 10 cases of arterial waveform from vitaldb and saves it as a png file.

Code

import matplotlib.pyplot as plt

from vitaldb import load_vital

cases = load_vital('SNUADC/ART,Solar8000/ART_SBP', interval=1/100, maxcases=10)

for caseid, case in cases.items():

    plt.figure(figsize=(20, 5))

    plt.plot(case['SNUADC/ART'][:500])

    plt.savefig('{}.png'.format(caseid))

Results

downloading track list...done

parsing tracks...done

filter cases...done

downloading https://api.vitaldb.net/trks/0f4441821bbf4b67 for 1/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/3ce544d7e3f6aa05 for 1/Solar8000/ART_SBP...done

downloading https://api.vitaldb.net/trks/6483bbf991f91ce0 for 4/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/7f3f9bc9ec801024 for 4/Solar8000/ART_SBP...done

downloading https://api.vitaldb.net/trks/a1e34182259ff3d4 for 5/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/a435b8b5ecc42f18 for 5/Solar8000/ART_SBP...done

downloading https://api.vitaldb.net/trks/cc0b9b951b41d2ac for 7/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/0d0c28647dc5af99 for 7/Solar8000/ART_SBP...done

downloading https://api.vitaldb.net/trks/64050db3a439ede9 for 10/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/9ba0e1d619b8929b for 10/Solar8000/ART_SBP...done

downloading https://api.vitaldb.net/trks/f5a2cb3343f1a713 for 12/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/f653f39bae56e33a for 12/Solar8000/ART_SBP...done

downloading https://api.vitaldb.net/trks/467a14cc3e519c32 for 13/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/0aacc643ce64a5e3 for 13/Solar8000/ART_SBP...done

downloading https://api.vitaldb.net/trks/4179a1318465e5f5 for 16/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/bf0004a58a158a99 for 16/Solar8000/ART_SBP...done

downloading https://api.vitaldb.net/trks/857a0bbc06c586c5 for 17/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/3cdf94f159e56184 for 17/Solar8000/ART_SBP...done

downloading https://api.vitaldb.net/trks/a2e608aea1c8ada3 for 19/SNUADC/ART...done

downloading https://api.vitaldb.net/trks/ea80954780591578 for 19/Solar8000/ART_SBP...done