pyecsca.sca.edit module

pyecsca.sca.edit.trim(trace, start=None, end=None)[source]

Trim the trace samples, output contains samples between the start and end indices.

Parameters:
  • trace (Trace) –
  • start (Optional[int]) –
  • end (Optional[int]) –
Return type:

Trace

Returns:

pyecsca.sca.edit.reverse(trace)[source]

Reverse the samples of the trace.

Parameters:trace (Trace) –
Return type:Trace
Returns:
pyecsca.sca.edit.pad(trace, lengths, values=(0, 0))[source]

Pad the samples of the trace by values at the beginning and end.

Parameters:
  • trace (Trace) –
  • lengths (Union[Tuple[int, int], int]) – How much to pad at the beginning and end, either symmetric (if integer) or asymmetric (if tuple).
  • values (Union[Tuple[Any, Any], Any]) – What value to pad with, either symmetric or asymmetric (if tuple).
Return type:

Trace

Returns: