pydpeet.primitive_config_wrapper#

pydpeet.primitive_config_wrapper(threshold_dict=None, segments_to_detect_config=None, adjust_segments_config=None, thresholds_primitive_annotation=None, show_runtime=True, show_runtime_annotation=True, show_runtime_analyze=True, show_runtime_visualization=True, threshold_console_prints_zero_length_check=2, threshold_console_prints_cv_check=2, threshold_console_prints_finetuning_width=2, threshold_console_prints_power_zero_watt_check=10, data_columns=None, check_cv_0aend_segments_bool=False, check_zero_length_segments_bool=False, check_power_zero_w_segments_bool=False, supress_io_warnings=False, precompile=False, force_precompilation=False)[source]#

Factory function to create a PrimitiveConfig instance with non-standard parameters.

All parameters have defaults matching the standard configuration. Use this instead of direct _PrimitiveConfigClass instantiation to ensure safe creation of independent config instances.

Args:
threshold_dict: Device threshold configuration list [voltage_acc, current_acc,

voltage_meas_acc, current_meas_acc, voltage_fs, current_fs]. Defaults to DeviceConfig.NEWARE_CT_4008Q_5V12A_S1.

segments_to_detect_config: List of (column, threshold) tuples for segment detection.

Threshold should be half the definitive difference for detection above/below. ORDER IS IMPORTANT for detection priority.

adjust_segments_config: List of (column, threshold) tuples for segment adjustment.

ORDER IS IMPORTANT - determines adjustment priority.

thresholds_primitive_annotation: Dict mapping primitive keys (V, I, P) to threshold values.

MUST USE SAME KEY AS DATA_COLUMNS.

show_runtime: Whether to show runtime information during processing. show_runtime_annotation: Whether to show annotation runtime information. show_runtime_analyze: Whether to show analysis runtime information. show_runtime_visualization: Whether to show visualization runtime information. threshold_console_prints_zero_length_check: Console print threshold for zero length check. threshold_console_prints_cv_check: Console print threshold for CV segment check. threshold_console_prints_finetuning_width: Console print threshold for width finetuning. threshold_console_prints_power_zero_watt_check: Console print threshold for power zero watt check. data_columns: Dict mapping short keys to full column names.

Example: {“V”: “Voltage[V]”, “I”: “Current[A]”}. Should not be changed when using ppb Dataframes.

check_cv_0aend_segments_bool: Whether to check CV segments ending at 0A. Default: False. check_zero_length_segments_bool: Whether to check for zero-length segments. Default: False. check_power_zero_w_segments_bool: Whether to check for power zero watt segments. Default: False. supress_io_warnings: Whether to suppress IO warnings during processing. Default: False. precompile: Whether to precompile configuration for performance. Default: False. force_precompilation: Whether to force precompilation even if not needed. Default: False.

Returns:

A new _PrimitiveConfigClass instance with the specified parameters.

Parameters:
  • threshold_dict (list[float] | None)

  • segments_to_detect_config (list[tuple[str, float]] | None)

  • adjust_segments_config (list[tuple[str, float]] | None)

  • thresholds_primitive_annotation (dict[str, float] | None)

  • show_runtime (bool)

  • show_runtime_annotation (bool)

  • show_runtime_analyze (bool)

  • show_runtime_visualization (bool)

  • threshold_console_prints_zero_length_check (int)

  • threshold_console_prints_cv_check (int)

  • threshold_console_prints_finetuning_width (int)

  • threshold_console_prints_power_zero_watt_check (int)

  • data_columns (dict[str, str] | None)

  • check_cv_0aend_segments_bool (bool)

  • check_zero_length_segments_bool (bool)

  • check_power_zero_w_segments_bool (bool)

  • supress_io_warnings (bool)

  • precompile (bool)

  • force_precompilation (bool)

Return type:

_PrimitiveConfigClass