piel.analysis.signals.dc#
Submodules#
Functions#
|
Retrieves the minimum and maximum output voltage values within a specified input voltage range. |
Calculates the equivalent input voltage range (V_in) corresponding to specified thresholds of output voltage (V_out). |
|
|
Retrieves the minimum and maximum power values within a specified input voltage range, |
Retrieves the minimum and maximum power values within a specified input voltage range, |
|
|
Retrieves the mapped V_IN minimum and maximum power values within a specified input voltage range. Represents |
|
Retrieves the values of a trace from a SignalDC instance based on the unit's datum. |
|
Retrieves the values of a trace from a SignalDC instance based on the exact unit. |
Compiles DC analysis metrics from a list of SignalDCCollection instances into a final DataFrame. |
|
Compiles DC analysis metrics from a list of SignalDCCollection instances into a final DataFrame. |
Package Contents#
- get_out_min_max(collection: piel.types.SignalDCCollection, lower_threshold_ratio: float = 0.1, upper_threshold_ratio: float = 0.9, **kwargs) piel.types.ScalarMetric[source]#
Retrieves the minimum and maximum output voltage values within a specified input voltage range.
- Parameters:
collection (SignalDCCollection) – The collection of input and output DC signals.
lower_threshold_ratio (float, optional) – The lower threshold as a fraction of V_in range (0-1). Defaults to 0.1.
upper_threshold_ratio (float, optional) – The upper threshold as a fraction of V_in range (0-1). Defaults to 0.9.
- Returns:
Metrics including min and max values of the output voltage in the specified input voltage range.
- Return type:
- get_out_response_in_transition_range(collection: piel.types.SignalDCCollection, lower_threshold_ratio: float = 0.1, upper_threshold_ratio: float = 0.9, transition_type: Literal['analogue', 'digital'] = 'analogue', transition_direction: Literal['positive', 'negative'] = 'positive', **kwargs) piel.types.ScalarMetric[source]#
Calculates the equivalent input voltage range (V_in) corresponding to specified thresholds of output voltage (V_out).
- Parameters:
collection (SignalDCCollection) – The collection of input and output DC signals.
lower_threshold_ratio (float, optional) – The lower threshold as a fraction of V_out’s final value (0-1). Defaults to 0.1.
upper_threshold_ratio (float, optional) – The upper threshold as a fraction of V_out’s final value (0-1). Defaults to 0.9.
transition_type (Literal["analogue", "digital"], optional) – Type of transition. Defaults to “analogue”.
transition_direction (Literal["positive", "negative"], optional) – Direction of transition. Defaults to “positive”.
**kwargs – Additional keyword arguments.
- Returns:
Metrics including min and max V_in values corresponding to the specified V_out threshold range.
- Return type:
- get_power_metrics(collection: piel.types.SignalDCCollection, lower_threshold_ratio: float = 0, upper_threshold_ratio: float = 1, **kwargs) piel.types.ScalarMetric[source]#
Retrieves the minimum and maximum power values within a specified input voltage range, along with the corresponding V_in values where these extrema occur.
- Parameters:
collection (SignalDCCollection) – The collection of input, output, and power DC signals.
lower_threshold_ratio (float, optional) – The lower threshold as a fraction of V_in range (0-1). Defaults to 0.1.
upper_threshold_ratio (float, optional) – The upper threshold as a fraction of V_in range (0-1). Defaults to 0.9.
- Returns:
- ScalarMetric
ScalarMetric containing min and max power.
- calculate_power_signal_from_collection(collection: piel.types.SignalDCCollection, lower_threshold_ratio: float = 0, upper_threshold_ratio: float = 1, **kwargs) piel.types.ScalarMetric[source]#
Retrieves the minimum and maximum power values within a specified input voltage range, along with the corresponding V_in values where these extrema occur.
- Parameters:
collection (SignalDCCollection) – The collection of input, output, and power DC signals.
lower_threshold_ratio (float, optional) – The lower threshold as a fraction of V_in range (0-1). Defaults to 0.1.
upper_threshold_ratio (float, optional) – The upper threshold as a fraction of V_in range (0-1). Defaults to 0.9.
- Returns:
- ScalarMetric
ScalarMetric containing min and max power.
- get_power_map_vin_metrics(collection: piel.types.SignalDCCollection, lower_threshold_ratio: float = 0, upper_threshold_ratio: float = 1, **kwargs) piel.types.ScalarMetric[source]#
Retrieves the mapped V_IN minimum and maximum power values within a specified input voltage range. Represents along with the corresponding V_in values where these power extrema occur.
- Parameters:
collection (SignalDCCollection) – The collection of input, output, and power DC signals.
lower_threshold_ratio (float, optional) – The lower threshold as a fraction of V_in range (0-1). Defaults to 0.1.
upper_threshold_ratio (float, optional) – The upper threshold as a fraction of V_in range (0-1). Defaults to 0.9.
- Returns:
- ScalarMetric
ScalarMetric containing min and max power.
- 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.
- compile_dc_min_max_metrics_from_dc_collection(collections: list[piel.types.SignalDCCollection], label_list: list[str], label_column_name: str = 'label', threshold_kwargs: dict = None, debug: bool = False, **kwargs) pandas.DataFrame[source]#
Compiles DC analysis metrics from a list of SignalDCCollection instances into a final DataFrame.
- Parameters:
collections (List[SignalDCCollection]) – List of SignalDCCollection instances to analyze.
label_list (List[str]) – List of labels corresponding to each SignalDCCollection.
threshold_kwargs (dict, optional) – Threshold kwargs for the transition transmission. Defaults to None.
label_column_name (str, optional) – How the label column should be called. Defaults to “label”.
debug (bool, optional) – If True, raises exceptions during processing. Defaults to False.
**kwargs – Additional keyword arguments for pd.DataFrame.
- Returns:
A DataFrame containing the compiled metrics with combined min-max columns.
- Return type:
pd.DataFrame
- compile_dc_transition_metrics_from_dc_collection(collections: list[piel.types.SignalDCCollection], label_list: list[str], label_column_name: str = 'label', threshold_kwargs: dict = None, debug: bool = False, **kwargs) pandas.DataFrame[source]#
Compiles DC analysis metrics from a list of SignalDCCollection instances into a final DataFrame.
- Parameters:
collections (List[SignalDCCollection]) – List of SignalDCCollection instances to analyze.
label_list (List[str]) – List of labels corresponding to each SignalDCCollection.
threshold_kwargs (dict, optional) – Threshold kwargs for the transition transmission. Defaults to None.
label_column_name (str, optional) – How the label column should be called. Defaults to “label”.
debug (bool, optional) – If True, raises exceptions during processing. Defaults to False.
**kwargs – Additional keyword arguments for pd.DataFrame.
- Returns:
A DataFrame containing the compiled metrics with combined min-max columns.
- Return type:
pd.DataFrame