pyecsca.sca.trace.process module

Provides functions for sample-wise processing of single traces.

pyecsca.sca.trace.process.absolute(trace)[source]

Apply absolute value to samples of trace.

Parameters:

trace (Trace) –

Return type:

Trace

Returns:

pyecsca.sca.trace.process.invert(trace)[source]

Invert(negate) the samples of trace.

Parameters:

trace (Trace) –

Return type:

Trace

Returns:

pyecsca.sca.trace.process.threshold(trace, value)[source]

Map samples of the trace to 1 if they are above value or to 0.

Parameters:
Return type:

Trace

Returns:

pyecsca.sca.trace.process.rolling_mean(trace, window)[source]

Compute the rolling mean of trace using window.

Shortens the trace by window - 1.

Parameters:
Return type:

Trace

Returns:

pyecsca.sca.trace.process.offset(trace, offset)[source]

Offset samples of trace by offset, sample-wise.

Adds offset to all samples.

Parameters:
Return type:

Trace

Returns:

pyecsca.sca.trace.process.recenter(trace)[source]

Subtract the root mean square of the trace from its samples, sample-wise.

Parameters:

trace (Trace) –

Return type:

Trace

Returns:

pyecsca.sca.trace.process.normalize(trace)[source]

Normalize a trace by subtracting its mean and dividing by its standard deviation.

Parameters:

trace (Trace) –

Return type:

Trace

Returns:

pyecsca.sca.trace.process.normalize_wl(trace)[source]

Normalize a trace by subtracting its mean and dividing by a multiple (= len(trace)) of its standard deviation.

Parameters:

trace (Trace) –

Return type:

Trace

Returns:

pyecsca.sca.trace.process.transform(trace, min_value=0, max_value=1)[source]

Scale a trace so that its minimum is at min_value and its maximum is at max_value.

Parameters:
  • trace (Trace) –

  • min_value (Any) –

  • max_value (Any) –

Return type:

Trace

Returns: