pyecsca.sca.trace.sampling module

Provides downsampling functions for traces.

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:

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:

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:

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:

downsample_decimate(trace, factor=2)[source]

Downsample samples of trace by factor by decimating.

Parameters:
Return type:

Trace

Returns: