nibcq.compensation.CompensationFile =================================== .. py:class:: nibcq.compensation.CompensationFile Represents a compensation file. .. py:method:: memory_to_file(compensation: Compensation, comment: str = '') -> CompensationFile :classmethod: Converts the compensation data format to a stored one. This converts the class used to store and calculate these between the one used in memory (AllCompensation), to the one what we use to save it to file (CompensationFile). .. py:method:: file_to_memory(method: nibcq.enums.CompensationMethod, file_path: str) -> Compensation Converts this CompensationFile back to an in-memory AllCompensation. :param method: The CompensationMethod to associate with the in-memory data. :type method: CompensationMethod :param file_path: The source file path for this compensation content. :type file_path: str :returns: An in-memory representation containing temperature and a frequency to complex map of compensation values. :rtype: AllCompensation .. py:method:: to_json() -> str Convert to NI BCQ Toolkit Compensation File JSON schema. :returns: JSON string in the correct format. :rtype: str .. py:method:: from_json(data: str) :classmethod: Creates a CompensationFile instance from a JSON string. Supports the previously defined LabVIEW schema only, to enforce consistency. .. py:method:: load_from_file(path: str) -> CompensationFile :classmethod: Loads a compensation file from the specified path. .. py:method:: save_to_file(path: str) -> None Saves a compensation file to the specified path. .. py:method:: generate_file_path(compensation_method: nibcq.enums.CompensationMethod, serial_number: str) -> str :staticmethod: Generates the default file path for a compensation file. :param compensation_method: The compensation method type (SHORT or GOLDEN_DUT only) :param serial_number: The device serial number :returns: The generated file path in format "DEFAULT_COMPENSATION_DIR/z_{method}_SN{serial}_Ch0.json" :rtype: str :raises ValueError: If compensation_method is not SHORT or GOLDEN_DUT