nibcq.measurement.ParallelMeasurement ===================================== .. py:class:: nibcq.measurement.ParallelMeasurement(leader: nibcq._device.Device, followers: collections.abc.Sequence[nibcq._device.Device], test_parameters: TestParameters) Bases: :py:obj:`Measurement` Abstract parallel measurement workflow for any kind of measurement. .. py:method:: get_all_devices() Yield every parallel device, followers first, leader last. This generator avoids storing a redundant copy of the device references that already live in ``ParallelMeasurement``'s fields containing the followers and the leader. :Yields: *Device* -- The next device in followers-then-leader order. .. py:property:: test_parameters :type: TestParameters Get the current test parameters for the measurement. Returns the configuration parameters that define how the measurement should be performed, including settings like powerline frequency and other measurement-specific parameters. :returns: The current test parameters configuration :rtype: TestParameters .. rubric:: Examples >>> measurement = Measurement(device) >>> params = measurement.test_parameters >>> print(params.powerline_frequency) PowerlineFrequency.FREQ_60_HZ .. py:property:: result :type: Union[float, SMUResult, list[SMUResult], list[tuple[nibcq.switch.SMUCellData, SMUResult]], list[tuple[nibcq.switch.SMUCellData, list[SMUResult]]], list[tuple[str, tuple[datetime.datetime, datetime.datetime, float]]], Any] Get the result of the last measurement. Returns the measurement result from the most recent measurement operation. The result type depends on the specific measurement implementation and whether switching was used: - Single measurements: - float for OCV and DCIR - SMUResult for ACIR - list[SMUResult] for EIS - Switching measurements: - list[tuple[SMUCellData, SMUResult]] for ACIR with switching - list[tuple[SMUCellData, list[SMUResult]]], for EIS with switching - list[tuple[str, tuple[datetime, datetime, float]]], for OCV with switching :returns: float | SMUResult | list[SMUResult] | list[tuple[SMUCellData, SMUResult]] | list[tuple[SMUCellData, list[SMUResult]]] | list[tuple[str, tuple[datetime, datetime, float]]] | Any: The measurement result(s). For switching measurements, returns a list of tuples where each tuple contains the cell data and its corresponding results. :raises RuntimeError: If no measurement has been performed yet or if the result is not available .. rubric:: Examples >>> measurement.run(test_parameters) >>> result = measurement.result >>> print(f"Measurement result: {result}") >>> >>> # For switching measurements >>> switching_results = measurement.run_with_switching(compensation) >>> for cell_data, cell_results in measurement.result: ... print(f"Cell {cell_data.cell_serial_number}: {len(cell_results)} results") .. py:method:: run() :abstractmethod: Run the measurement process with the given test parameters used to configure the device. :returns: A single result which is calculated and populated after fetching the data. :rtype: Any .. py:property:: acceptable_temperature_delta :type: float Get the acceptable temperature delta for compensation validation. Returns the maximum allowed temperature difference from the device's temperature capability. This is a pass-through property that delegates to the underlying TemperatureCapability. :returns: The acceptable temperature delta in degrees, or NaN if no temperature capability :rtype: float .. rubric:: Examples >>> measurement = EIS(device) >>> measurement.acceptable_temperature_delta = 2.5 >>> delta = measurement.acceptable_temperature_delta .. py:property:: temperature :type: float Get the latest temperature reading from the device. :returns: The most recent temperature measurement, or NaN if no temperature capability :rtype: float .. py:property:: temperature_range :type: CenteredRange Get the latest temperature reading from the device, coupled with the user-set delta. :returns: A CenteredRange representing the most recent temperature measurement (NaN if not available), along with the acceptable temperature delta (NaN if not set). .. py:method:: measure_temperature() -> CenteredRange Get a new temperature reading from the device. :returns: Current temperature reading, or NaN if no temperature capability .. py:method:: validate_temperature(target_temperature: CenteredRange) -> bool Validate the current temperature against the compensation file's target. Delegates to the device's temperature capability for validation. The capability handles all validation logic including checking if thermocouple is configured, using overridden delta values if set, and printing appropriate warnings. :param target_temperature: The target temperature parameters for validation :type target_temperature: CenteredRange :returns: True if thermocouple is configured and temperature is within range. False if thermocouple is not configured (capability missing or not set up), or if target temperature/delta is NaN. :rtype: bool :raises TemperatureError: If the current temperature exceeds the target ± delta range (only raised when capability is configured) .. rubric:: Examples >>> measurement = EIS(device) >>> measurement.measure_temperature() >>> target = compensation.temperature_parameter >>> is_valid = measurement.validate_temperature(target)