qualitycontrol
The purpose of the qualitycontrol package is to provide the means for users to check their IPASC data for completeness and consistency.
It can also be used to check the data for general integrity.
- class CompletenessChecker(verbose: bool = False, log_file_path: Optional[str] = None)[source]
Bases:
object
Tests a given AcquisitionMetadata dictionary or a given DeviceMetadata dictionary for completeness.
For these purposes, the check_acquisition_meta_data and check_device_meta_data methods can be used:
pa_data = #TODO load pa_data here cc = CompletenessChecker(verbose=True) acquisition_metadata_complete = cc.check_acquisition_meta_data(pa_data.meta_data_acquisition) device_metadata_complete = cc.check_device_meta_data(pa_data.meta_data_device)
- Parameters:
- check_acquisition_meta_data(meta_data_dictionary: dict) bool [source]
This function will evaluate the completeness of the given acquisition metadata. It can be used to generate a report to the console by setting verbose to True. When setting a file path to log_file, it will also save the report as a txt file in the designated path.
- check_device_meta_data(device_meta_data: dict)[source]
This function will evaluate the completeness of the given device metadata. It can be used to generate a report to the console by setting verbose to True. When setting a file path to log_file, it will also save the report as a txt file in the designated path.
- class ConsistencyChecker(verbose: bool = False, log_file_path: Optional[str] = None)[source]
Bases:
object
The purpose of this class is to go beyond the capabilities of the CompletenessChecker and to test the consistency of the metadata. To this end, every meta datum is assigned a possible value range by definition. The Consistency checker unit_tests if the assigned values fall inside this value range.
- Parameters:
- check_acquisition_meta_data(acquisition_meta_data: dict) bool [source]
Tests the given dictionary with acquisition metadata for consistency.