Basic trace visualization using limpetGUI

Author: Gernot Plank gernot.plank@medunigraz.at

Bernardo Martins Rocha <bernardomartinsrocha@gmail.com>

Trace visualization using limpetGUI

limpetGUI is a simple tool for visualizing traces output with bench. It has been developed originally by Bernardo Rocha. Using bench traces of all state variables can be dumped to binary files by specifying the --validate option. If one is interested in a detailed analysis of all traces it is recommended to increase the temporal resolution using --dt-out which is specified in ms. For instance, running

dumps all state variable traces of the TT2 model into a number of binary files, each trace is written at a temporal output resolution of 0.01 ms == 10 \(\mu s\). Each trace is written into a separate binary file. The header file, in this case named TT2_header.txt keeps track of the individual files, the type and size of data tokens stored in each file. The header file follows the following format:

Conversion to hdf5

limpetGUI expects hdf5 files as input. The individual *.bin files output by bench are dumped into a single hdf5 file using the bin2h5 python script. All files listed in the corresponding header file are read in and added to the hdf5 file. If one is interested only in a subset of state variables the header file can be modified by simply deleting all file pertaining to state variables that should not be included and leaving the rest. Launching the command

Using limpetGUI

Comparing traces

Quite often it is of interest to investigate the effect of a given modification upon state variables, be it the modification of some parameters in the model or the impact of changes in the numerical integration such as changing the time step or using a different integrator. limpetGUI reads in two hdf5 files and plots corresponding traces together. For instance, a comparison between the standard TT2 model and a modified TT2-PZ model is shwon in fig-limpetGUI-compare-mod-model-env and fig-limpetGUI-compare-mod-model-zoom.

Comparing state variables of baseline TT2 model (red traces) with modified TT2-PZ model (blue traces). The baseline model approaches a limit cycle whereas the modified TT2-PZ does not showing alternans patterns in Calcium-related state variables.
Comparing state variables of baseline TT2 model (red traces) with modified TT2-PZ model (blue traces). The baseline model approaches a limit cycle whereas the modified TT2-PZ does not showing alternans patterns in Calcium-related state variables.
Comparing all state variables of baseline TT2 model with modified TT2-PZ model as in fig-limpetGUI-compare-mod-model-env, but zoomed in on the last 6 cycles of the pacing protocol.
Comparing all state variables of baseline TT2 model with modified TT2-PZ model as in fig-limpetGUI-compare-mod-model-env, but zoomed in on the last 6 cycles of the pacing protocol.

In fig-limpetGUI-compare-mod-integrator the effect of altering the integration time step upon state variable traces is shown. While the overall behavior remains largely unaffected noticeable deviations are witnessed in some state variable traces.

Comparing TT2 model integrated with time steps of dt=0.01 ms and dt=0.2 ms.
Comparing TT2 model integrated with time steps of dt=0.01 ms and dt=0.2 ms.

Comparing traces across models

By default, limpetGUI compares traces between two h5 files where correspondence is established based on the names of the state variables. This straight forward approach of establishing correspondence does not work when traces are compared between different models. Names of various states are not consistent across models although they may refer to the same physical quantities. In such cases the establish between traces must be established manually by defining a mapping that can be passed on to limpetGUI. A map follows the simple definition

© Copyright 2020 openCARP project    Supported by DFG    Contact    Imprint and data protection