MyBinder

VisualizationΒΆ

pyecsca uses holoviews, bokeh, datashader and matplotlib to visualize traces.

First load an example trace set containing one trace.

[ ]:
from pyecsca.sca.trace.plot import plot_trace, plot_traces
from pyecsca.sca.trace_set import PickleTraceSet
import holoviews as hv
[ ]:
trace_set = PickleTraceSet.read("example_traces.pickle")
len(trace_set)

Then setup the interactive bokeh session.

[ ]:
hv.extension("bokeh")

Plot a trace, filling available width. This uses datashader and will not work on a static rendering of a notebook. This is necessary to deal with large traces (millions of samples), which bokeh or matplotlib would not handle.

[ ]:
plot_trace(trace_set[0]).opts(width=950, height=600)

Process the trace by a lowpass and highpass filters and plot the two resulting traces.

[ ]:
from pyecsca.sca.trace.filter import filter_lowpass, filter_highpass
low = filter_lowpass(trace_set[0], 12_500_000, 50_000)
high = filter_highpass(trace_set[0], 12_500_000, 2_250_000)
[ ]:
plot_traces(high, low).opts(width=950, height=600)
[ ]: