diff --git a/seismic/xcorqc/correlator.py b/seismic/xcorqc/correlator.py index 7f2f646f..1cabdda5 100644 --- a/seismic/xcorqc/correlator.py +++ b/seismic/xcorqc/correlator.py @@ -240,6 +240,7 @@ def get_loccha(cha1, cha2): # end if else: if(item[2] not in ulocs): + cha = item[3][:-1] + 'T' # transverse channel e.g. BHT if(loc_pref is None): result[chidx].append('{}.{}'.format(item[2], cha)) ulocs.add(item[2]) @@ -260,7 +261,7 @@ def get_loccha(cha1, cha2): if (corr_chan == 'z'): loccha1_list, loccha2_list = get_loccha(ds1_zchan, ds2_zchan) elif (corr_chan == 'n'): loccha1_list, loccha2_list = get_loccha(ds1_nchan, ds2_nchan) elif (corr_chan == 'e'): loccha1_list, loccha2_list = get_loccha(ds1_echan, ds2_echan) - elif (corr_chan == 't'): loccha1_list, loccha2_list = get_loccha('00T', '00T') + elif (corr_chan == 't'): loccha1_list, loccha2_list = get_loccha('', '') else: raise ValueError('Invalid corr-chan') if(len(loccha1_list)<1 or len(loccha2_list)<1): diff --git a/seismic/xcorqc/utils.py b/seismic/xcorqc/utils.py index d56e8354..e4aec1c7 100644 --- a/seismic/xcorqc/utils.py +++ b/seismic/xcorqc/utils.py @@ -341,9 +341,9 @@ def get_stream(fds, net, sta, loc, cha, start_time, end_time, baz=None, trace_count_threshold=200, logger=None, verbose=1): - if (cha == '00T'): return _get_stream_00T(fds, net, sta, loc, start_time, end_time, - baz=baz, trace_count_threshold=trace_count_threshold, - logger=logger, verbose=verbose) + if (cha[-1] == 'T'): return _get_stream_00T(fds, net, sta, loc, start_time, end_time, + baz=baz, trace_count_threshold=trace_count_threshold, + logger=logger, verbose=verbose) st = Stream() if(loc is None): stations = fds.get_stations(start_time, end_time, network=net, station=sta, diff --git a/tests/test_seismic/xcorqc/data/expected/expected.tar.gz b/tests/test_seismic/xcorqc/data/expected/expected.tar.gz index 749f2a48..9d03f816 100644 Binary files a/tests/test_seismic/xcorqc/data/expected/expected.tar.gz and b/tests/test_seismic/xcorqc/data/expected/expected.tar.gz differ diff --git a/tests/test_seismic/xcorqc/test_interval_stack_xcorr.py b/tests/test_seismic/xcorqc/test_interval_stack_xcorr.py index f7b54fa7..fa512b8d 100644 --- a/tests/test_seismic/xcorqc/test_interval_stack_xcorr.py +++ b/tests/test_seismic/xcorqc/test_interval_stack_xcorr.py @@ -56,7 +56,7 @@ os.system(cmd) output_folder = str(tempfile.mkdtemp()) -@pytest.fixture(params=['.BHZ', '.00T']) +@pytest.fixture(params=['.BHZ', '.BHT']) def loccha(request): return request.param