diff --git a/act/qc/__init__.py b/act/qc/__init__.py index 25543e2a82..fe520a7581 100644 --- a/act/qc/__init__.py +++ b/act/qc/__init__.py @@ -34,6 +34,7 @@ qcfilter.QCFilter.check_for_ancillary_qc qcfilter.QCFilter.compare_time_series_trends qcfilter.QCFilter.create_qc_variable + qcfilter.QCFilter.datafilter qcfilter.QCFilter.get_qc_test_mask qcfilter.QCFilter.get_masked_data qcfilter.QCFilter.remove_test diff --git a/act/qc/qcfilter.py b/act/qc/qcfilter.py index 6100faff59..2f175b6d65 100644 --- a/act/qc/qcfilter.py +++ b/act/qc/qcfilter.py @@ -468,7 +468,7 @@ def unset_test(self, var_name, index=None, test_number=None, def available_bit(self, qc_var_name, recycle=False): """ - Method to determine next availble bit or flag to use with a QC test. + Method to determine next available bit or flag to use with a QC test. Will check for flag_masks first and if not found will check for flag_values. This will drive how the next value is chosen. @@ -658,7 +658,6 @@ def get_masked_data(self, var_name, rm_assessments=None, fill_value=1e+20, dtype=float32) """ - qc_var_name = self._obj.qcfilter.check_for_ancillary_qc( var_name, add_if_missing=False) @@ -739,11 +738,11 @@ def datafilter(self, variables=None, rm_assessments=None, rm_tests=None, """ Method to apply quality control variables to data variables by changing the data values in the dataset using quality control variables. - The data variable is changed to to a numpy masked array with failing data - masked or, if requested, to numpy array with failing data set to NaN. - This can be used to update the data variable in the xarray dataset for use with - xarray methods to perform analysis on the data since those methods don't - read the quality control variables. + The data variable is changed to to a numpy masked array with failing + data masked or, if requested, to numpy array with failing data set to + NaN. This can be used to update the data variable in the xarray + dataset for use with xarray methods to perform analysis on the data + since those methods don't read the quality control variables. Parameters ---------- @@ -768,10 +767,10 @@ def datafilter(self, variables=None, rm_assessments=None, rm_tests=None, Opttion to delete quality control variable after processing. Since the data values can not be determined after they are set to NaN and xarray method processing would also process the quality control - variables, the default is to remove the quality control data variables. - If numpy masked arrays are used the data are not lost but would need - to be extracted and set to DataArray to return the dataset back to orginal state. - + variables, the default is to remove the quality control data + variables. If numpy masked arrays are used the data are not lost + but would need to be extracted and set to DataArray to return the + dataset back to original state. Examples -------- @@ -794,7 +793,6 @@ def datafilter(self, variables=None, rm_assessments=None, rm_tests=None, All data: 98.86097717285156, Bad Removed: 99.15148162841797 """ - if variables is not None and isinstance(variables, str): variables = [variables]