pyecsca.sca.trace.sampling module

Provides downsampling functions for traces.

pyecsca.sca.trace.sampling.downsample_average(trace, factor=2)[source]

Downsample samples of trace by factor by averaging factor consecutive samples in non-intersecting windows.

Parameters:
Return type:

Trace

Returns:

pyecsca.sca.trace.sampling.downsample_pick(trace, factor=2, offset=0)[source]

Downsample samples of trace by factor by picking each factor-th sample, starting at offset.

Parameters:
  • trace (Trace) –

  • factor (int) –

  • offset (int) –

Return type:

Trace

Returns:

pyecsca.sca.trace.sampling.downsample_max(trace, factor=2)[source]

Downsample samples of trace by factor by taking the maximum out of factor consecutive samples in non-intersecting windows.

Parameters:
Return type:

Trace

Returns:

pyecsca.sca.trace.sampling.downsample_min(trace, factor=2)[source]

Downsample samples of trace by factor by taking the minimum out of factor consecutive samples in non-intersecting windows.

Parameters:
Return type:

Trace

Returns:

pyecsca.sca.trace.sampling.downsample_decimate(trace, factor=2)[source]

Downsample samples of trace by factor by decimating.

Parameters:
Return type:

Trace

Returns: