Data extraction #468

Lawrence Leroux (2021-12-11 03:26) · 656 view(s) · 1 comment(s)

Hi,

I'm working on a research project on EEG. I would need to download the complete BIS data with Raw EEG wave. Is there a way to easily download a .csv file containing the EEG waves plus the rest of the BIS data already synchronized? I cannot seem to do it using the data viewer and it would take a long time using the API

Thanks

Lawrence  


vitaldb2017 (2022-01-09 22:33)
You can download raw EEG waveforms and BIS values using the vitaldb library with the following code.

import vitaldb
track_names = ['BIS/EEG1_WAV', 'BIS/BIS']
for icase in range(1, 10): # please test with the first 10 cases and then download 6388 cases
vf = vitaldb.VitalFile(icase, track_names)
values = vf.to_numpy(track_names, 1/128)
vf.to_vital(f'{icase}.vital')