nibcq.LCRTestParameters
- class nibcq.LCRTestParameters
Bases:
nibcq.measurement.ConfigFileSupportTest parameters specific to LCR Meter (PXIe-4190) ACIR measurements.
Unlike SMU/DMM parameters, LCR does NOT use powerline_frequency. The LCR hardware handles noise rejection internally.
Supports two ways to create instances: 1. Direct instantiation with keyword arguments 2. Loading from JSON file via from_file() classmethod
- cable_length
Cable length setting. Default is NI_STANDARD_1M (1 meter).
- Type:
nidcpower.CableLength
- voltage_range
Peak voltage range (10V or 40V), converted to RMS internally. Default is PEAK_10V (7V RMS).
- Type:
- current_amplitude
AC current amplitude in Amperes RMS. Range: 7.08e-9 A to 0.707 A. Default is 0.07 A.
- Type:
- load_compensation_enabled
Enable load compensation from onboard storage. Note: Load compensation requires both open AND short to be enabled.
- Type:
Examples
>>> # Direct instantiation >>> params = LCRTestParameters( ... voltage_range=LCRVoltageRange.PEAK_10V, ... current_amplitude=0.07, ... open_compensation_enabled=True, ... ) >>> # From JSON file >>> params = LCRTestParameters.from_file("config/lcr_config.json")
- classmethod from_json(json_data: Dict[str, Any]) LCRTestParameters
Create LCRTestParameters instance from JSON dictionary.
- Parameters:
json_data (Dict[str, Any]) – Dictionary containing LCR configuration data.
- Returns:
Instance configured from JSON data.
- Return type:
- Raises:
LCRParameterError – If parameters are invalid.
KeyError – If expected keys are not found.
- classmethod from_file(file_path: str) LCRTestParameters
Create LCRTestParameters instance from JSON configuration file.
- Parameters:
file_path (str) – Path to JSON configuration file.
- Returns:
Instance configured from file.
- Return type:
- Raises:
FileNotFoundError – If configuration file is not found.
LCRParameterError – If file content is invalid.
json.JSONDecodeError – If file contains invalid JSON.