Viewer Notebook
This notebook is to view events from an HDF5 set.
import cait as ai
%config InlineBackend.figure_formats = ['svg'] # we need this for a suitable resolution of the plots
Parameters
Adapt these parameters to your HDF5 set.
print('Adapt these parameters to your measurement!')
PATH_DATA = ... # the path to the data set
FNAME = ... # the file name, without extension ('.h5') and appendix, e.g. bck_001
NMBR_CHANNELS = 2 # the number channels in the file
RECORD_LENGTH = 16384 # the number of samples per record window (written in par file)
SAMPLE_FREQUENCY = 25000 # the sample frequency of the measurement (written in par file)
APPENDIX = False # if the file has an automatically appended Cait appendix, e.g. '-P_0-L_1'
CHANNELS = None # if you set the appendix to true, you need to put here a list of the channel number inside the rdt file
Adapt these parameters to your measurement!
Event Interface
# create instance
ei = ai.EventInterface(record_length=RECORD_LENGTH,
sample_frequency=SAMPLE_FREQUENCY,
nmbr_channels=NMBR_CHANNELS)
ei.load_h5(path=PATH_DATA,
fname=FNAME,
channels=CHANNELS,
appendix=APPENDIX,
which_to_label=['events'])
# includes
# ei.load_labels_csv(path='', type='events')
# ei.create_labels_csv(path='')
ei.load_of()
ei.load_sev_par(name_appendix='_down4')
# start
ei.start(start_from_idx=0, print_label_list=False)
Content
dh = ai.DataHandler(nmbr_channels=NMBR_CHANNELS)
dh.set_filepath(path_h5=PATH_DATA,
fname=FNAME,
channels=CHANNELS,
appendix=APPENDIX)
dh.content()
Done.