act.qc.QCFilter.compare_time_series_trends#
- QCFilter.compare_time_series_trends(var_name=None, comp_dataset=None, comp_var_name=None, time_match_threshhold=60, time_shift=3600, time_step=None, time_qc_threshold=900)#
Method to perform a time series comparison test between two Xarray Datasets to detect a shift in time based on two similar variables. This test will compare two similar measurements and look to see if there is a time shift forwards or backwards that makes the comparison better. If so assume the time has shifted.
This test is not 100% accurate. It may be fooled with noisy data. Use with your own discretion.
- Parameters:
var_name (str) – Data variable name.
comp_dataset (Xarray Dataset) – Dataset containing comparison data to use in test.
comp_var_name (str) – Name of variable in comp_dataset to use in test.
time_match_threshhold (int) – Number of seconds to use in tolerance with reindex() method to match time from self to comparison Dataset.
time_shift (int) – Number of seconds to shift analysis window before and after the time in self Dataset time.
time_step (int) – Time step in seconds for self Dataset time. If not provided will attempt to find the most common time step.
time_qc_threshold (int) – The quality control threshold to use for setting test. If the calculated time shift is larger than this value will set all values in the QC variable to a tripped test value.
- Returns:
test_info (tuple) – A tuple containing test information including var_name, qc variable name, test_number, test_meaning, test_assessment