nibcq.lcr_compensation.LCRCompensationParameters ================================================ .. py:class:: nibcq.lcr_compensation.LCRCompensationParameters Bases: :py:obj:`nibcq.measurement.ConfigFileSupport` Parameters for LCR compensation generation. This dataclass contains all configuration needed for the 7-step LCR compensation flow. The compensation data is stored on the device's onboard memory (not in external files). The parameters are divided into two groups: **Generate flags** - control which `perform_lcr_*()` methods run: - generate_custom_cable: Custom cable compensation (Step 2) - generate_open: Open compensation (Step 4) - generate_short: Short compensation (Step 4) - generate_load: Load compensation (Step 5) **Enable flags** - set on session for measurements after compensation: - enable_open: Use open compensation from onboard storage - enable_short: Use short compensation from onboard storage - enable_load: Use load compensation (requires open AND short!) .. attribute:: generate_custom_cable If True, performs custom cable compensation. Requires physical open and short connections during procedure. :type: bool .. attribute:: generate_open If True, performs open compensation. Requires physical open connection (no DUT). :type: bool .. attribute:: generate_short If True, performs short compensation. Requires physical short connection. :type: bool .. attribute:: generate_load If True, performs load compensation. Requires physical load connection with known reference. :type: bool .. attribute:: enable_open Enable open compensation for verification measurement. :type: bool .. attribute:: enable_short Enable short compensation for verification measurement. :type: bool .. attribute:: enable_load Enable load compensation for verification measurement. Note: Requires both enable_open AND enable_short to be True! :type: bool .. attribute:: short_custom_cable_enabled Also perform short custom cable comp (Step 2b). :type: bool .. attribute:: additional_frequencies Extra frequencies for open/short compensation. Default frequencies are always included by the hardware. :type: list[float] .. attribute:: load_compensation_spots Reference values for load compensation. Each spot specifies frequency and known impedance value. :type: list[nidcpower.LCRLoadCompensationSpot] .. attribute:: cable_length Cable length setting for all compensation steps. :type: nidcpower.CableLength .. attribute:: voltage_amplitude LCR voltage amplitude in Volts RMS (for load comp). :type: float .. attribute:: impedance_range LCR impedance range in Ohms. 0 = auto-range. :type: float .. attribute:: dc_bias_source DC bias source setting (OFF, VOLTAGE, or CURRENT). :type: nidcpower.LCRDCBiasSource .. attribute:: dc_bias_voltage_level DC bias voltage if source=VOLTAGE. :type: float .. attribute:: dc_bias_current_level DC bias current if source=CURRENT. :type: float .. attribute:: measurement_time Measurement time setting (SHORT, MEDIUM, LONG, CUSTOM). :type: nidcpower.LCRMeasurementTime .. attribute:: custom_measurement_time Custom time in seconds if measurement_time=CUSTOM. :type: float .. attribute:: lcr_frequency Measurement frequency in Hz. 1000 Hz for ACIR, variable for EIS. :type: float .. rubric:: Examples >>> # Simple open+short compensation >>> params = LCRCompensationParameters( ... generate_open=True, ... generate_short=True, ... enable_open=True, ... enable_short=True, ... ) >>> >>> # Full compensation with load >>> params = LCRCompensationParameters( ... generate_open=True, ... generate_short=True, ... generate_load=True, ... enable_open=True, ... enable_short=True, ... enable_load=True, ... load_compensation_spots=[ ... nidcpower.LCRLoadCompensationSpot( ... frequency=1000.0, ... reference_value_type=nidcpower.LCRReferenceValueType.IMPEDANCE, ... reference_value=complex(0.01, 0.0), # 10 mOhm known load ... ), ... ], ... ) .. py:method:: from_json(json_data: Dict[str, Any]) -> LCRCompensationParameters :classmethod: Create LCRCompensationParameters instance from JSON dictionary. :param json_data: Dictionary containing compensation configuration data. :type json_data: Dict[str, Any] :returns: Instance configured from JSON data. :rtype: LCRCompensationParameters :raises LCRParameterError: If parameters are invalid. :raises KeyError: If expected keys are not found. .. py:method:: from_file(file_path: str) -> LCRCompensationParameters :classmethod: Create LCRCompensationParameters instance from JSON configuration file. :param file_path: Path to JSON configuration file. :type file_path: str :returns: Instance configured from file. :rtype: LCRCompensationParameters :raises FileNotFoundError: If configuration file is not found. :raises LCRParameterError: If file content is invalid. :raises json.JSONDecodeError: If file contains invalid JSON.