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_dask_execution_include_stack_immediately(self): from distributed import Client, LocalCluster cluster = LocalCluster(n_workers=1, threads_per_worker=1) c = Client(cluster) anxcor = Anxcor() anxcor.set_window_length(120.0) times = anxcor.get_starttimes(starttime_stamp,endtime_stamp, 0.5) bank = WavebankWrapper(source_dir) anxcor.set_must_exclude_single_stations('AX.1') anxcor.add_dataset(bank, 'nodals') result = anxcor.process(times,dask_client=c,stack=True) pairs = list(result.coords['rec'].values)+ list(result.coords['src'].values) c.close() cluster.close() assert 4 ==len(pairs)