piel.analysis.signals.dc.utils#

Attributes#

Functions#

get_trace_values_by_datum(→ Optional[numpy.ndarray])

Retrieves the values of a trace from a SignalDC instance based on the unit's datum.

get_trace_values_by_unit(→ Optional[numpy.ndarray])

Retrieves the values of a trace from a SignalDC instance based on the exact unit.

Module Contents#

logger#
get_trace_values_by_datum(signal_dc: piel.types.SignalDC, desired_datum: str) numpy.ndarray | None[source]#

Retrieves the values of a trace from a SignalDC instance based on the unit’s datum.

Parameters:
  • signal_dc (SignalDC) – The SignalDC instance containing the traces.

  • desired_datum (str) – The datum type to filter traces (e.g., ‘voltage’, ‘ampere’) See unit definitions.

Returns:

The numpy array of trace values if found, else None.

Return type:

Optional[np.ndarray]

get_trace_values_by_unit(signal_dc: piel.types.SignalDC, desired_unit: piel.types.Unit) numpy.ndarray | None[source]#

Retrieves the values of a trace from a SignalDC instance based on the exact unit.

Parameters:
  • signal_dc (SignalDC) – The SignalDC instance containing the traces.

  • desired_unit (Unit) – The Unit instance to filter traces.

Returns:

The numpy array of trace values if found, else None.

Return type:

Optional[np.ndarray]