nibcq.Calibrator ================ .. py:class:: nibcq.Calibrator(device: nibcq._device.Device, calibration_settings: nibcq.calibration.Settings, calibration_file_path: Optional[str] = None) A calibration manager for hardware devices that handles self-calibration operations. The Calibrator class manages device self-calibration by tracking calibration history, validating calibration status based on time and temperature constraints, and performing new calibrations when needed. It uses a diary system to persist calibration records and works with hardware adapters to interface with actual devices. .. attribute:: calibration_settings Configuration settings for calibration validation, including temperature delta and time interval thresholds. :type: Settings :raises ValueError: When calibration file path is empty or invalid. :raises TypeError: When self-calibration is not supported by the device. :raises RuntimeError: When attempting calibration on unsupported hardware. .. rubric:: Example >>> device = Device(session, device_family) >>> settings = Settings(temperature_delta=2.0, days_to_calibration=30) >>> calibrator = Calibrator(device, settings, "/path/to/cal.json") >>> if not calibrator.last_calibration_is_valid: ... calibrator.self_calibrate() .. py:property:: calibration_file_path Return the calibration file path. .. py:property:: last_calibration_is_valid Return if the latest self-calibration is valid for the instrument. .. py:method:: self_calibrate(force: bool = False) -> bool Perform self-calibration on the session. :param force: If True, skips the user prompt for acknowledgment. :type force: bool