cait.VizTool
- class cait.VizTool(csv_path=None, nmbr_features=None, datahandler=None, path_h5=None, fname=None, group=None, sample_frequency=25000, record_length=16384, nmbr_channels=None, datasets=None, table_names=None, bins=200, batch_size=1000, *args, **kwargs)[source]
Bases:
objectA class to visualize the parameters and corresponding events, and allow for interactive cuts.
The VizTool can get the data either from a CSV file, or from an HDF5 file. Only in the second case, the calculation of standard event and visualization of raw data is possible.
- Parameters
csv_path (str) – The full path to the CSV file.
nmbr_features (int) – The number of columns in the CSV file, which is also the number of features.
datahandler (cait.DataHandler) – A DataHandler instance to be used instead of specifying the location of the HDF5 file and sample_frequency, channels, …
path_h5 (str) – The path to the directory which contains the HDF5 file.
fname (str) – The naming of the HDF5 file, without the .h5 appendix.
group (str) – The group from which we take data in the HDF5 file. Typically this is “events”, “testpulses” or “noise”.
sample_frequency (int) – The sample frequency of the recording.
record_length (int) – The record length of the recording.
nmbr_channels (int) – The number of channels in the HDF5 set.
datasets (dict) – This dictionary describes which datasets are loaded from the HDF5 set. The keys of the dict are the names that will be displayed in the VizTool. The values are lists, where the first element is the name of the data set in the HDF5 group, followed by two elements which are either an integer or None. If they are integer, they correspond to the index in the first and second dimension of the data set. If they are None, then no indexing is done in this dimension. For quick inspection, the values can also be 1d numpy arrays. For reproducibility, it is nevertheless recommended to include such additional datasets in the HDF5 file first (using the dh.include_values() method) and loading it from there.
table_names (list) – The VizTool shows a table of the parameters of events that are currently selected. With this list, names (same names as are the keys in the datasets dict) can be provided to choose the parameters that are included in the table.
bins (int) – The number of bins for the histograms that are displayed of the selected parameters.
batch_size (int) – The batch size for the calculation of standard events.
- set_colors(color_flag: list)[source]
Provide a list with numerical values, that correspond to the color intensities of the events.
- Parameters
color_flag (list) – The color intensities of the events.