def test_filter_exclude(self): anxcor = Anxcor() anxcor.set_window_length(120.0) bank = WavebankWrapper(source_dir) anxcor.add_dataset(bank, 'nodals') anxcor.set_must_exclude_single_stations('AX.1') stations = anxcor.get_station_combinations() assert len(stations.index) == 3, 'too many stations retained'
def test_set_must_include(self): anxcorWavebank = WavebankWrapper(source_dir) min_starttime = anxcorWavebank.bank.get_availability_df( )['starttime'].min() endtime = anxcorWavebank.bank.get_availability_df()['endtime'].max() starttime = int(min_starttime + 1) endtime = int(endtime) overlap = 0.5 window_length = 3 * 60 resample_kwargs = dict(taper=0.05, target_rate=20.0) correlate_kwargs = dict(taper=0.01, max_tau_shift=60) anxcor_main = Anxcor() anxcor_main.add_dataset(anxcorWavebank, 'test') anxcor_main.set_must_only_include_station_pairs(['AX.1', 'AX.2']) correlations = anxcor_main.get_station_combinations() assert len(correlations) == 3