(eqcorrscan) Darrens-MacBook-Pro:lib darrentpk$ cd python3.8/site-packages/eqcorrscan/tests (eqcorrscan) Darrens-MacBook-Pro:tests darrentpk$ ls __init__.py correlate_test.py mag_calc_test.py stacking_test.py trigger_test.py __pycache__ despike_test.py match_filter_test.py subspace_test.py tutorials_test.py catalog_to_dd_test.py find_peaks_test.py picker_test.py synth_seis_test.py catalog_utils_test.py install_test.py plotting_test.py template_gen_test.py clustering_test.py lag_calc_test.py pre_processing_test.py test_data (eqcorrscan) Darrens-MacBook-Pro:tests darrentpk$ rm -R test_data (eqcorrscan) Darrens-MacBook-Pro:tests darrentpk$ test_eqcorrscan.py 2020-11-07 18:13:39,634 __main__ INFO Downloading necessary files from github 2020-11-07 18:13:39,634 __main__ INFO Downloading from https://github.com/eqcorrscan/EQcorrscan/archive/0.4.2.zip Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/bin/test_eqcorrscan.py", line 220, in download_test_data() File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/bin/test_eqcorrscan.py", line 134, in download_test_data shutil.move(extract_path, WORKING_DIR) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/shutil.py", line 786, in move raise Error("Destination path '%s' already exists" % real_dst) shutil.Error: Destination path '/Users/darrentpk/.eqcorrscan/pytest.ini' already exists (eqcorrscan) Darrens-MacBook-Pro:tests darrentpk$ test_eqcorrscan.py 2020-11-07 18:14:32,334 __main__ INFO Found test data at: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data 2020-11-07 18:14:32,334 __main__ INFO pytest.ini already here: /Users/darrentpk/.eqcorrscan/pytest.ini 2020-11-07 18:14:32,336 __main__ INFO conftest.py already here: /Users/darrentpk/.eqcorrscan/conftest.py 2020-11-07 18:14:32,336 __main__ INFO .coveragerc already here: /Users/darrentpk/.eqcorrscan/.coveragerc 2020-11-07 18:14:32,339 __main__ INFO Working in /Users/darrentpk/.eqcorrscan 2020-11-07 18:14:32,339 __main__ INFO Running tests from /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan 2020-11-07 18:14:32,339 __main__ INFO pytest /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan --runslow --ignore EGG-INFO --ignore /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/lib --doctest-modules --cov --cov-config /Users/darrentpk/.eqcorrscan/.coveragerc --ignore=setup.py /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1 EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]') ============================================================= test session starts ============================================================= platform darwin -- Python 3.8.6, pytest-6.1.1, py-1.9.0, pluggy-0.13.1 rootdir: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan, configfile: pytest.ini plugins: cov-2.10.1, pep8-1.0.6 collected 424 items ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/template_gen.py 2020-11-07 18:14:35,574 eqcorrscan.core.template_gen INFO Downloading data 2020-11-07 18:14:35,575 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-02T05:10:16.620000Z end-time: 2016-01-02T05:15:16.620000Z 2020-11-07 18:14:38,633 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-02T05:10:16.620000Z end-time: 2016-01-02T05:15:16.620000Z 2020-11-07 18:14:40,777 eqcorrscan.core.template_gen INFO Pre-processing data 2020-11-07 18:14:41,018 eqcorrscan.core.template_gen INFO Working on channel CLV.DPZ 2020-11-07 18:14:41,020 eqcorrscan.core.template_gen INFO Found Trace BG.CLV..DPZ | 2016-01-02T05:10:16.620000Z - 2016-01-02T05:15:16.570000Z | 20.0 Hz, 6000 samples 2020-11-07 18:14:41,020 eqcorrscan.core.template_gen WARNING Pick for CLV.DPZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:14:41,024 eqcorrscan.core.template_gen INFO Working on channel BKS.HHZ 2020-11-07 18:14:41,025 eqcorrscan.core.template_gen INFO Found Trace BK.BKS.00.HHZ | 2016-01-02T05:10:16.628393Z - 2016-01-02T05:15:16.578393Z | 20.0 Hz, 6000 samples 2020-11-07 18:14:41,026 eqcorrscan.core.template_gen WARNING Pick for BKS.HHZ has no phase hint given, you should not use this template for cross-correlation re-picking! F [ 0%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/family.py ............. [ 3%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/helpers.py . [ 3%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/matched_filter.py ...2020-11-07 18:14:41,338 eqcorrscan.core.match_filter.matched_filter WARNING plotvar is depreciated, use plot instead 2020-11-07 18:14:41,338 eqcorrscan.core.match_filter.matched_filter INFO Checking for spikes in data 2020-11-07 18:14:41,341 eqcorrscan.core.match_filter.matched_filter INFO Copying data to keep your input safe 2020-11-07 18:14:41,450 eqcorrscan.core.match_filter.matched_filter INFO Reshaping templates 2020-11-07 18:14:41,557 eqcorrscan.core.match_filter.matched_filter INFO Starting the correlation run for these data 2020-11-07 18:14:41,632 eqcorrscan.core.match_filter.matched_filter INFO Looping over templates and streams took: 0.0730s 2020-11-07 18:14:41,637 eqcorrscan.core.match_filter.matched_filter INFO Finding peaks took 0.0048s 2020-11-07 18:14:41,655 eqcorrscan.core.match_filter.matched_filter INFO Made 5 detections from 1 templates . [ 4%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py ........F.FF.FF.F [ 8%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/template.py F..F.2020-11-07 18:14:42,415 eqcorrscan.core.match_filter.tribe INFO Appending '.tgz' to filename. ..2020-11-07 18:14:42,611 eqcorrscan.core.match_filter.tribe INFO Appending '.tgz' to filename. . [ 10%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/tribe.py ........2020-11-07 18:14:42,745 eqcorrscan.core.match_filter.tribe INFO Appending '.tgz' to filename. ....2020-11-07 18:14:42,837 eqcorrscan.core.match_filter.tribe INFO Appending '.tgz' to filename. . [ 13%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/catalog_to_dd_test.py ........F....FF [ 16%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/catalog_utils_test.py . [ 17%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py F..F.FFF..........FF.. [ 22%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/correlate_test.py ........................ [ 28%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/despike_test.py EE [ 28%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/find_peaks_test.py ................... [ 33%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/install_test.py . [ 33%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/lag_calc_test.py ........... [ 35%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/mag_calc_test.py F............................ [ 42%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py ......F.F.F.F...................EEEE [ 51%] EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEF [ 61%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/picker_test.py F. [ 62%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py FFEEEEEE.............EEE... [ 68%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py EEEEEEEEEEEEEEEEEEEEEEEEEEE.FF.F [ 76%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/stacking_test.py ...FF [ 77%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py .FFFFFFFFF..... [ 80%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/synth_seis_test.py ...... [ 82%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py FF.F.F..FEEEEEEEEEEEEEEEEE [ 88%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/trigger_test.py .F. [ 89%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/tutorials_test.py ..F [ 89%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/archive_read.py 2020-11-07 18:37:55,226 eqcorrscan.utils.archive_read WARNING GCSZ HHZ is not available for 2012/03/26 2020-11-07 18:37:55,243 eqcorrscan.utils.archive_read WARNING WHYM SHZ is not available for 2012/03/26 2020-11-07 18:37:55,243 eqcorrscan.utils.archive_read WARNING EORO SHZ is not available for 2012/03/26 F [ 90%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/catalog_to_dd.py F [ 90%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/catalog_utils.py . [ 90%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py .F2020-11-07 18:38:05,203 eqcorrscan.utils.clustering WARNING Legacy function, please use eqcorrscan.core.match_filter.Party.rethreshold. F. [ 91%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/correlate.py ... [ 92%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/findpeaks.py ... [ 92%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/mag_calc.py 2020-11-07 18:38:10,352 eqcorrscan.utils.mag_calc WARNING Not computing completeness above 5.4, fewer than 4 events F.. [ 93%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/picker.py 2020-11-07 18:38:10,412 eqcorrscan.utils.picker INFO Computing envelope /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/signal/cross_correlation.py:390: ObsPyDeprecationWarning: Call to deprecated function xcorr(). Please use the correlate and xcorr_max functions. warnings.warn(msg, ObsPyDeprecationWarning) .2020-11-07 18:38:10,478 eqcorrscan.utils.picker INFO Pick made: Pick resource_id: ResourceIdentifier(id="smi:local/2cc28a27-37fe-41e2-b064-bb8562588514") time: UTCDateTime(2009, 8, 24, 0, 20, 7, 720000) waveform_id: WaveformStreamID(network_code='BW', station_code='RJOB', channel_code='EHZ') phase_hint: 'P' 2020-11-07 18:38:10,478 eqcorrscan.utils.picker INFO Pick made: Pick resource_id: ResourceIdentifier(id="smi:local/c20bafb2-9df1-4fa8-8a24-6b40a6ce1c67") time: UTCDateTime(2009, 8, 24, 0, 20, 8, 890000) waveform_id: WaveformStreamID(network_code='BW', station_code='RJOB', channel_code='EHZ') phase_hint: 'P' 2020-11-07 18:38:10,481 eqcorrscan.utils.picker INFO Pick made: Pick resource_id: ResourceIdentifier(id="smi:local/b8c0d7e9-c420-4a69-bd67-84b0510d671c") time: UTCDateTime(2009, 8, 24, 0, 20, 7, 730000) waveform_id: WaveformStreamID(network_code='BW', station_code='RJOB', channel_code='EHN') phase_hint: 'S' 2020-11-07 18:38:10,481 eqcorrscan.utils.picker INFO Pick made: Pick resource_id: ResourceIdentifier(id="smi:local/7208e403-1669-43eb-b30f-c3bc09a8c6ed") time: UTCDateTime(2009, 8, 24, 0, 20, 8, 970000) waveform_id: WaveformStreamID(network_code='BW', station_code='RJOB', channel_code='EHN') phase_hint: 'S' 2020-11-07 18:38:10,483 eqcorrscan.utils.picker INFO Pick made: Pick resource_id: ResourceIdentifier(id="smi:local/77dabee3-cb7a-4a7c-906d-16d41db9722a") time: UTCDateTime(2009, 8, 24, 0, 20, 7, 790000) waveform_id: WaveformStreamID(network_code='BW', station_code='RJOB', channel_code='EHE') phase_hint: 'S' . [ 94%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py ..F......F.FF.... [ 98%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/pre_processing.py F.F [ 98%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/sac_util.py F [ 99%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/timer.py . [ 99%] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/trigger.py .2020-11-07 18:38:36,053 eqcorrscan.utils.trigger INFO Looking for coincidence triggers ... 2020-11-07 18:38:36,055 eqcorrscan.utils.trigger INFO Found 1 Coincidence triggers .. [100%]Coverage.py warning: No data was collected. (no-data-collected) =================================================================== ERRORS ==================================================================== _____________________________________________ ERROR at setup of DespikeTesting.test_median_filter _____________________________________________ cls = @classmethod def setUpClass(cls): cls.testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data') > cls.spiked = read( os.path.join(cls.testing_path, 'random_spiked.ms'))[0] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/despike_test.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/random_spiked.ms' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/random_spiked.ms' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/random_spiked.ms' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ____________________________________________ ERROR at setup of DespikeTesting.test_template_remove ____________________________________________ cls = @classmethod def setUpClass(cls): cls.testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data') > cls.spiked = read( os.path.join(cls.testing_path, 'random_spiked.ms'))[0] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/despike_test.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/random_spiked.ms' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/random_spiked.ms' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/random_spiked.ms' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError __________________________________________ ERROR at setup of TestMatchObjectHeavy.test_client_detect __________________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError ------------------------------------------------------------ Captured stdout setup ------------------------------------------------------------ 2020-11-07 18:28:27,180 eqcorrscan.core.template_gen INFO Pre-processing data 2020-11-07 18:28:27,347 eqcorrscan.core.template_gen INFO Working on channel PAG.EHZ 2020-11-07 18:28:27,348 eqcorrscan.core.template_gen INFO Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,348 eqcorrscan.core.template_gen WARNING Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,349 eqcorrscan.core.template_gen INFO Working on channel PCA.EHZ 2020-11-07 18:28:27,350 eqcorrscan.core.template_gen INFO Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,350 eqcorrscan.core.template_gen WARNING Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,351 eqcorrscan.core.template_gen INFO Working on channel PHA.EHZ 2020-11-07 18:28:27,352 eqcorrscan.core.template_gen INFO Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,352 eqcorrscan.core.template_gen WARNING Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,353 eqcorrscan.core.template_gen INFO Working on channel PHOB.EHZ 2020-11-07 18:28:27,353 eqcorrscan.core.template_gen INFO Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.955000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,353 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,355 eqcorrscan.core.template_gen INFO Working on channel PSR.EHZ 2020-11-07 18:28:27,355 eqcorrscan.core.template_gen INFO Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,355 eqcorrscan.core.template_gen WARNING Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,359 eqcorrscan.core.template_gen INFO Working on channel PAG.EHZ 2020-11-07 18:28:27,359 eqcorrscan.core.template_gen INFO Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,359 eqcorrscan.core.template_gen WARNING Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,361 eqcorrscan.core.template_gen INFO Working on channel PCA.EHZ 2020-11-07 18:28:27,361 eqcorrscan.core.template_gen INFO Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,361 eqcorrscan.core.template_gen WARNING Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,362 eqcorrscan.core.template_gen INFO Working on channel PHA.EHZ 2020-11-07 18:28:27,363 eqcorrscan.core.template_gen INFO Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,363 eqcorrscan.core.template_gen WARNING Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,364 eqcorrscan.core.template_gen INFO Working on channel PHOB.EHZ 2020-11-07 18:28:27,364 eqcorrscan.core.template_gen INFO Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.955000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,364 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,366 eqcorrscan.core.template_gen INFO Working on channel PSR.EHZ 2020-11-07 18:28:27,366 eqcorrscan.core.template_gen INFO Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,366 eqcorrscan.core.template_gen WARNING Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,370 eqcorrscan.core.template_gen INFO Working on channel PAG.EHZ 2020-11-07 18:28:27,370 eqcorrscan.core.template_gen INFO Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,370 eqcorrscan.core.template_gen WARNING Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,372 eqcorrscan.core.template_gen INFO Working on channel PCA.EHZ 2020-11-07 18:28:27,372 eqcorrscan.core.template_gen INFO Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,372 eqcorrscan.core.template_gen WARNING Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,373 eqcorrscan.core.template_gen INFO Working on channel PHA.EHZ 2020-11-07 18:28:27,374 eqcorrscan.core.template_gen INFO Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,374 eqcorrscan.core.template_gen WARNING Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,375 eqcorrscan.core.template_gen INFO Working on channel PHOB.EHZ 2020-11-07 18:28:27,375 eqcorrscan.core.template_gen INFO Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.955000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,375 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,377 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,378 eqcorrscan.core.template_gen INFO Working on channel PSR.EHZ 2020-11-07 18:28:27,379 eqcorrscan.core.template_gen INFO Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,379 eqcorrscan.core.template_gen WARNING Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,383 eqcorrscan.core.template_gen INFO Working on channel PAG.EHZ 2020-11-07 18:28:27,383 eqcorrscan.core.template_gen INFO Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,383 eqcorrscan.core.template_gen WARNING Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,385 eqcorrscan.core.template_gen INFO Working on channel PCA.EHZ 2020-11-07 18:28:27,385 eqcorrscan.core.template_gen INFO Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,385 eqcorrscan.core.template_gen WARNING Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,387 eqcorrscan.core.template_gen INFO Working on channel PHA.EHZ 2020-11-07 18:28:27,387 eqcorrscan.core.template_gen INFO Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,387 eqcorrscan.core.template_gen WARNING Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,388 eqcorrscan.core.template_gen INFO Working on channel PHOB.EHZ 2020-11-07 18:28:27,388 eqcorrscan.core.template_gen INFO Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.955000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,389 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,390 eqcorrscan.core.template_gen INFO Working on channel PSR.EHZ 2020-11-07 18:28:27,390 eqcorrscan.core.template_gen INFO Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples 2020-11-07 18:28:27,390 eqcorrscan.core.template_gen WARNING Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! Tribe of 4 templates 2020-11-07 18:28:27,397 eqcorrscan.core.template_gen INFO Pre-processing data 2020-11-07 18:28:27,545 eqcorrscan.core.template_gen INFO Working on channel PAG.EHZ 2020-11-07 18:28:27,545 eqcorrscan.core.template_gen INFO Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,545 eqcorrscan.core.template_gen WARNING Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,547 eqcorrscan.core.template_gen INFO Working on channel PCA.EHZ 2020-11-07 18:28:27,547 eqcorrscan.core.template_gen INFO Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,547 eqcorrscan.core.template_gen WARNING Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,549 eqcorrscan.core.template_gen INFO Working on channel PHA.EHZ 2020-11-07 18:28:27,549 eqcorrscan.core.template_gen INFO Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,549 eqcorrscan.core.template_gen WARNING Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,550 eqcorrscan.core.template_gen INFO Working on channel PHOB.EHZ 2020-11-07 18:28:27,550 eqcorrscan.core.template_gen INFO Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.005000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,551 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,552 eqcorrscan.core.template_gen INFO Working on channel PSR.EHZ 2020-11-07 18:28:27,552 eqcorrscan.core.template_gen INFO Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,552 eqcorrscan.core.template_gen WARNING Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,554 eqcorrscan.core.template_gen INFO Working on channel PAG.EHZ 2020-11-07 18:28:27,555 eqcorrscan.core.template_gen INFO Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,555 eqcorrscan.core.template_gen WARNING Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,556 eqcorrscan.core.template_gen INFO Working on channel PCA.EHZ 2020-11-07 18:28:27,556 eqcorrscan.core.template_gen INFO Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,556 eqcorrscan.core.template_gen WARNING Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,558 eqcorrscan.core.template_gen INFO Working on channel PHA.EHZ 2020-11-07 18:28:27,558 eqcorrscan.core.template_gen INFO Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,558 eqcorrscan.core.template_gen WARNING Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,559 eqcorrscan.core.template_gen INFO Working on channel PHOB.EHZ 2020-11-07 18:28:27,559 eqcorrscan.core.template_gen INFO Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.005000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,560 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,561 eqcorrscan.core.template_gen INFO Working on channel PSR.EHZ 2020-11-07 18:28:27,561 eqcorrscan.core.template_gen INFO Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,561 eqcorrscan.core.template_gen WARNING Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,563 eqcorrscan.core.template_gen INFO Working on channel PAG.EHZ 2020-11-07 18:28:27,563 eqcorrscan.core.template_gen INFO Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,563 eqcorrscan.core.template_gen WARNING Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,565 eqcorrscan.core.template_gen INFO Working on channel PCA.EHZ 2020-11-07 18:28:27,565 eqcorrscan.core.template_gen INFO Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,565 eqcorrscan.core.template_gen WARNING Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,567 eqcorrscan.core.template_gen INFO Working on channel PHA.EHZ 2020-11-07 18:28:27,567 eqcorrscan.core.template_gen INFO Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,567 eqcorrscan.core.template_gen WARNING Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,569 eqcorrscan.core.template_gen INFO Working on channel PHOB.EHZ 2020-11-07 18:28:27,569 eqcorrscan.core.template_gen INFO Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.005000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,569 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,570 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,572 eqcorrscan.core.template_gen INFO Working on channel PSR.EHZ 2020-11-07 18:28:27,572 eqcorrscan.core.template_gen INFO Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,572 eqcorrscan.core.template_gen WARNING Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,574 eqcorrscan.core.template_gen INFO Working on channel PAG.EHZ 2020-11-07 18:28:27,574 eqcorrscan.core.template_gen INFO Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,574 eqcorrscan.core.template_gen WARNING Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,575 eqcorrscan.core.template_gen INFO Working on channel PCA.EHZ 2020-11-07 18:28:27,576 eqcorrscan.core.template_gen INFO Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,576 eqcorrscan.core.template_gen WARNING Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,577 eqcorrscan.core.template_gen INFO Working on channel PHA.EHZ 2020-11-07 18:28:27,578 eqcorrscan.core.template_gen INFO Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,578 eqcorrscan.core.template_gen WARNING Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,579 eqcorrscan.core.template_gen INFO Working on channel PHOB.EHZ 2020-11-07 18:28:27,580 eqcorrscan.core.template_gen INFO Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.005000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,580 eqcorrscan.core.template_gen WARNING Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! 2020-11-07 18:28:27,581 eqcorrscan.core.template_gen INFO Working on channel PSR.EHZ 2020-11-07 18:28:27,582 eqcorrscan.core.template_gen INFO Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples 2020-11-07 18:28:27,582 eqcorrscan.core.template_gen WARNING Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! ------------------------------------------------------------- Captured log setup -------------------------------------------------------------- INFO eqcorrscan.core.template_gen:template_gen.py:305 Pre-processing data INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PAG.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PCA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHOB.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.955000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PSR.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PAG.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PCA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHOB.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.955000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PSR.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PAG.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PCA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHOB.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.955000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PSR.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PAG.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PCA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHOB.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.955000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PSR.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.950000Z | 20.0 Hz, 72000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:305 Pre-processing data INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PAG.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PCA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHOB.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.005000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PSR.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PAG.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PCA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHOB.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.005000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PSR.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PAG.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PCA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHOB.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.005000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PSR.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PAG.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PAG..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PAG.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PCA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PCA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PCA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHA.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHA..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHA.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PHOB.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PHOB..EHZ | 2004-09-28T17:00:00.005000Z - 2004-09-28T17:59:59.005000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PHOB.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel PSR.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NC.PSR..EHZ | 2004-09-28T17:00:00.000000Z - 2004-09-28T17:59:59.000000Z | 1.0 Hz, 3600 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for PSR.EHZ has no phase hint given, you should not use this template for cross-correlation re-picking! ___________________________________ ERROR at setup of TestMatchObjectHeavy.test_client_detect_save_progress ___________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError ________________________________________ ERROR at setup of TestMatchObjectHeavy.test_day_long_methods _________________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError _________________________________________ ERROR at setup of TestMatchObjectHeavy.test_family_lag_calc _________________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError _________________________________________ ERROR at setup of TestMatchObjectHeavy.test_party_lag_calc __________________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError __________________________________ ERROR at setup of TestMatchObjectHeavy.test_party_lag_calc_empty_families __________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError ___________________________________ ERROR at setup of TestMatchObjectHeavy.test_party_lag_calc_missing_data ___________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError ___________________________________ ERROR at setup of TestMatchObjectHeavy.test_party_lag_calc_preprocessed ___________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError ____________________________________ ERROR at setup of TestMatchObjectHeavy.test_party_lag_calc_short_data ____________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError _______________________________ ERROR at setup of TestMatchObjectHeavy.test_template_construct_not_implemented ________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError _________________________________________ ERROR at setup of TestMatchObjectHeavy.test_template_detect _________________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError __________________________________________ ERROR at setup of TestMatchObjectHeavy.test_tribe_detect ___________________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError ____________________________________ ERROR at setup of TestMatchObjectHeavy.test_tribe_detect_masked_data _____________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError ___________________________________ ERROR at setup of TestMatchObjectHeavy.test_tribe_detect_no_processing ____________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError __________________________________ ERROR at setup of TestMatchObjectHeavy.test_tribe_detect_parallel_process __________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError ___________________________________ ERROR at setup of TestMatchObjectHeavy.test_tribe_detect_save_progress ____________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError _____________________________________ ERROR at setup of TestMatchObjectHeavy.test_tribe_detect_short_data _____________________________________ cls = @classmethod @pytest.mark.flaky(reruns=2) def setUpClass(cls): client = Client('NCEDC') t1 = UTCDateTime(2004, 9, 28, 17) process_len = 3600 t2 = t1 + process_len catalog = client.get_events( starttime=t1, endtime=t2, minmagnitude=4, minlatitude=35.7, maxlatitude=36.1, minlongitude=-120.6, maxlongitude=-120.2, includearrivals=True) catalog = catalog_utils.filter_picks( catalog, channels=['EHZ'], top_n_picks=5) template_stachans = [] for event in catalog: for pick in event.picks: template_stachans.append( (pick.waveform_id.network_code, pick.waveform_id.station_code, pick.waveform_id.channel_code)) template_stachans = list(set(template_stachans)) bulk_info = [(stachan[0], stachan[1], '*', stachan[2], t1 - 5, t2 + 5) for stachan in template_stachans] # Just downloading an hour of data st = client.get_waveforms_bulk(bulk_info) st.merge() st.trim(t1, t2) for tr in st: tr.data = tr.data[0:int(process_len * tr.stats.sampling_rate)] assert len(tr.data) == process_len * tr.stats.sampling_rate assert tr.stats.starttime - t1 < 0.1 unproc_st = st.copy() tribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=2.0, highcut=9.0, samp_rate=20.0, filt_order=4, length=3.0, prepick=0.15, swin='all', process_len=process_len) print(tribe) onehztribe = Tribe().construct( method='from_meta_file', catalog=catalog, st=st.copy(), lowcut=0.1, highcut=0.45, samp_rate=1.0, filt_order=4, length=20.0, prepick=0.15, swin='all', process_len=process_len) st = pre_processing.shortproc( st, lowcut=2.0, highcut=9.0, filt_order=4, samp_rate=20.0, num_cores=1, starttime=st[0].stats.starttime, endtime=st[0].stats.starttime + process_len) party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.family = party.sort()[0].copy() E AttributeError: 'NoneType' object has no attribute 'copy' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:677: AttributeError ___________________________________ ERROR at setup of TestMatchObjectLight.test_detection_regenerate_event ____________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _________________________________________ ERROR at setup of TestMatchObjectLight.test_family_addition _________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _________________________________________ ERROR at setup of TestMatchObjectLight.test_family_catalogs _________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _________________________________________ ERROR at setup of TestMatchObjectLight.test_family_equality _________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ___________________________________________ ERROR at setup of TestMatchObjectLight.test_family_init ___________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ____________________________________________ ERROR at setup of TestMatchObjectLight.test_family_io ____________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _________________________________________ ERROR at setup of TestMatchObjectLight.test_family_methods __________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _________________________________________ ERROR at setup of TestMatchObjectLight.test_family_slicing __________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ___________________________________________ ERROR at setup of TestMatchObjectLight.test_family_sort ___________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ____________________________________________ ERROR at setup of TestMatchObjectLight.test_party_add ____________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _______________________________________ ERROR at setup of TestMatchObjectLight.test_party_basic_methods _______________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _________________________________________ ERROR at setup of TestMatchObjectLight.test_party_decluster _________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ___________________________________ ERROR at setup of TestMatchObjectLight.test_party_decluster_same_times ____________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ____________________________________________ ERROR at setup of TestMatchObjectLight.test_party_io _____________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError __________________________________________ ERROR at setup of TestMatchObjectLight.test_party_io_list __________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ___________________________________ ERROR at setup of TestMatchObjectLight.test_party_io_no_catalog_reading ___________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ___________________________________ ERROR at setup of TestMatchObjectLight.test_party_io_no_catalog_writing ___________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _______________________________________ ERROR at setup of TestMatchObjectLight.test_party_io_wildcards ________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _______________________________________ ERROR at setup of TestMatchObjectLight.test_party_plot_grouped ________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _____________________________________ ERROR at setup of TestMatchObjectLight.test_party_plot_grouped_rate _____________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ______________________________________ ERROR at setup of TestMatchObjectLight.test_party_plot_individual ______________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ________________________________________ ERROR at setup of TestMatchObjectLight.test_party_rethreshold ________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _________________________________________ ERROR at setup of TestMatchObjectLight.test_party_write_csv _________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _________________________________________ ERROR at setup of TestMatchObjectLight.test_slicing_by_name _________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ___________________________________________ ERROR at setup of TestMatchObjectLight.test_template_io ___________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ________________________________________ ERROR at setup of TestMatchObjectLight.test_template_printing ________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError ____________________________________________ ERROR at setup of TestMatchObjectLight.test_tribe_add ____________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _____________________________________ ERROR at setup of TestMatchObjectLight.test_tribe_internal_methods ______________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError __________________________________________ ERROR at setup of TestMatchObjectLight.test_tribe_io_qml ___________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _________________________________________ ERROR at setup of TestMatchObjectLight.test_tribe_io_sc3ml __________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError __________________________________________ ERROR at setup of TestMatchObjectLight.test_tribe_remove ___________________________________________ cls = @classmethod def setUpClass(cls): cls.party = Party().read( filename=os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'test_party.tgz')) > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > cls.tribe = Tribe(templates=[fam.template for fam in cls.party]) E AttributeError: 'NoneType' object has no attribute 'template' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:979: AttributeError _______________________________________ ERROR at setup of EventPlottingMethods.test_detection_multiplot _______________________________________ cls = @classmethod def setUpClass(cls): test_file = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'REA', 'TEST_', '01-0411-15L.S201309') test_wavefile = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00') > cls.event = read_events(test_file)[0] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read_events ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py:812: in read_events return _generic_reader(pathname_or_url, _read, format=format, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' callback_func = , kwargs = {'format': None} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError __________________________________________ ERROR at setup of EventPlottingMethods.test_plot_repicked __________________________________________ cls = @classmethod def setUpClass(cls): test_file = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'REA', 'TEST_', '01-0411-15L.S201309') test_wavefile = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00') > cls.event = read_events(test_file)[0] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read_events ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py:812: in read_events return _generic_reader(pathname_or_url, _read, format=format, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' callback_func = , kwargs = {'format': None} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ______________________________________ ERROR at setup of EventPlottingMethods.test_pretty_template_plot _______________________________________ cls = @classmethod def setUpClass(cls): test_file = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'REA', 'TEST_', '01-0411-15L.S201309') test_wavefile = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00') > cls.event = read_events(test_file)[0] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read_events ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py:812: in read_events return _generic_reader(pathname_or_url, _read, format=format, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' callback_func = , kwargs = {'format': None} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ___________________________________ ERROR at setup of EventPlottingMethods.test_pretty_template_plot_basic ____________________________________ cls = @classmethod def setUpClass(cls): test_file = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'REA', 'TEST_', '01-0411-15L.S201309') test_wavefile = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00') > cls.event = read_events(test_file)[0] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read_events ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py:812: in read_events return _generic_reader(pathname_or_url, _read, format=format, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' callback_func = , kwargs = {'format': None} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ____________________________________ ERROR at setup of EventPlottingMethods.test_pretty_template_plot_sort ____________________________________ cls = @classmethod def setUpClass(cls): test_file = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'REA', 'TEST_', '01-0411-15L.S201309') test_wavefile = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00') > cls.event = read_events(test_file)[0] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read_events ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py:812: in read_events return _generic_reader(pathname_or_url, _read, format=format, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' callback_func = , kwargs = {'format': None} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ______________________________ ERROR at setup of EventPlottingMethods.test_pretty_template_plot_sort_by_picktime ______________________________ cls = @classmethod def setUpClass(cls): test_file = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'REA', 'TEST_', '01-0411-15L.S201309') test_wavefile = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00') > cls.event = read_events(test_file)[0] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read_events ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py:812: in read_events return _generic_reader(pathname_or_url, _read, format=format, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' callback_func = , kwargs = {'format': None} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError __________________________________ ERROR at setup of MultiStreamPlottingMethods.test_subspace_detector_plot ___________________________________ cls = @classmethod def setUpClass(cls): wavefiles = glob.glob(os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'WAV', 'TEST_', '2013-*')) streams = [read(w) for w in wavefiles[1:10]] cls.stream_list = [] for st in streams: tr = st.select(station='GCSZ', channel='EHZ') tr = tr.detrend('simple').resample(100).filter( 'bandpass', freqmin=2, freqmax=8) cls.stream_list.append(tr) > cls.detector = subspace.Detector().read(os.path.join( os.path.abspath(os.path.dirname(__file__)), '..', 'tests', 'test_data', 'subspace', 'stat_test_detector.h5')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:299: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/../tests/test_data/subspace/stat_test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError _____________________________________ ERROR at setup of MultiStreamPlottingMethods.test_subspace_fc_plot ______________________________________ cls = @classmethod def setUpClass(cls): wavefiles = glob.glob(os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'WAV', 'TEST_', '2013-*')) streams = [read(w) for w in wavefiles[1:10]] cls.stream_list = [] for st in streams: tr = st.select(station='GCSZ', channel='EHZ') tr = tr.detrend('simple').resample(100).filter( 'bandpass', freqmin=2, freqmax=8) cls.stream_list.append(tr) > cls.detector = subspace.Detector().read(os.path.join( os.path.abspath(os.path.dirname(__file__)), '..', 'tests', 'test_data', 'subspace', 'stat_test_detector.h5')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:299: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/../tests/test_data/subspace/stat_test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError _________________________________________ ERROR at setup of MultiStreamPlottingMethods.test_svd_plot __________________________________________ cls = @classmethod def setUpClass(cls): wavefiles = glob.glob(os.path.join( os.path.dirname(os.path.abspath(__file__)), 'test_data', 'WAV', 'TEST_', '2013-*')) streams = [read(w) for w in wavefiles[1:10]] cls.stream_list = [] for st in streams: tr = st.select(station='GCSZ', channel='EHZ') tr = tr.detrend('simple').resample(100).filter( 'bandpass', freqmin=2, freqmax=8) cls.stream_list.append(tr) > cls.detector = subspace.Detector().read(os.path.join( os.path.abspath(os.path.dirname(__file__)), '..', 'tests', 'test_data', 'subspace', 'stat_test_detector.h5')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:299: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/../tests/test_data/subspace/stat_test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError ___________________________________________ ERROR at setup of TestPreProcessing.test_daylong_checks ___________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ______________________________________________ ERROR at setup of TestPreProcessing.test_dayproc _______________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception _______________________________________ ERROR at setup of TestPreProcessing.test_dayproc_nyquist_error ________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ____________________________________ ERROR at setup of TestPreProcessing.test_dayproc_parallel_cores_unset ____________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ___________________________________________ ERROR at setup of TestPreProcessing.test_dayproc_serial ___________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ___________________________________________ ERROR at setup of TestPreProcessing.test_dayproc_trace ____________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ____________________________________________ ERROR at setup of TestPreProcessing.test_filter_error ____________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ___________________________________________ ERROR at setup of TestPreProcessing.test_gap_overlength ___________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ___________________________________________ ERROR at setup of TestPreProcessing.test_highcut_debug ____________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ____________________________________________ ERROR at setup of TestPreProcessing.test_lowcut_debug ____________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception _______________________________________ ERROR at setup of TestPreProcessing.test_masked_array_resample ________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ____________________________________________ ERROR at setup of TestPreProcessing.test_masked_trace ____________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ________________________________________ ERROR at setup of TestPreProcessing.test_masked_trace_no_fill ________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ______________________________________________ ERROR at setup of TestPreProcessing.test_parallel ______________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ________________________________________ ERROR at setup of TestPreProcessing.test_parallel_core_unset _________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ______________________________________________ ERROR at setup of TestPreProcessing.test_process _______________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception __________________________________________ ERROR at setup of TestPreProcessing.test_process_bad_data __________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception __________________________________________ ERROR at setup of TestPreProcessing.test_process_datetime __________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ________________________________________ ERROR at setup of TestPreProcessing.test_process_nyquist_fail ________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ______________________________________ ERROR at setup of TestPreProcessing.test_short_data_empty_return _______________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception __________________________________________ ERROR at setup of TestPreProcessing.test_short_data_fail ___________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception __________________________________________ ERROR at setup of TestPreProcessing.test_short_data_pass ___________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception _____________________________________________ ERROR at setup of TestPreProcessing.test_shortproc ______________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception _________________________________________ ERROR at setup of TestPreProcessing.test_shortproc_set_end __________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ________________________________________ ERROR at setup of TestPreProcessing.test_shortproc_set_start _________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ____________________________________ ERROR at setup of TestPreProcessing.test_shortproc_set_start_and_end _____________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception _________________________________________ ERROR at setup of TestPreProcessing.test_trace_as_argument __________________________________________ cls = @classmethod def setUpClass(cls): testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'day_vols', 'Y2012', 'R086.01', '*') > cls.st = read(testing_path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ____________________________________________ ERROR at setup of TestEdgeGen.test_extract_from_stack ____________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ______________________________________ ERROR at setup of TestEdgeGen.test_extract_from_stack_and_process ______________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ______________________________________ ERROR at setup of TestEdgeGen.test_extract_from_stack_including_z ______________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ___________________________________________________ ERROR at setup of TestEdgeGen.test_misc ___________________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError _______________________________________________ ERROR at setup of TestEdgeGen.test_missing_data _______________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError _____________________________________________ ERROR at setup of TestEdgeGen.test_no_channel_code ______________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ___________________________________________ ERROR at setup of TestEdgeGen.test_no_data_for_channel ____________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError _____________________________________________ ERROR at setup of TestEdgeGen.test_no_matched_picks _____________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError _____________________________________________ ERROR at setup of TestEdgeGen.test_no_station_code ______________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ________________________________________________ ERROR at setup of TestEdgeGen.test_snr_cutoff ________________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError __________________________________________________ ERROR at setup of TestEdgeGen.test_swin_P __________________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError __________________________________________ ERROR at setup of TestEdgeGen.test_swin_all_and_all_horiz __________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ______________________________________________ ERROR at setup of TestEdgeGen.test_triggered_data ______________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ___________________________________________ ERROR at setup of TestEdgeGen.test_undefined_phase_type ___________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ____________________________________________ ERROR at setup of TestEdgeGen.test_warn_no_phase_hint ____________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ________________________________________________ ERROR at setup of TestEdgeGen.test_warn_zeros ________________________________________________ cls = @classmethod def setUpClass(cls): import eqcorrscan cls.testing_path = os.path.dirname(eqcorrscan.__file__) + '/tests' log = logging.getLogger(template_gen_module.__name__) cls._log_handler = MockLoggingHandler(level='DEBUG') log.addHandler(cls._log_handler) cls.log_messages = cls._log_handler.messages > cls.st = read(os.path.join( cls.testing_path, 'test_data', 'WAV', 'TEST_', '2013-09-15-0930-28.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-15-0930-28.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ___________________________________________ ERROR at setup of TestDayLong.test_day_long_processing ____________________________________________ cls = @classmethod def setUpClass(cls): cls.testing_path = os.path.dirname( os.path.abspath(inspect.getfile(inspect.currentframe()))) > cls.st = read(os.path.join(cls.testing_path, 'test_data', 'day_vols', 'Y2012', 'R086.01', '*')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:466: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/day_vols/Y2012/R086.01/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ================================================================== FAILURES =================================================================== _____________________________________________ [doctest] eqcorrscan.core.template_gen.template_gen _____________________________________________ 199 200 .. rubric:: Example 201 202 >>> from obspy import read 203 >>> from eqcorrscan.core.template_gen import template_gen 204 >>> # Get the path to the test data 205 >>> import eqcorrscan 206 >>> import os 207 >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' 208 >>> st = read(TEST_PATH + '/WAV/TEST_/' + UNEXPECTED EXCEPTION: FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "", line 2, in read File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py", line 300, in _map_example_filename return func(*args, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py", line 212, in read st = _generic_reader(pathname_or_url, _read, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py", line 700, in _generic_reader raise IOError(2, "No such file or directory", pathname) FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/template_gen.py:208: UnexpectedException -------------------------------------------------------------- Captured log call -------------------------------------------------------------- INFO eqcorrscan.core.template_gen:template_gen.py:299 Downloading data INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-02T05:10:16.620000Z end-time: 2016-01-02T05:15:16.620000Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-02T05:10:16.620000Z end-time: 2016-01-02T05:15:16.620000Z INFO eqcorrscan.core.template_gen:template_gen.py:305 Pre-processing data INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel CLV.DPZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace BG.CLV..DPZ | 2016-01-02T05:10:16.620000Z - 2016-01-02T05:15:16.570000Z | 20.0 Hz, 6000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for CLV.DPZ has no phase hint given, you should not use this template for cross-correlation re-picking! INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel BKS.HHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace BK.BKS.00.HHZ | 2016-01-02T05:10:16.628393Z - 2016-01-02T05:15:16.578393Z | 20.0 Hz, 6000 samples WARNING eqcorrscan.core.template_gen:template_gen.py:781 Pick for BKS.HHZ has no phase hint given, you should not use this template for cross-correlation re-picking! ________________________________________ [doctest] eqcorrscan.core.match_filter.party.Party.decluster _________________________________________ 500 within the trig_int defined time, then they will be declustered. 501 502 .. Warning:: 503 Works in place on object, if you need to keep the original safe 504 then run this on a copy of the object! 505 506 .. rubric:: Example 507 508 >>> party = Party().read() 509 >>> len(party) Expected: 4 Got: 0 /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py:509: DocTestFailure _______________________________________ [doctest] eqcorrscan.core.match_filter.party.Party.get_catalog ________________________________________ 972 973 Get an obspy catalog object from the party. 974 975 :returns: :class:`obspy.core.event.Catalog` 976 977 .. rubric:: Example 978 979 >>> party = Party().read() 980 >>> cat = party.get_catalog() 981 >>> print(len(cat)) Expected: 4 Got: 0 /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py:981: DocTestFailure ________________________________________ [doctest] eqcorrscan.core.match_filter.party.Party.min_chans _________________________________________ 997 Note that this is a strict `if detection.no_chans > min_chans:` 998 rather than >=. Maintained for backwards compatability. 999 :return: Party 1000 1001 .. Note:: Works in place on Party. 1002 1003 .. rubric:: Example 1004 1005 >>> party = Party().read() 1006 >>> print(len(party)) Expected: 4 Got: 0 /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py:1006: DocTestFailure ___________________________________________ [doctest] eqcorrscan.core.match_filter.party.Party.read ___________________________________________ 716 will be regenerated - for large catalogs this can be faster. 717 :type estimate_origins: bool 718 :param estimate_origins: 719 If True and no catalog is found, or read_detection_catalog is False 720 then new events with origins estimated from the template origin 721 time will be created. 722 723 .. rubric:: Example 724 725 >>> Party().read() Expected: Party of 4 Families. Got: Party of 0 Families. /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py:725: DocTestFailure _______________________________________ [doctest] eqcorrscan.core.match_filter.party.Party.rethreshold ________________________________________ 418 :param new_threshold: New threshold level 419 :type new_threshold_type: str 420 :param new_threshold_type: Either 'MAD', 'absolute' or 'av_chan_corr' 421 422 .. rubric:: Examples 423 424 Using the MAD threshold on detections made using the MAD threshold: 425 426 >>> party = Party().read() 427 >>> len(party) Expected: 4 Got: 0 /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py:427: DocTestFailure __________________________________________ [doctest] eqcorrscan.core.match_filter.party.Party.write ___________________________________________ 643 We recommend writing to the 'tar' format, which will write out 644 all the template information (wavefiles as miniseed and metadata) 645 alongside the detections and store these in a tar archive. This 646 is readable by other programs and maintains all information 647 required for further study. 648 649 .. rubric:: Example 650 651 >>> party = Party().read() 652 >>> party.write('test_tar_write', format='tar') Expected: Party of 4 Families. Got: Party of 0 Families. /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py:652: DocTestFailure _______________________________________ [doctest] eqcorrscan.core.match_filter.template.Template.__eq__ _______________________________________ 179 False 180 181 182 This will also test if the events in the templates are the same, 183 ignoring resource ID's as obspy will alter these so that they do not 184 match. 185 186 >>> from eqcorrscan.core.match_filter.party import Party 187 >>> party = Party().read() 188 >>> template_a = party.families[0].template UNEXPECTED EXCEPTION: IndexError('list index out of range') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in IndexError: list index out of range /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/template.py:188: UnexpectedException _____________________________________ [doctest] eqcorrscan.core.match_filter.template.Template.construct ______________________________________ 604 605 .. rubric:: Example 606 607 >>> # Get the path to the test data 608 >>> import eqcorrscan 609 >>> import os, glob 610 >>> TEST_PATH = ( 611 ... os.path.dirname(eqcorrscan.__file__) + '/tests/test_data') 612 >>> sac_files = glob.glob(TEST_PATH + '/SAC/2014p611252/*') 613 >>> template = Template().construct( UNEXPECTED EXCEPTION: IndexError('list index out of range') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/template.py", line 642, in construct streams, events, process_lengths = template_gen.template_gen( File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/template_gen.py", line 275, in template_gen if isinstance(sac_files[0], (Stream, Trace)): IndexError: list index out of range /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/template.py:613: UnexpectedException _____________________________________________________ TestCatalogMethods.test_read_phase ______________________________________________________ self = def test_read_phase(self): """Function to test the phase reading function""" test_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'tunnel.phase') > test_catalog = read_phase(test_file) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/catalog_to_dd_test.py:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ph_file = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/tunnel.phase' def read_phase(ph_file): """ Read hypoDD phase files into Obspy catalog class. :type ph_file: str :param ph_file: Phase file to read event info from. :returns: Catalog of events from file. :rtype: :class:`obspy.core.event.Catalog` >>> from obspy.core.event.catalog import Catalog >>> # Get the path to the test data >>> import eqcorrscan >>> import os >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' >>> catalog = read_phase(TEST_PATH + '/tunnel.phase') >>> isinstance(catalog, Catalog) True """ ph_catalog = Catalog() > f = open(ph_file, 'r') E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/tunnel.phase' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/catalog_to_dd.py:717: FileNotFoundError _____________________________________________________ TestCatalogMethods.test_write_phase _____________________________________________________ self = def test_write_phase(self): """ This file has been tested with ph2dt """ write_phase(self.catalog) test_data_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data') > with open(os.path.join(test_data_path, "phase.dat"), "r") as f: E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/phase.dat' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/catalog_to_dd_test.py:256: FileNotFoundError ____________________________________________________ TestCatalogMethods.test_write_station ____________________________________________________ self = def test_write_station(self): """ This file has been tested with ph2dt """ write_station(self.inventory) test_data_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data') > with open(os.path.join(test_data_path, "station.dat"), "r") as f: E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/station.dat' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/catalog_to_dd_test.py:267: FileNotFoundError ______________________________________________________ ClusteringTests.test_corr_cluster ______________________________________________________ self = def test_corr_cluster(self): """Test the corr_cluster function.""" testing_path = os.path.join( self.testing_path, 'similar_events_processed') stream_files = glob.glob(os.path.join(testing_path, '*')) stream_list = [read(stream_file) for stream_file in stream_files] for stream in stream_list: for tr in stream: if not (tr.stats.station == 'GCSZ' and tr.stats.channel == 'EHZ'): stream.remove(tr) continue trace_list = [stream[0] for stream in stream_list] > output = corr_cluster(trace_list=trace_list, thresh=0.7) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py:134: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py:504: in corr_cluster stack = stacking.linstack([Stream(tr) for tr in trace_list])[0] ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/stacking.py:36: in linstack stack = streams[np.argmax([len(stream) for stream in streams])].copy() <__array_function__ internals>:5: in argmax ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/numpy/core/fromnumeric.py:1188: in argmax return _wrapfunc(a, 'argmax', axis=axis, out=out) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/numpy/core/fromnumeric.py:55: in _wrapfunc return _wrapit(obj, method, *args, **kwds) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ obj = [], method = 'argmax', args = (), kwds = {'axis': None, 'out': None}, wrap = None def _wrapit(obj, method, *args, **kwds): try: wrap = obj.__array_wrap__ except AttributeError: wrap = None > result = getattr(asarray(obj), method)(*args, **kwds) E ValueError: attempt to get argmax of an empty sequence ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/numpy/core/fromnumeric.py:44: ValueError ____________________________________________________ ClusteringTests.test_distance_matrix _____________________________________________________ self = def test_distance_matrix(self): """Test that we can create a useful distance matrix.""" testing_path = os.path.join(self.testing_path, 'WAV', 'TEST_') stream_files = glob.glob(os.path.join(testing_path, '*DFDPC*'))[0:10] stream_list = [read(stream_file) for stream_file in stream_files] for st in stream_list: for tr in st: if tr.stats.sampling_rate != 100.0: ratio = tr.stats.sampling_rate / 100 if int(ratio) == ratio: tr.decimate(int(ratio)) else: tr.resample(100) > shortest_tr = min( [tr.stats.npts for st in stream_list for tr in st]) E ValueError: min() arg is an empty sequence ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py:82: ValueError ____________________________________________________ ClusteringTests.test_known_coherence _____________________________________________________ self = def test_known_coherence(self): """Test for a real stream case""" > st1 = read(os.path.join(self.testing_path, 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py:56: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ______________________________________________________ ClusteringTests.test_unclustered _______________________________________________________ self = def test_unclustered(self): """Test clustering on unclustered data...""" testing_path = os.path.join(self.testing_path, 'WAV', 'TEST_') stream_files = glob.glob(os.path.join(testing_path, '*DFDPC*'))[0:10] stream_list = [(read(stream_file), i) for i, stream_file in enumerate(stream_files)] for st in stream_list: for tr in st[0]: if tr.stats.sampling_rate != 100.0: ratio = tr.stats.sampling_rate / 100 if int(ratio) == ratio: tr.decimate(int(ratio)) else: tr.resample(100) > shortest_tr = min( [tr.stats.npts for st in stream_list for tr in st[0]]) E ValueError: min() arg is an empty sequence ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py:105: ValueError _____________________________________________________ EfficientClustering.test_clustered ______________________________________________________ self = def test_clustered(self): """Test clustering on clustered data...""" > groups = cluster( template_list=[(st, i) for i, st in enumerate(self.stream_list)], show=False, corr_thresh=0.3) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py:183: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py:191: in cluster dist_mat = distance_matrix( ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py:140: in distance_matrix np.fill_diagonal(dist_mat, 0) <__array_function__ internals>:5: in fill_diagonal ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = array([], dtype=float64), val = 0, wrap = False @array_function_dispatch(_fill_diagonal_dispatcher) def fill_diagonal(a, val, wrap=False): """Fill the main diagonal of the given array of any dimensionality. For an array `a` with ``a.ndim >= 2``, the diagonal is the list of locations with indices ``a[i, ..., i]`` all identical. This function modifies the input array in-place, it does not return a value. Parameters ---------- a : array, at least 2-D. Array whose diagonal is to be filled, it gets modified in-place. val : scalar Value to be written on the diagonal, its type must be compatible with that of the array a. wrap : bool For tall matrices in NumPy version up to 1.6.2, the diagonal "wrapped" after N columns. You can have this behavior with this option. This affects only tall matrices. See also -------- diag_indices, diag_indices_from Notes ----- .. versionadded:: 1.4.0 This functionality can be obtained via `diag_indices`, but internally this version uses a much faster implementation that never constructs the indices and uses simple slicing. Examples -------- >>> a = np.zeros((3, 3), int) >>> np.fill_diagonal(a, 5) >>> a array([[5, 0, 0], [0, 5, 0], [0, 0, 5]]) The same function can operate on a 4-D array: >>> a = np.zeros((3, 3, 3, 3), int) >>> np.fill_diagonal(a, 4) We only show a few blocks for clarity: >>> a[0, 0] array([[4, 0, 0], [0, 0, 0], [0, 0, 0]]) >>> a[1, 1] array([[0, 0, 0], [0, 4, 0], [0, 0, 0]]) >>> a[2, 2] array([[0, 0, 0], [0, 0, 0], [0, 0, 4]]) The wrap option affects only tall matrices: >>> # tall matrices no wrap >>> a = np.zeros((5, 3), int) >>> np.fill_diagonal(a, 4) >>> a array([[4, 0, 0], [0, 4, 0], [0, 0, 4], [0, 0, 0], [0, 0, 0]]) >>> # tall matrices wrap >>> a = np.zeros((5, 3), int) >>> np.fill_diagonal(a, 4, wrap=True) >>> a array([[4, 0, 0], [0, 4, 0], [0, 0, 4], [0, 0, 0], [4, 0, 0]]) >>> # wide matrices >>> a = np.zeros((3, 5), int) >>> np.fill_diagonal(a, 4, wrap=True) >>> a array([[4, 0, 0, 0, 0], [0, 4, 0, 0, 0], [0, 0, 4, 0, 0]]) The anti-diagonal can be filled by reversing the order of elements using either `numpy.flipud` or `numpy.fliplr`. >>> a = np.zeros((3, 3), int); >>> np.fill_diagonal(np.fliplr(a), [1,2,3]) # Horizontal flip >>> a array([[0, 0, 1], [0, 2, 0], [3, 0, 0]]) >>> np.fill_diagonal(np.flipud(a), [1,2,3]) # Vertical flip >>> a array([[0, 0, 3], [0, 2, 0], [1, 0, 0]]) Note that the order in which the diagonal is filled varies depending on the flip function. """ if a.ndim < 2: > raise ValueError("array must be at least 2-d") E ValueError: array must be at least 2-d ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/numpy/lib/index_tricks.py:859: ValueError ------------------------------------------------------------ Captured stdout call ------------------------------------------------------------- 2020-11-07 18:16:33,431 eqcorrscan.utils.clustering INFO Computing the distance matrix using 8 cores -------------------------------------------------------------- Captured log call -------------------------------------------------------------- INFO eqcorrscan.utils.clustering:clustering.py:190 Computing the distance matrix using 8 cores _________________________________________________ ClusteringTestWarnings.test_delay_grouping __________________________________________________ self = def test_delay_grouping(self): """Test grouping by delays""" testing_path = os.path.join(self.testing_path, 'WAV', 'TEST_') stream_files = glob.glob(os.path.join(testing_path, '*DFDPC*')) stream_list = [read(stream_file) for stream_file in stream_files] groups = group_delays(stream_list=stream_list) > self.assertEqual(len(groups), 1) # All have same lag-times E AssertionError: 0 != 1 ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py:467: AssertionError __________________________________________________ ClusteringTestWarnings.test_empirical_svd __________________________________________________ self = def test_empirical_svd(self): """Test the empirical SVD method""" testing_path = os.path.join( self.testing_path, 'similar_events_processed') stream_files = glob.glob(os.path.join(testing_path, '*')) stream_list = [read(stream_file) for stream_file in stream_files] > first_sub, second_sub = empirical_svd(stream_list=stream_list) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py:504: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py:427: in empirical_svd first_subspace = stacking.linstack(stream_list) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/stacking.py:36: in linstack stack = streams[np.argmax([len(stream) for stream in streams])].copy() <__array_function__ internals>:5: in argmax ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/numpy/core/fromnumeric.py:1188: in argmax return _wrapfunc(a, 'argmax', axis=axis, out=out) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/numpy/core/fromnumeric.py:55: in _wrapfunc return _wrapit(obj, method, *args, **kwds) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ obj = [], method = 'argmax', args = (), kwds = {'axis': None, 'out': None}, wrap = None def _wrapit(obj, method, *args, **kwds): try: wrap = obj.__array_wrap__ except AttributeError: wrap = None > result = getattr(asarray(obj), method)(*args, **kwds) E ValueError: attempt to get argmax of an empty sequence ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/numpy/core/fromnumeric.py:44: ValueError _______________________________________________________ TestMagCalcMethods.test_SVD_mag _______________________________________________________ self = def test_SVD_mag(self): """Test the SVD magnitude calculator.""" # Do the set-up testing_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'similar_events_processed') stream_files = glob.glob(os.path.join(testing_path, '*DFDPC*')) stream_list = [read(stream_file) for stream_file in stream_files] event_list = [] for i, stream in enumerate(stream_list): st_list = [] for tr in stream: if (tr.stats.station, tr.stats.channel) not in\ [('WHAT2', 'SH1'), ('WV04', 'SHZ'), ('GCSZ', 'EHZ')]: stream.remove(tr) continue st_list.append(i) event_list.append(st_list) event_list = np.asarray(event_list).T.tolist() SVectors, SValues, Uvectors, stachans = svd(stream_list=stream_list) > M, events_out = svd_moments(u=Uvectors, s=SValues, v=SVectors, stachans=stachans, event_list=event_list) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/mag_calc_test.py:98: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ u = [], s = [], v = [], stachans = [], event_list = [], n_svs = 2 def svd_moments(u, s, v, stachans, event_list, n_svs=2): """ Calculate relative moments/amplitudes using singular-value decomposition. Convert basis vectors calculated by singular value decomposition (see the SVD functions in clustering) into relative moments. For more information see the paper by `Rubinstein & Ellsworth (2010). `_ :type u: list :param u: List of the :class:`numpy.ndarray` input basis vectors from the SVD, one array for each channel used. :type s: list :param s: List of the :class:`numpy.ndarray` of singular values, one array for each channel. :type v: list :param v: List of :class:`numpy.ndarray` of output basis vectors from SVD, one array per channel. :type stachans: list :param stachans: List of station.channel input :type event_list: list :param event_list: List of events for which you have data, such that event_list[i] corresponds to stachans[i], U[i] etc. and event_list[i][j] corresponds to event j in U[i]. These are a series of indexes that map the basis vectors to their relative events and channels - if you have every channel for every event generating these is trivial (see example). :type n_svs: int :param n_svs: Number of singular values to use, defaults to 4. :returns: M, array of relative moments :rtype: :class:`numpy.ndarray` :returns: events_out, list of events that relate to M (in order), \ does not include the magnitude information in the events, see note. :rtype: :class:`obspy.core.event.event.Event` .. note:: M is an array of relative moments (or amplitudes), these cannot be directly compared to true moments without calibration. .. note:: When comparing this method with the method used for creation of subspace detectors (Harris 2006) it is important to note that the input `design set` matrix in Harris contains waveforms as columns, whereas in Rubinstein & Ellsworth it contains waveforms as rows (i.e. the transpose of the Harris data matrix). The U and V matrices are therefore swapped between the two approaches. This is accounted for in EQcorrscan but may lead to confusion when reviewing the code. Here we use the Harris approach. .. rubric:: Example >>> from eqcorrscan.utils.mag_calc import svd_moments >>> from obspy import read >>> import glob >>> import os >>> from eqcorrscan.utils.clustering import svd >>> import numpy as np >>> # Do the set-up >>> testing_path = 'eqcorrscan/tests/test_data/similar_events_processed' >>> stream_files = glob.glob(os.path.join(testing_path, '*')) >>> stream_list = [read(stream_file) for stream_file in stream_files] >>> event_list = [] >>> remove_list = [('WHAT2', 'SH1'), ('WV04', 'SHZ'), ('GCSZ', 'EHZ')] >>> for i, stream in enumerate(stream_list): ... st_list = [] ... for tr in stream: ... if (tr.stats.station, tr.stats.channel) not in remove_list: ... stream.remove(tr) ... continue ... st_list.append(i) ... event_list.append(st_list) # doctest: +SKIP >>> event_list = np.asarray(event_list).T.tolist() >>> SVec, SVal, U, stachans = svd(stream_list=stream_list) # doctest: +SKIP ['GCSZ.EHZ', 'WV04.SHZ', 'WHAT2.SH1'] >>> M, events_out = svd_moments(u=U, s=SVal, v=SVec, stachans=stachans, ... event_list=event_list) # doctest: +SKIP """ Logger.critical( "Proceed with caution: this function is experimental and somewhat" " stochastic - you should run this multiple times to ensure you get" " a stable result.") # Define maximum number of events, will be the width of K > K_width = max([max(ev_list) for ev_list in event_list]) + 1 E ValueError: max() arg is an empty sequence ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/mag_calc.py:1058: ValueError ------------------------------------------------------------ Captured stdout call ------------------------------------------------------------- 2020-11-07 18:24:30,083 eqcorrscan.utils.mag_calc CRITICAL Proceed with caution: this function is experimental and somewhat stochastic - you should run this multiple times to ensure you get a stable result. -------------------------------------------------------------- Captured log call -------------------------------------------------------------- CRITICAL eqcorrscan.utils.mag_calc:mag_calc.py:1053 Proceed with caution: this function is experimental and somewhat stochastic - you should run this multiple times to ensure you get a stable result. _____________________________________________________ TestCoreMethods.test_set_normxcorr2 _____________________________________________________ self = def test_set_normxcorr2(self): """ Check that correlations output are the same irrespective of version. """ testing_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data') > template = read(os.path.join(testing_path, 'test_template.ms')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/test_template.ms' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/test_template.ms' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/test_template.ms' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError _____________________________________________________ TestSynthData.test_extra_templates ______________________________________________________ self = def test_extra_templates(self): # Test case where there are non-matching streams in the data > test_match_filter(template_excess=True) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:1487: in test_match_filter templates.append(read(os.path.join(testing_path, 'synth_template_0.ms'))) :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError _______________________________________________________ TestSynthData.test_missing_data _______________________________________________________ self = def test_missing_data(self): # Test case where there are non-matching streams in the template > test_match_filter(stream_excess=True) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:1487: in test_match_filter templates.append(read(os.path.join(testing_path, 'synth_template_0.ms'))) :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ____________________________________________________ TestSynthData.test_threshold_methods _____________________________________________________ self = def test_threshold_methods(self): # Test other threshold methods for threshold_type, threshold in [('absolute', 2), ('av_chan_corr', 0.5)]: > kfalse, ktrue = test_match_filter(threshold_type=threshold_type, threshold=threshold) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:1487: in test_match_filter templates.append(read(os.path.join(testing_path, 'synth_template_0.ms'))) :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ______________________________________________________________ test_match_filter ______________________________________________________________ plotvar = False, extract_detections = False, threshold_type = 'MAD', threshold = 10, template_excess = False, stream_excess = False def test_match_filter(plotvar=False, extract_detections=False, threshold_type='MAD', threshold=10, template_excess=False, stream_excess=False): """ Function to test the capabilities of match_filter and just check that \ it is working! Uses synthetic templates and seeded, randomised data. :type samp_rate: float :param samp_rate: Sampling rate in Hz to use """ from eqcorrscan.utils import pre_processing from obspy import UTCDateTime import string import inspect # Read in the synthetic dataset templates = [] testing_path = os.path.join(os.path.dirname(os.path.abspath( inspect.getfile(inspect.currentframe()))), 'test_data', 'synthetic_data') > templates.append(read(os.path.join(testing_path, 'synth_template_0.ms'))) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py:1487: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/synthetic_data/synth_template_0.ms' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError _________________________________________________________ PickerTests.test_cross_net __________________________________________________________ self = def test_cross_net(self): """ Test the WECC style picker """ > st = read(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/picker_test.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError _______________________________________________ MultiStreamMethods.test_multi_event_singlechan ________________________________________________ self = @pytest.mark.mpl_image_compare def test_multi_event_singlechan(self): > _, _, fig = multi_event_singlechan( streams=self.streams, catalog=self.catalog, station="GCSZ", channel="EZ", show=False, return_figure=True) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ streams = [], catalog = , station = 'GCSZ', channel = 'EZ', clip = 10.0 pre_pick = 2.0, freqmin = False, freqmax = False, realign = False, cut = (-3.0, 5.0), PWS = False kwargs = {'return_figure': True, 'show': False} plt = short_cat = , short_streams = [] @additional_docstring(plotting_kwargs=plotting_kwargs) def multi_event_singlechan(streams, catalog, station, channel, clip=10.0, pre_pick=2.0, freqmin=False, freqmax=False, realign=False, cut=(-3.0, 5.0), PWS=False, **kwargs): """ Plot data from a single channel for multiple events. Data will be aligned by their pick-time given in the appropriate picks. Requires an individual stream for each event you want to plot, events are stored in the :class:`obspy.core.event.Catalog` object, and there must be picks present for the streams you wish to plot. Events will be aligned if `realign=True`, in this case the traces will be aligned using the window defined by `cut`. :type streams: list :param streams: List of the :class:`obspy.core.stream.Stream` objects to use, can contain more traces than you plan on plotting (e.g. from more channels) - must be in the same order as events in catalog. :type catalog: obspy.core.event.Catalog :param catalog: Catalog of events, one for each stream. :type station: str :param station: Station to plot. :type channel: str :param channel: Channel to plot. :type clip: float :param clip: Length in seconds to plot, defaults to 10.0 :type pre_pick: float :param pre_pick: Length in seconds to extract and plot before the pick, \ defaults to 2.0 :type freqmin: float :param freqmin: Low cut for bandpass in Hz :type freqmax: float :param freqmax: High cut for bandpass in Hz :type realign: bool :param realign: To compute best alignment based on correlation with the stack or not. :type cut: tuple :param cut: tuple of start and end times for cut in seconds from the \ pick, used for alignment. Will only use this window to align the \ traces. :type PWS: bool :param PWS: compute Phase Weighted Stack, if False, will compute linear \ stack for alignment. {plotting_kwargs} :returns: Aligned and cut :class:`obspy.core.trace.Trace` :rtype: list :returns: New picks in based on alignment (if alignment is performed, if not will return the same as input) :rtype: :class:`obspy.core.event.Catalog` :returns: Figure object for further editing :rtype: :class:`matplotlib.figure.Figure` .. rubric:: Example >>> from obspy import read, Catalog, read_events >>> from obspy.io.nordic.core import readwavename >>> from eqcorrscan.utils.plotting import multi_event_singlechan >>> import glob >>> sfiles = glob.glob('eqcorrscan/tests/test_data/REA/TEST_/*.S??????') >>> catalog = Catalog() >>> streams = [] >>> for sfile in sfiles: ... catalog += read_events(sfile) ... wavfile = readwavename(sfile)[0] ... stream_path = 'eqcorrscan/tests/test_data/WAV/TEST_/' + wavfile ... stream = read(stream_path) ... # Annoying coping with seisan 2 letter channels ... for tr in stream: ... tr.stats.channel = tr.stats.channel[0] + tr.stats.channel[-1] ... streams.append(stream) >>> multi_event_singlechan(streams=streams, catalog=catalog, ... station='GCSZ', channel='EZ') # doctest: +SKIP .. image:: ../../plots/multi_event_singlechan.png """ import matplotlib.pyplot as plt # Work out how many picks we should have... short_cat = Catalog() short_streams = [] for i, event in enumerate(catalog): event_stachans = [(pick.waveform_id.station_code, pick.waveform_id.channel_code) for pick in event.picks] if (station, channel) in event_stachans: short_cat.append(event) short_streams.append(streams[i]) if len(short_cat) == 0: > raise IOError('No picks for ' + station + ' ' + channel) E OSError: No picks for GCSZ EZ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py:708: OSError ___________________________________________ MultiStreamMethods.test_multi_event_singlechan_realign ____________________________________________ self = @pytest.mark.mpl_image_compare def test_multi_event_singlechan_realign(self): > _, _, fig = multi_event_singlechan( streams=self.streams, catalog=self.catalog, station="GCSZ", channel="EZ", show=False, realign=True, freqmin=2, freqmax=20, PWS=True, return_figure=True) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py:55: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ streams = [], catalog = , station = 'GCSZ', channel = 'EZ', clip = 10.0 pre_pick = 2.0, freqmin = 2, freqmax = 20, realign = True, cut = (-3.0, 5.0), PWS = True, kwargs = {'return_figure': True, 'show': False} plt = short_cat = , short_streams = [] @additional_docstring(plotting_kwargs=plotting_kwargs) def multi_event_singlechan(streams, catalog, station, channel, clip=10.0, pre_pick=2.0, freqmin=False, freqmax=False, realign=False, cut=(-3.0, 5.0), PWS=False, **kwargs): """ Plot data from a single channel for multiple events. Data will be aligned by their pick-time given in the appropriate picks. Requires an individual stream for each event you want to plot, events are stored in the :class:`obspy.core.event.Catalog` object, and there must be picks present for the streams you wish to plot. Events will be aligned if `realign=True`, in this case the traces will be aligned using the window defined by `cut`. :type streams: list :param streams: List of the :class:`obspy.core.stream.Stream` objects to use, can contain more traces than you plan on plotting (e.g. from more channels) - must be in the same order as events in catalog. :type catalog: obspy.core.event.Catalog :param catalog: Catalog of events, one for each stream. :type station: str :param station: Station to plot. :type channel: str :param channel: Channel to plot. :type clip: float :param clip: Length in seconds to plot, defaults to 10.0 :type pre_pick: float :param pre_pick: Length in seconds to extract and plot before the pick, \ defaults to 2.0 :type freqmin: float :param freqmin: Low cut for bandpass in Hz :type freqmax: float :param freqmax: High cut for bandpass in Hz :type realign: bool :param realign: To compute best alignment based on correlation with the stack or not. :type cut: tuple :param cut: tuple of start and end times for cut in seconds from the \ pick, used for alignment. Will only use this window to align the \ traces. :type PWS: bool :param PWS: compute Phase Weighted Stack, if False, will compute linear \ stack for alignment. {plotting_kwargs} :returns: Aligned and cut :class:`obspy.core.trace.Trace` :rtype: list :returns: New picks in based on alignment (if alignment is performed, if not will return the same as input) :rtype: :class:`obspy.core.event.Catalog` :returns: Figure object for further editing :rtype: :class:`matplotlib.figure.Figure` .. rubric:: Example >>> from obspy import read, Catalog, read_events >>> from obspy.io.nordic.core import readwavename >>> from eqcorrscan.utils.plotting import multi_event_singlechan >>> import glob >>> sfiles = glob.glob('eqcorrscan/tests/test_data/REA/TEST_/*.S??????') >>> catalog = Catalog() >>> streams = [] >>> for sfile in sfiles: ... catalog += read_events(sfile) ... wavfile = readwavename(sfile)[0] ... stream_path = 'eqcorrscan/tests/test_data/WAV/TEST_/' + wavfile ... stream = read(stream_path) ... # Annoying coping with seisan 2 letter channels ... for tr in stream: ... tr.stats.channel = tr.stats.channel[0] + tr.stats.channel[-1] ... streams.append(stream) >>> multi_event_singlechan(streams=streams, catalog=catalog, ... station='GCSZ', channel='EZ') # doctest: +SKIP .. image:: ../../plots/multi_event_singlechan.png """ import matplotlib.pyplot as plt # Work out how many picks we should have... short_cat = Catalog() short_streams = [] for i, event in enumerate(catalog): event_stachans = [(pick.waveform_id.station_code, pick.waveform_id.channel_code) for pick in event.picks] if (station, channel) in event_stachans: short_cat.append(event) short_streams.append(streams[i]) if len(short_cat) == 0: > raise IOError('No picks for ' + station + ' ' + channel) E OSError: No picks for GCSZ EZ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py:708: OSError ______________________________________________________ TestDataPrep.test_correct_padding ______________________________________________________ self = def test_correct_padding(self): """check that nans are put where they are supposed to be """ _, prepped_streams = _prep_data_for_correlation( > stream=self.stream_list[0], templates=deepcopy(self.stream_list), force_stream_epoch=False) E IndexError: list index out of range ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:359: IndexError ________________________________________________ TestDataPrep.test_duplicate_template_channels ________________________________________________ self = def test_duplicate_template_channels(self): """ Check that duplicate template channels result in duplicate template channels but not stream channels. """ templates = deepcopy(self.stream_list) templates.sort(key=lambda t: t[0].stats.starttime) > stream = deepcopy(self.stream_list[0]) E IndexError: list index out of range ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:377: IndexError _____________________________________________________ TestDataPrep.test_order_irrevelant ______________________________________________________ self = def test_order_irrevelant(self): """ Early on the order of streams input was affecting output. """ > st1 = self.stream_list[0].copy() E IndexError: list index out of range ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py:335: IndexError _____________________________________________________ TestAlignRealData.test_known_align ______________________________________________________ self = def test_known_align(self): """Test alignment with a known outcome.""" > shifts, ccs = align_traces(trace_list=self.trace_list, shift_len=200) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/stacking_test.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ trace_list = [], shift_len = 200, master = False, positive = False, plot = False def align_traces(trace_list, shift_len, master=False, positive=False, plot=False): """ Align traces relative to each other based on their cross-correlation value. Uses the :func:`eqcorrscan.core.match_filter.normxcorr2` function to find the optimum shift to align traces relative to a master event. Either uses a given master to align traces, or uses the trace with the highest MAD amplitude. :type trace_list: list :param trace_list: List of traces to align :type shift_len: int :param shift_len: Length to allow shifting within in samples :type master: obspy.core.trace.Trace :param master: Master trace to align to, if set to False will align to \ the largest amplitude trace (default) :type positive: bool :param positive: Return the maximum positive cross-correlation, or the \ absolute maximum, defaults to False (absolute maximum). :type plot: bool :param plot: If true, will plot each trace aligned with the master. :returns: list of shifts and correlations for best alignment in seconds. :rtype: list """ from eqcorrscan.core.match_filter import normxcorr2 from eqcorrscan.utils.plotting import xcorr_plot traces = deepcopy(trace_list) if not master: # Use trace with largest MAD amplitude as master > master = traces[0] E IndexError: list index out of range ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/stacking.py:127: IndexError _________________________________________________ TestAlignRealData.test_known_align_positive _________________________________________________ self = def test_known_align_positive(self): """Test a known alignment case with forced positive correlation.""" > shifts, ccs = align_traces(trace_list=self.trace_list, shift_len=200, positive=True) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/stacking_test.py:99: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ trace_list = [], shift_len = 200, master = False, positive = True, plot = False def align_traces(trace_list, shift_len, master=False, positive=False, plot=False): """ Align traces relative to each other based on their cross-correlation value. Uses the :func:`eqcorrscan.core.match_filter.normxcorr2` function to find the optimum shift to align traces relative to a master event. Either uses a given master to align traces, or uses the trace with the highest MAD amplitude. :type trace_list: list :param trace_list: List of traces to align :type shift_len: int :param shift_len: Length to allow shifting within in samples :type master: obspy.core.trace.Trace :param master: Master trace to align to, if set to False will align to \ the largest amplitude trace (default) :type positive: bool :param positive: Return the maximum positive cross-correlation, or the \ absolute maximum, defaults to False (absolute maximum). :type plot: bool :param plot: If true, will plot each trace aligned with the master. :returns: list of shifts and correlations for best alignment in seconds. :rtype: list """ from eqcorrscan.core.match_filter import normxcorr2 from eqcorrscan.utils.plotting import xcorr_plot traces = deepcopy(trace_list) if not master: # Use trace with largest MAD amplitude as master > master = traces[0] E IndexError: list index out of range ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/stacking.py:127: IndexError __________________________________________________ SimpleSubspaceMethods.test_energy_capture __________________________________________________ self = def test_energy_capture(self): """Check that the energy capture calc works okay""" path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'Test_detector.h5') > detector = subspace.read_detector(path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:807: in read_detector detector.read(filename=filename) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/Test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError __________________________________________________ SimpleSubspaceMethods.test_partition_fail __________________________________________________ self = def test_partition_fail(self): """Check that partition fails with the expected error.""" path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'Test_detector.h5') > detector = subspace.read_detector(path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py:55: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:807: in read_detector detector.read(filename=filename) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/Test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError _______________________________________________________ SimpleSubspaceMethods.test_read _______________________________________________________ self = def test_read(self): """Test reading from hdf5 file""" detector = subspace.Detector() path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'Test_detector.h5') > detector.read(path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py:24: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/Test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError ____________________________________________________ SimpleSubspaceMethods.test_read_func _____________________________________________________ self = def test_read_func(self): """Check that the read function works too.""" path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'Test_detector.h5') > detector = subspace.read_detector(path) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py:37: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:807: in read_detector detector.read(filename=filename) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/Test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError _______________________________________________________ SimpleSubspaceMethods.test_stat _______________________________________________________ self = def test_stat(self): """Test that the statistic calculation is the same regardless of system.""" detector = subspace.Detector() > detector.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'subspace', 'stat_test_detector.h5')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/subspace/stat_test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError ___________________________________________ SubspaceTestingMethods.test_create_multiplexed_aligned ____________________________________________ self = def test_create_multiplexed_aligned(self): """Test subspace creation - checks that np.dot(U.T, U) is identity.""" templates = copy.deepcopy(self.templates) templates = [template.select(station='TMWZ') for template in templates] # Test a multiplexed version detector = subspace.Detector() detector.construct( streams=templates, lowcut=2, highcut=9, filt_order=4, sampling_rate=20, multiplex=True, name=str('Tester'), align=True, shift_len=3.0, reject=0.2) for u in detector.data: identity = np.dot(u.T, u).astype(np.float16) self.assertTrue(np.allclose( identity, np.diag(np.ones(len(identity), dtype=np.float16)))) > comparison_detector = subspace.read_detector( os.path.join(os.path.abspath( os.path.dirname(__file__)), 'test_data', 'subspace', 'master_detector_multi.h5')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py:211: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:807: in read_detector detector.read(filename=filename) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/subspace/master_detector_multi.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError ------------------------------------------------------------ Captured stdout setup ------------------------------------------------------------ Downloading for event smi:nz.org.geonet/2016p356984 Downloading for event smi:nz.org.geonet/2016p356251 Downloading for event smi:nz.org.geonet/2016p356586 Downloading for event smi:nz.org.geonet/2016p356240 Downloading for event smi:nz.org.geonet/2016p356487 Downloading for event smi:nz.org.geonet/2016p356659 Downloading for event smi:nz.org.geonet/2016p358960 Downloading for event smi:nz.org.geonet/2016p357929 Downloading for event smi:nz.org.geonet/2016p356457 Downloading for event smi:nz.org.geonet/2016p357444 Downloading for event smi:nz.org.geonet/2016p356494 Downloading for event smi:nz.org.geonet/2016p357672 Downloading for event smi:nz.org.geonet/2016p358397 ------------------------------------------------------------ Captured stdout call ------------------------------------------------------------- 2020-11-07 18:29:47,626 eqcorrscan.core.subspace WARNING Will remove stream due to low-correlation ------------------------------------------------------------ Captured stderr call ------------------------------------------------------------- /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:836: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray stack = np.dstack(np.array([stack, tr.data])) -------------------------------------------------------------- Captured log call -------------------------------------------------------------- WARNING eqcorrscan.core.subspace:subspace.py:916 Will remove stream due to low-correlation __________________________________________ SubspaceTestingMethods.test_create_multiplexed_unaligned ___________________________________________ self = def test_create_multiplexed_unaligned(self): """Test subspace creation - checks that np.dot(U.T, U) is identity.""" templates = copy.deepcopy(self.templates) templates = [template.select(station='TMWZ') for template in templates] # Test a multiplexed version detector = subspace.Detector() detector.construct(streams=templates, lowcut=2, highcut=9, filt_order=4, sampling_rate=20, multiplex=True, name=str('Tester'), align=False, shift_len=0) for u in detector.data: identity = np.dot(u.T, u).astype(np.float16) self.assertTrue(np.allclose( identity, np.diag(np.ones(len(identity), dtype=np.float16)))) > comparison_detector = subspace.read_detector( os.path.join(os.path.abspath( os.path.dirname(__file__)), 'test_data', 'subspace', 'master_detector_multi_unaligned.h5')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:807: in read_detector detector.read(filename=filename) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/subspace/master_detector_multi_unaligned.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError ------------------------------------------------------------ Captured stderr call ------------------------------------------------------------- /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:836: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray stack = np.dstack(np.array([stack, tr.data])) __________________________________________ SubspaceTestingMethods.test_create_nonmultiplexed_aligned __________________________________________ self = def test_create_nonmultiplexed_aligned(self): """Test creation of a non-multiplexed detector.""" # Test a non-multiplexed version detector = subspace.Detector() templates = copy.deepcopy(self.templates) templates = [template.select(station='TMWZ') for template in templates] detector.construct(streams=templates, lowcut=2, highcut=9, filt_order=4, sampling_rate=20, multiplex=False, name=str('Tester'), align=True, shift_len=6, reject=0.2) for u in detector.data: identity = np.dot(u.T, u).astype(np.float16) self.assertTrue(np.allclose( identity, np.diag(np.ones(len(identity), dtype=np.float16)))) > comparison_detector = subspace.read_detector( os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'subspace', 'master_detector.h5')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py:248: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:807: in read_detector detector.read(filename=filename) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/subspace/master_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError _________________________________________ SubspaceTestingMethods.test_create_nonmultiplexed_unaligned _________________________________________ self = def test_create_nonmultiplexed_unaligned(self): """Test creation of a non-multiplexed detector.""" # Test a non-multiplexed version detector = subspace.Detector() templates = copy.deepcopy(self.templates) templates = [template.select(station='TMWZ') for template in templates] detector.construct(streams=templates, lowcut=2, highcut=9, filt_order=4, sampling_rate=20, multiplex=False, name=str('Tester'), align=False, shift_len=0) for u in detector.data: identity = np.dot(u.T, u).astype(np.float16) self.assertTrue(np.allclose( identity, np.diag(np.ones(len(identity), dtype=np.float16)))) > comparison_detector = subspace.read_detector( os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data', 'subspace', 'master_detector_unaligned.h5')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:807: in read_detector detector.read(filename=filename) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py:386: in read f = h5py.File(filename, "r") ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:406: in __init__ fid = make_fid(name, mode, userblock_size, ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py:173: in make_fid fid = h5f.open(name, flags, fapl=fapl) h5py/_objects.pyx:54: in h5py._objects.with_phil.wrapper ??? h5py/_objects.pyx:55: in h5py._objects.with_phil.wrapper ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/subspace/master_detector_unaligned.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) h5py/h5f.pyx:88: OSError ________________________________________________ TestTemplateGeneration.test_all_phase_methods ________________________________________________ self = def test_all_phase_methods(self): sfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_data', 'REA', 'TEST_', '01-0411-15L.S201309') > catalog = read_events(sfile) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:184: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read_events ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py:812: in read_events return _generic_reader(pathname_or_url, _read, format=format, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' callback_func = , kwargs = {'format': None} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ________________________________________________ TestTemplateGeneration.test_catalog_grouping _________________________________________________ self = def test_catalog_grouping(self): testing_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'REA', 'TEST_', '*.S??????') catalog = Catalog() sfiles = glob.glob(testing_path) for sfile in sfiles: catalog += read_events(sfile) for process_len, pads in [ (60, [5]), (300, [5, 60]), (3600, [5, 60, 300]), (86400, [5, 60, 300])]: for data_pad in pads: > sub_catalogs = _group_events( catalog=catalog, process_len=process_len, template_length=10, data_pad=data_pad) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/template_gen.py:864: in _group_events sub_catalog = Catalog([catalog[0]]) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , index = 0 def __getitem__(self, index): """ __getitem__ method of the Catalog object. :return: Event objects """ if index == "extra": return self.__dict__[index] if isinstance(index, slice): return self.__class__(events=self.events.__getitem__(index)) else: > return self.events.__getitem__(index) E IndexError: list index out of range ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py:167: IndexError _______________________________________________ TestTemplateGeneration.test_missing_waveform_id _______________________________________________ self = def test_missing_waveform_id(self): testing_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data') quakeml = os.path.join(testing_path, '20130901T041115_missingwavid.xml') > st = read(os.path.join(testing_path, 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:298: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ________________________________________________ TestTemplateGeneration.test_sac_template_gen _________________________________________________ self = def test_sac_template_gen(self): """Test template generation.""" samp_rate = 20 length = 8 for event in ['2014p611252', 'No_head']: test_files = os.path.join(os.path.abspath( os.path.dirname(__file__)), 'test_data', 'SAC', event, '*') # Test with various input types filelist = glob.glob(test_files) streamlist = [read(f) for f in glob.glob(test_files)] > stream = read(test_files) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/SAC/2014p611252/*' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/SAC/2014p611252/*' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): > raise Exception("No file matching file pattern: %s" % pathname) E Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/SAC/2014p611252/* ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:698: Exception ______________________________________________ TestTemplateGeneration.test_tutorial_template_gen ______________________________________________ self = @pytest.mark.network @pytest.mark.flaky(reruns=2) def test_tutorial_template_gen(self): """ Test template generation from tutorial, uses from_client method. Checks that the tutorial generates the templates we expect it to! """ testing_path = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'test_data') mktemplates(plot=False) for template_no in range(4): template = read('tutorial_template_' + str(template_no) + '.ms') > expected_template = read(os.path.join( testing_path, 'tutorial_template_' + str(template_no) + '.ms')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py:66: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/tutorial_template_0.ms' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/tutorial_template_0.ms' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/tutorial_template_0.ms' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ------------------------------------------------------------ Captured stdout call ------------------------------------------------------------- 2020-11-07 18:32:33,508 eqcorrscan.core.template_gen INFO Downloading data 2020-11-07 18:32:33,508 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:32:34,561 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:32:35,493 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:32:36,287 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:32:37,404 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:32:38,308 eqcorrscan.core.template_gen INFO Pre-processing data 2020-11-07 18:32:38,475 eqcorrscan.core.template_gen INFO Working on channel BFZ.HHZ 2020-11-07 18:32:38,475 eqcorrscan.core.template_gen INFO Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,477 eqcorrscan.core.template_gen INFO Working on channel CPWZ.EHZ 2020-11-07 18:32:38,477 eqcorrscan.core.template_gen INFO Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,478 eqcorrscan.core.template_gen INFO Working on channel DVHZ.EHZ 2020-11-07 18:32:38,479 eqcorrscan.core.template_gen INFO Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,480 eqcorrscan.core.template_gen INFO Working on channel HOWZ.EHZ 2020-11-07 18:32:38,480 eqcorrscan.core.template_gen INFO Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,481 eqcorrscan.core.template_gen INFO Working on channel POWZ.EHZ 2020-11-07 18:32:38,482 eqcorrscan.core.template_gen INFO Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,486 eqcorrscan.core.template_gen INFO Working on channel BFZ.HHZ 2020-11-07 18:32:38,486 eqcorrscan.core.template_gen INFO Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,487 eqcorrscan.core.template_gen INFO Working on channel CPWZ.EHZ 2020-11-07 18:32:38,488 eqcorrscan.core.template_gen INFO Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,489 eqcorrscan.core.template_gen INFO Working on channel DVHZ.EHZ 2020-11-07 18:32:38,489 eqcorrscan.core.template_gen INFO Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,491 eqcorrscan.core.template_gen INFO Working on channel HOWZ.EHZ 2020-11-07 18:32:38,491 eqcorrscan.core.template_gen INFO Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,492 eqcorrscan.core.template_gen INFO Working on channel POWZ.EHZ 2020-11-07 18:32:38,493 eqcorrscan.core.template_gen INFO Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,496 eqcorrscan.core.template_gen INFO Working on channel BFZ.HHZ 2020-11-07 18:32:38,497 eqcorrscan.core.template_gen INFO Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,498 eqcorrscan.core.template_gen INFO Working on channel CPWZ.EHZ 2020-11-07 18:32:38,499 eqcorrscan.core.template_gen INFO Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,500 eqcorrscan.core.template_gen INFO Working on channel DVHZ.EHZ 2020-11-07 18:32:38,500 eqcorrscan.core.template_gen INFO Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,502 eqcorrscan.core.template_gen INFO Working on channel HOWZ.EHZ 2020-11-07 18:32:38,502 eqcorrscan.core.template_gen INFO Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,504 eqcorrscan.core.template_gen INFO Working on channel POWZ.EHZ 2020-11-07 18:32:38,504 eqcorrscan.core.template_gen INFO Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:38,506 eqcorrscan.core.template_gen INFO Downloading data 2020-11-07 18:32:38,506 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:32:39,525 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:32:40,455 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:32:41,789 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:32:42,626 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:32:43,590 eqcorrscan.core.template_gen INFO Pre-processing data 2020-11-07 18:32:43,754 eqcorrscan.core.template_gen INFO Working on channel BFZ.HHZ 2020-11-07 18:32:43,754 eqcorrscan.core.template_gen INFO Found Trace NZ.BFZ.10.HHZ | 2016-01-04T02:09:10.978394Z - 2016-01-04T03:09:10.928394Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:43,756 eqcorrscan.core.template_gen INFO Working on channel CPWZ.EHZ 2020-11-07 18:32:43,756 eqcorrscan.core.template_gen INFO Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T02:09:10.978399Z - 2016-01-04T03:09:10.928399Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:43,757 eqcorrscan.core.template_gen INFO Working on channel DVHZ.EHZ 2020-11-07 18:32:43,758 eqcorrscan.core.template_gen INFO Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T02:09:10.978391Z - 2016-01-04T03:09:10.928391Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:43,759 eqcorrscan.core.template_gen INFO Working on channel HOWZ.EHZ 2020-11-07 18:32:43,759 eqcorrscan.core.template_gen INFO Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T02:09:10.978393Z - 2016-01-04T03:09:10.928393Z | 20.0 Hz, 72000 samples 2020-11-07 18:32:43,760 eqcorrscan.core.template_gen INFO Working on channel POWZ.EHZ 2020-11-07 18:32:43,761 eqcorrscan.core.template_gen INFO Found Trace NZ.POWZ.10.EHZ | 2016-01-04T02:09:10.978405Z - 2016-01-04T03:09:10.928405Z | 20.0 Hz, 72000 samples -------------------------------------------------------------- Captured log call -------------------------------------------------------------- INFO eqcorrscan.core.template_gen:template_gen.py:299 Downloading data INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:305 Pre-processing data INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel BFZ.HHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel CPWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel DVHZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel HOWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel POWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel BFZ.HHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel CPWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel DVHZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel HOWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel POWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel BFZ.HHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel CPWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel DVHZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel HOWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel POWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:299 Downloading data INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:305 Pre-processing data INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel BFZ.HHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.BFZ.10.HHZ | 2016-01-04T02:09:10.978394Z - 2016-01-04T03:09:10.928394Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel CPWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T02:09:10.978399Z - 2016-01-04T03:09:10.928399Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel DVHZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T02:09:10.978391Z - 2016-01-04T03:09:10.928391Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel HOWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T02:09:10.978393Z - 2016-01-04T03:09:10.928393Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel POWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.POWZ.10.EHZ | 2016-01-04T02:09:10.978405Z - 2016-01-04T03:09:10.928405Z | 20.0 Hz, 72000 samples ________________________________________________ TestTriggerMethods.test_main_trigger_routine _________________________________________________ self = def test_main_trigger_routine(self): """Test the network_trigger function.""" from eqcorrscan.utils.trigger import network_trigger, TriggerParameters from obspy import read import os testing_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_data', 'WAV', 'TEST_') > st = read(os.path.join(testing_path, '2013-09-01-0410-36.DFDPC_027_00')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/trigger_test.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-36.DFDPC_027_00' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-36.DFDPC_027_00' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-36.DFDPC_027_00' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ________________________________________________ TestTutorialScripts.test_templates_and_match _________________________________________________ self = @pytest.mark.slow def test_templates_and_match(self): """Call the template creation then the matched-filter tests.""" print("Making templates") # Some output for travis to stop it from stalling mktemplates(plot=False) print("Made templates") for template_no in range(4): template = read('tutorial_template_' + str(template_no) + '.ms') > expected_template = read( os.path.join(self.testing_path, 'tutorial_template_' + str(template_no) + '.ms')) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/tutorials_test.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in read ??? ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py:300: in _map_example_filename return func(*args, **kwargs) ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py:212: in read st = _generic_reader(pathname_or_url, _read, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pathname_or_url = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/tutorial_template_0.ms' callback_func = kwargs = {'check_compression': True, 'endtime': None, 'format': None, 'headonly': False, ...} pathname = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/tutorial_template_0.ms' pathnames = [] def _generic_reader(pathname_or_url=None, callback_func=None, **kwargs): if not isinstance(pathname_or_url, (str, native_str)): # not a string - we assume a file-like object try: # first try reading directly generic = callback_func(pathname_or_url, **kwargs) except TypeError: # if this fails, create a temporary file which is read directly # from the file system pathname_or_url.seek(0) with NamedTemporaryFile() as fh: fh.write(pathname_or_url.read()) generic = callback_func(fh.name, **kwargs) return generic elif isinstance(pathname_or_url, bytes) and \ pathname_or_url.strip().startswith(b'<'): # XML string return callback_func(io.BytesIO(pathname_or_url), **kwargs) elif "://" in pathname_or_url[:10]: # URL # extract extension if any suffix = os.path.basename(pathname_or_url).partition('.')[2] or '.tmp' with NamedTemporaryFile(suffix=sanitize_filename(suffix)) as fh: download_to_file(url=pathname_or_url, filename_or_buffer=fh) generic = callback_func(fh.name, **kwargs) return generic else: pathname = pathname_or_url # File name(s) pathnames = sorted(glob.glob(pathname)) if not pathnames: # try to give more specific information why the stream is empty if glob.has_magic(pathname) and not glob.glob(pathname): raise Exception("No file matching file pattern: %s" % pathname) elif not glob.has_magic(pathname) and not os.path.isfile(pathname): > raise IOError(2, "No such file or directory", pathname) E FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/tutorial_template_0.ms' ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py:700: FileNotFoundError ------------------------------------------------------------ Captured stdout call ------------------------------------------------------------- Making templates 2020-11-07 18:36:29,685 eqcorrscan.core.template_gen INFO Downloading data 2020-11-07 18:36:29,686 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:36:30,703 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:36:31,584 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:36:32,593 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:36:33,511 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z 2020-11-07 18:36:34,453 eqcorrscan.core.template_gen INFO Pre-processing data 2020-11-07 18:36:34,628 eqcorrscan.core.template_gen INFO Working on channel BFZ.HHZ 2020-11-07 18:36:34,629 eqcorrscan.core.template_gen INFO Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,631 eqcorrscan.core.template_gen INFO Working on channel CPWZ.EHZ 2020-11-07 18:36:34,631 eqcorrscan.core.template_gen INFO Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,632 eqcorrscan.core.template_gen INFO Working on channel DVHZ.EHZ 2020-11-07 18:36:34,633 eqcorrscan.core.template_gen INFO Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,634 eqcorrscan.core.template_gen INFO Working on channel HOWZ.EHZ 2020-11-07 18:36:34,634 eqcorrscan.core.template_gen INFO Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,636 eqcorrscan.core.template_gen INFO Working on channel POWZ.EHZ 2020-11-07 18:36:34,636 eqcorrscan.core.template_gen INFO Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,640 eqcorrscan.core.template_gen INFO Working on channel BFZ.HHZ 2020-11-07 18:36:34,640 eqcorrscan.core.template_gen INFO Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,642 eqcorrscan.core.template_gen INFO Working on channel CPWZ.EHZ 2020-11-07 18:36:34,642 eqcorrscan.core.template_gen INFO Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,643 eqcorrscan.core.template_gen INFO Working on channel DVHZ.EHZ 2020-11-07 18:36:34,644 eqcorrscan.core.template_gen INFO Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,645 eqcorrscan.core.template_gen INFO Working on channel HOWZ.EHZ 2020-11-07 18:36:34,645 eqcorrscan.core.template_gen INFO Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,647 eqcorrscan.core.template_gen INFO Working on channel POWZ.EHZ 2020-11-07 18:36:34,647 eqcorrscan.core.template_gen INFO Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,651 eqcorrscan.core.template_gen INFO Working on channel BFZ.HHZ 2020-11-07 18:36:34,651 eqcorrscan.core.template_gen INFO Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,652 eqcorrscan.core.template_gen INFO Working on channel CPWZ.EHZ 2020-11-07 18:36:34,652 eqcorrscan.core.template_gen INFO Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,654 eqcorrscan.core.template_gen INFO Working on channel DVHZ.EHZ 2020-11-07 18:36:34,654 eqcorrscan.core.template_gen INFO Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,656 eqcorrscan.core.template_gen INFO Working on channel HOWZ.EHZ 2020-11-07 18:36:34,656 eqcorrscan.core.template_gen INFO Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,658 eqcorrscan.core.template_gen INFO Working on channel POWZ.EHZ 2020-11-07 18:36:34,658 eqcorrscan.core.template_gen INFO Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:34,660 eqcorrscan.core.template_gen INFO Downloading data 2020-11-07 18:36:34,660 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:36:35,852 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:36:36,679 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:36:37,449 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:36:38,195 eqcorrscan.core.template_gen INFO Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z 2020-11-07 18:36:39,071 eqcorrscan.core.template_gen INFO Pre-processing data 2020-11-07 18:36:39,252 eqcorrscan.core.template_gen INFO Working on channel BFZ.HHZ 2020-11-07 18:36:39,252 eqcorrscan.core.template_gen INFO Found Trace NZ.BFZ.10.HHZ | 2016-01-04T02:09:10.978394Z - 2016-01-04T03:09:10.928394Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:39,254 eqcorrscan.core.template_gen INFO Working on channel CPWZ.EHZ 2020-11-07 18:36:39,254 eqcorrscan.core.template_gen INFO Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T02:09:10.978399Z - 2016-01-04T03:09:10.928399Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:39,256 eqcorrscan.core.template_gen INFO Working on channel DVHZ.EHZ 2020-11-07 18:36:39,256 eqcorrscan.core.template_gen INFO Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T02:09:10.978391Z - 2016-01-04T03:09:10.928391Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:39,258 eqcorrscan.core.template_gen INFO Working on channel HOWZ.EHZ 2020-11-07 18:36:39,258 eqcorrscan.core.template_gen INFO Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T02:09:10.978393Z - 2016-01-04T03:09:10.928393Z | 20.0 Hz, 72000 samples 2020-11-07 18:36:39,260 eqcorrscan.core.template_gen INFO Working on channel POWZ.EHZ 2020-11-07 18:36:39,260 eqcorrscan.core.template_gen INFO Found Trace NZ.POWZ.10.EHZ | 2016-01-04T02:09:10.978405Z - 2016-01-04T03:09:10.928405Z | 20.0 Hz, 72000 samples Made templates ------------------------------------------------------------ Captured stderr call ------------------------------------------------------------- /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/io/mseed/core.py:790: UserWarning: The encoding specified in trace.stats.mseed.encoding does not match the dtype of the data. A suitable encoding will be chosen. warnings.warn(msg, UserWarning) -------------------------------------------------------------- Captured log call -------------------------------------------------------------- INFO eqcorrscan.core.template_gen:template_gen.py:299 Downloading data INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T00:06:25.207778Z end-time: 2016-01-04T01:06:25.207778Z INFO eqcorrscan.core.template_gen:template_gen.py:305 Pre-processing data INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel BFZ.HHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel CPWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel DVHZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel HOWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel POWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel BFZ.HHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel CPWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel DVHZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel HOWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel POWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel BFZ.HHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.BFZ.10.HHZ | 2016-01-04T00:06:25.208396Z - 2016-01-04T01:06:25.158396Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel CPWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T00:06:25.208305Z - 2016-01-04T01:06:25.158305Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel DVHZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T00:06:25.208478Z - 2016-01-04T01:06:25.158478Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel HOWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T00:06:25.208282Z - 2016-01-04T01:06:25.158282Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel POWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.POWZ.10.EHZ | 2016-01-04T00:06:25.208216Z - 2016-01-04T01:06:25.158216Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:299 Downloading data INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:538 Downloading for start-time: 2016-01-04T02:09:10.982979Z end-time: 2016-01-04T03:09:10.982979Z INFO eqcorrscan.core.template_gen:template_gen.py:305 Pre-processing data INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel BFZ.HHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.BFZ.10.HHZ | 2016-01-04T02:09:10.978394Z - 2016-01-04T03:09:10.928394Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel CPWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.CPWZ.10.EHZ | 2016-01-04T02:09:10.978399Z - 2016-01-04T03:09:10.928399Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel DVHZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.DVHZ.10.EHZ | 2016-01-04T02:09:10.978391Z - 2016-01-04T03:09:10.928391Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel HOWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.HOWZ.10.EHZ | 2016-01-04T02:09:10.978393Z - 2016-01-04T03:09:10.928393Z | 20.0 Hz, 72000 samples INFO eqcorrscan.core.template_gen:template_gen.py:773 Working on channel POWZ.EHZ INFO eqcorrscan.core.template_gen:template_gen.py:777 Found Trace NZ.POWZ.10.EHZ | 2016-01-04T02:09:10.978405Z - 2016-01-04T03:09:10.928405Z | 20.0 Hz, 72000 samples ______________________________________________ [doctest] eqcorrscan.utils.archive_read.read_data ______________________________________________ 074 .. rubric:: Example, local day-volumes 075 076 >>> # Get the path to the test data 077 >>> import eqcorrscan 078 >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' 079 >>> t1 = UTCDateTime(2012, 3, 26) 080 >>> stachans = [('WHYM', 'SHZ'), ('EORO', 'SHZ')] 081 >>> st = read_data(TEST_PATH + '/day_vols', 'day_vols', 082 ... t1, stachans) 083 >>> print(st) Expected: 2 Trace(s) in Stream: AF.WHYM..SHZ | 2012-03-26T00:00:00.000000Z - 2012-03-26T23:59:59.000000Z | 1.0 Hz, 86400 samples AF.EORO..SHZ | 2012-03-26T00:00:00.000000Z - 2012-03-26T23:59:59.000000Z | 1.0 Hz, 86400 samples Got: 0 Trace(s) in Stream: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/archive_read.py:83: DocTestFailure -------------------------------------------------------------- Captured log call -------------------------------------------------------------- WARNING eqcorrscan.utils.archive_read:archive_read.py:112 GCSZ HHZ is not available for 2012/03/26 WARNING eqcorrscan.utils.archive_read:archive_read.py:112 WHYM SHZ is not available for 2012/03/26 WARNING eqcorrscan.utils.archive_read:archive_read.py:112 EORO SHZ is not available for 2012/03/26 _____________________________________________ [doctest] eqcorrscan.utils.catalog_to_dd.read_phase _____________________________________________ 703 704 :returns: Catalog of events from file. 705 :rtype: :class:`obspy.core.event.Catalog` 706 707 >>> from obspy.core.event.catalog import Catalog 708 >>> # Get the path to the test data 709 >>> import eqcorrscan 710 >>> import os 711 >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' 712 >>> catalog = read_phase(TEST_PATH + '/tunnel.phase') UNEXPECTED EXCEPTION: FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/catalog_to_dd.py", line 717, in read_phase f = open(ph_file, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/tunnel.phase' /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/catalog_to_dd.py:712: UnexpectedException __________________________________________ [doctest] eqcorrscan.utils.clustering.extract_detections ___________________________________________ 588 ... no_chans=2, chans=['WHYM', 'EORO'], detect_val=2, threshold=1.2, 589 ... typeofdet='corr', threshold_type='MAD', threshold_input=8.0), 590 ... Detection( 591 ... template_name='temp2', detect_time=UTCDateTime(2012, 3, 26, 18, 5), 592 ... no_chans=2, chans=['WHYM', 'EORO'], detect_val=2, threshold=1.2, 593 ... typeofdet='corr', threshold_type='MAD', threshold_input=8.0)] 594 >>> archive = os.path.join(TEST_PATH, 'day_vols') 595 >>> template_files = [os.path.join(TEST_PATH, 'temp1.ms'), 596 ... os.path.join(TEST_PATH, 'temp2.ms')] 597 >>> templates = [('temp' + str(i), read(filename)) UNEXPECTED EXCEPTION: FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "", line 1, in File "", line 2, in read File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py", line 300, in _map_example_filename return func(*args, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py", line 212, in read st = _generic_reader(pathname_or_url, _read, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py", line 700, in _generic_reader raise IOError(2, "No such file or directory", pathname) FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/temp1.ms' /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py:597: UnexpectedException _____________________________________________ [doctest] eqcorrscan.utils.clustering.re_thresh_csv _____________________________________________ 1064 1065 .. rubric:: Example 1066 1067 >>> from eqcorrscan.utils.clustering import re_thresh_csv 1068 >>> # Get the path to the test data 1069 >>> import eqcorrscan 1070 >>> import os 1071 >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' 1072 >>> det_file = os.path.join(TEST_PATH, 'expected_tutorial_detections.txt') 1073 >>> detections = re_thresh_csv(path=det_file, old_thresh=8, new_thresh=10, UNEXPECTED EXCEPTION: FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py", line 1086, in re_thresh_csv old_detections = read_detections(path) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/detection.py", line 450, in read_detections with open(fname, "rb") as _f: FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/expected_tutorial_detections.txt' /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py:1073: UnexpectedException -------------------------------------------------------------- Captured log call -------------------------------------------------------------- WARNING eqcorrscan.utils.clustering:clustering.py:1084 Legacy function, please use eqcorrscan.core.match_filter.Party.rethreshold. ______________________________________________ [doctest] eqcorrscan.utils.mag_calc.calc_b_value _______________________________________________ 131 >>> from obspy import UTCDateTime 132 >>> from eqcorrscan.utils.mag_calc import calc_b_value 133 >>> client = Client('IRIS') 134 >>> t1 = UTCDateTime('2012-03-26T00:00:00') 135 >>> t2 = t1 + (3 * 86400) 136 >>> catalog = client.get_events(starttime=t1, endtime=t2, minmagnitude=3) 137 >>> magnitudes = [event.magnitudes[0].mag for event in catalog] 138 >>> b_values = calc_b_value(magnitudes, completeness=np.arange(3, 7, 0.2), 139 ... plotvar=False) 140 >>> round(b_values[4][1]) Expected: 1.0 Got: 1 /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/mag_calc.py:140: DocTestFailure -------------------------------------------------------------- Captured log call -------------------------------------------------------------- WARNING eqcorrscan.utils.mag_calc:mag_calc.py:175 Not computing completeness above 5.4, fewer than 4 events ___________________________________________ [doctest] eqcorrscan.utils.plotting.detection_multiplot ___________________________________________ 906 >>> # Get the path to the test data 907 >>> import eqcorrscan 908 >>> import os 909 >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' 910 >>> 911 >>> test_file = os.path.join(TEST_PATH, 'REA', 912 ... 'TEST_', '01-0411-15L.S201309') 913 >>> test_wavefile = os.path.join( 914 ... TEST_PATH, 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00') 915 >>> event = read_events(test_file)[0] UNEXPECTED EXCEPTION: FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "", line 2, in read_events File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py", line 300, in _map_example_filename return func(*args, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py", line 812, in read_events return _generic_reader(pathname_or_url, _read, format=format, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py", line 700, in _generic_reader raise IOError(2, "No such file or directory", pathname) FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py:915: UnexpectedException __________________________________________ [doctest] eqcorrscan.utils.plotting.pretty_template_plot ___________________________________________ 1329 >>> # Get the path to the test data 1330 >>> import eqcorrscan 1331 >>> import os 1332 >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' 1333 >>> 1334 >>> test_file = os.path.join(TEST_PATH, 'REA', 'TEST_', 1335 ... '01-0411-15L.S201309') 1336 >>> test_wavefile = os.path.join( 1337 ... TEST_PATH, 'WAV', 'TEST_', '2013-09-01-0410-35.DFDPC_024_00') 1338 >>> event = read_events(test_file)[0] UNEXPECTED EXCEPTION: FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "", line 2, in read_events File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py", line 300, in _map_example_filename return func(*args, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/event/catalog.py", line 812, in read_events return _generic_reader(pathname_or_url, _read, format=format, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py", line 700, in _generic_reader raise IOError(2, "No such file or directory", pathname) FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/REA/TEST_/01-0411-15L.S201309' /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py:1338: UnexpectedException _________________________________________ [doctest] eqcorrscan.utils.plotting.subspace_detector_plot __________________________________________ 2063 2064 :returns: Figure 2065 :rtype: matplotlib.pyplot.Figure 2066 2067 .. rubric:: Example 2068 2069 >>> from eqcorrscan.core import subspace 2070 >>> import os 2071 >>> detector = subspace.Detector() 2072 >>> detector.read(os.path.join( UNEXPECTED EXCEPTION: OSError("Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/../tests/test_data/subspace/stat_test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)") Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py", line 386, in read f = h5py.File(filename, "r") File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py", line 406, in __init__ fid = make_fid(name, mode, userblock_size, File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py", line 173, in make_fid fid = h5f.open(name, flags, fapl=fapl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5f.pyx", line 88, in h5py.h5f.open OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/../tests/test_data/subspace/stat_test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py:2072: UnexpectedException ____________________________________________ [doctest] eqcorrscan.utils.plotting.subspace_fc_plot _____________________________________________ 2149 2150 :returns: Figure 2151 :rtype: matplotlib.pyplot.Figure 2152 2153 .. rubric:: Example 2154 2155 >>> from eqcorrscan.core import subspace 2156 >>> import os 2157 >>> detector = subspace.Detector() 2158 >>> detector.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), UNEXPECTED EXCEPTION: OSError("Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/../tests/test_data/subspace/stat_test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)") Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/subspace.py", line 386, in read f = h5py.File(filename, "r") File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py", line 406, in __init__ fid = make_fid(name, mode, userblock_size, File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/h5py/_hl/files.py", line 173, in make_fid fid = h5f.open(name, flags, fapl=fapl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5f.pyx", line 88, in h5py.h5f.open OSError: Unable to open file (unable to open file: name = '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/../tests/test_data/subspace/stat_test_detector.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py:2158: UnexpectedException __________________________________________ [doctest] eqcorrscan.utils.pre_processing._check_daylong ___________________________________________ 039 040 .. rubric:: Example 041 042 >>> from obspy import read 043 >>> from eqcorrscan.utils.pre_processing import _check_daylong 044 >>> # Get the path to the test data 045 >>> import eqcorrscan 046 >>> import os 047 >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' 048 >>> st = read(TEST_PATH + '/WAV/TEST_/' + UNEXPECTED EXCEPTION: FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "", line 2, in read File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py", line 300, in _map_example_filename return func(*args, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py", line 212, in read st = _generic_reader(pathname_or_url, _read, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py", line 700, in _generic_reader raise IOError(2, "No such file or directory", pathname) FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/pre_processing.py:48: UnexpectedException _____________________________________________ [doctest] eqcorrscan.utils.pre_processing.shortproc _____________________________________________ 132 133 .. rubric:: Example, bandpass 134 135 >>> from obspy import read 136 >>> from eqcorrscan.utils.pre_processing import shortproc 137 >>> # Get the path to the test data 138 >>> import eqcorrscan 139 >>> import os 140 >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' 141 >>> st = read(TEST_PATH + '/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00') UNEXPECTED EXCEPTION: FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "", line 2, in read File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py", line 300, in _map_example_filename return func(*args, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py", line 212, in read st = _generic_reader(pathname_or_url, _read, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py", line 700, in _generic_reader raise IOError(2, "No such file or directory", pathname) FileNotFoundError: [Errno 2] No such file or directory: '/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/WAV/TEST_/2013-09-01-0410-35.DFDPC_024_00' /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/pre_processing.py:141: UnexpectedException _______________________________________________ [doctest] eqcorrscan.utils.sac_util.sactoevent ________________________________________________ 058 stream - to ensure this works as you expect, please populate the 059 evla, evlo, evdp and nzyear, nzjday, nzhour, nzmin, nzsec, nzmsec 060 for all traces with the same values. 061 062 >>> from obspy import read 063 >>> # Get the path to the test data 064 >>> import eqcorrscan 065 >>> import os 066 >>> TEST_PATH = os.path.dirname(eqcorrscan.__file__) + '/tests/test_data' 067 >>> st = read(TEST_PATH + '/SAC/2014p611252/*') UNEXPECTED EXCEPTION: Exception('No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/SAC/2014p611252/*') Traceback (most recent call last): File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in File "", line 2, in read File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/decorator.py", line 300, in _map_example_filename return func(*args, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/stream.py", line 212, in read st = _generic_reader(pathname_or_url, _read, **kwargs) File "/Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/obspy/core/util/base.py", line 698, in _generic_reader raise Exception("No file matching file pattern: %s" % pathname) Exception: No file matching file pattern: /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/test_data/SAC/2014p611252/* /Users/darrentpk/opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/sac_util.py:67: UnexpectedException ---------- coverage: platform darwin, python 3.8.6-final-0 ----------- Name Stmts Miss Cover ------------------------------------------------------------------------------------------------------------------------------- /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/conftest.py 50 50 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/lag_calc.py 199 199 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/match_filter/detection.py 201 201 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/match_filter/family.py 183 183 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/match_filter/helpers.py 202 202 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/match_filter/matched_filter.py 215 215 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/match_filter/party.py 271 271 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/match_filter/template.py 150 150 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/match_filter/tribe.py 293 293 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/subspace.py 401 401 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/core/template_gen.py 331 331 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/helpers/mock_logger.py 16 16 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/tutorials/lag_calc.py 58 58 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/tutorials/match_filter.py 65 65 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/tutorials/subspace.py 51 51 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/tutorials/template_creation.py 35 35 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/archive_read.py 71 71 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/catalog_to_dd.py 351 351 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/catalog_utils.py 91 91 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/clustering.py 437 437 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/correlate.py 390 390 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/despike.py 69 69 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/findpeaks.py 248 248 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/libnames.py 35 35 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/mag_calc.py 436 436 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/picker.py 79 79 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/plotting.py 911 911 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/pre_processing.py 316 316 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/sac_util.py 65 65 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/stacking.py 67 67 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/synth_seis.py 135 135 0% /Users/darrentpk/opt/anaconda3/lib/python3.7/site-packages/eqcorrscan/utils/trigger.py 133 133 0% ------------------------------------------------------------------------------------------------------------------------------- TOTAL 6555 6555 0% =========================================================== short test summary info =========================================================== FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/template_gen.py::eqcorrscan.core.template_gen.template_gen FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py::eqcorrscan.core.match_filter.party.Party.decluster FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py::eqcorrscan.core.match_filter.party.Party.get_catalog FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py::eqcorrscan.core.match_filter.party.Party.min_chans FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py::eqcorrscan.core.match_filter.party.Party.read FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py::eqcorrscan.core.match_filter.party.Party.rethreshold FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/party.py::eqcorrscan.core.match_filter.party.Party.write FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/template.py::eqcorrscan.core.match_filter.template.Template.__eq__ FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/core/match_filter/template.py::eqcorrscan.core.match_filter.template.Template.construct FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/catalog_to_dd_test.py::TestCatalogMethods::test_read_phase FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/catalog_to_dd_test.py::TestCatalogMethods::test_write_phase FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/catalog_to_dd_test.py::TestCatalogMethods::test_write_station FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py::ClusteringTests::test_corr_cluster FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py::ClusteringTests::test_distance_matrix FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py::ClusteringTests::test_known_coherence FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py::ClusteringTests::test_unclustered FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py::EfficientClustering::test_clustered FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py::ClusteringTestWarnings::test_delay_grouping FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/clustering_test.py::ClusteringTestWarnings::test_empirical_svd FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/mag_calc_test.py::TestMagCalcMethods::test_SVD_mag - Va... FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestCoreMethods::test_set_normxcorr2 FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestSynthData::test_extra_templates FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestSynthData::test_missing_data FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestSynthData::test_threshold_methods FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::test_match_filter - FileNotFoundE... FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/picker_test.py::PickerTests::test_cross_net - FileNotFo... FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::MultiStreamMethods::test_multi_event_singlechan FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::MultiStreamMethods::test_multi_event_singlechan_realign FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestDataPrep::test_correct_padding FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestDataPrep::test_duplicate_template_channels FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestDataPrep::test_order_irrevelant FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/stacking_test.py::TestAlignRealData::test_known_align FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/stacking_test.py::TestAlignRealData::test_known_align_positive FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py::SimpleSubspaceMethods::test_energy_capture FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py::SimpleSubspaceMethods::test_partition_fail FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py::SimpleSubspaceMethods::test_read - OS... FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py::SimpleSubspaceMethods::test_read_func FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py::SimpleSubspaceMethods::test_stat - OS... FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py::SubspaceTestingMethods::test_create_multiplexed_aligned FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py::SubspaceTestingMethods::test_create_multiplexed_unaligned FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py::SubspaceTestingMethods::test_create_nonmultiplexed_aligned FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/subspace_test.py::SubspaceTestingMethods::test_create_nonmultiplexed_unaligned FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestTemplateGeneration::test_all_phase_methods FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestTemplateGeneration::test_catalog_grouping FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestTemplateGeneration::test_missing_waveform_id FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestTemplateGeneration::test_sac_template_gen FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestTemplateGeneration::test_tutorial_template_gen FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/trigger_test.py::TestTriggerMethods::test_main_trigger_routine FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/tutorials_test.py::TestTutorialScripts::test_templates_and_match FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/archive_read.py::eqcorrscan.utils.archive_read.read_data FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/catalog_to_dd.py::eqcorrscan.utils.catalog_to_dd.read_phase FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py::eqcorrscan.utils.clustering.extract_detections FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/clustering.py::eqcorrscan.utils.clustering.re_thresh_csv FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/mag_calc.py::eqcorrscan.utils.mag_calc.calc_b_value FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py::eqcorrscan.utils.plotting.detection_multiplot FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py::eqcorrscan.utils.plotting.pretty_template_plot FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py::eqcorrscan.utils.plotting.subspace_detector_plot FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/plotting.py::eqcorrscan.utils.plotting.subspace_fc_plot FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/pre_processing.py::eqcorrscan.utils.pre_processing._check_daylong FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/pre_processing.py::eqcorrscan.utils.pre_processing.shortproc FAILED ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/utils/sac_util.py::eqcorrscan.utils.sac_util.sactoevent ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/despike_test.py::DespikeTesting::test_median_filter - Fi... ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/despike_test.py::DespikeTesting::test_template_remove - ... ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_client_detect ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_client_detect_save_progress ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_day_long_methods ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_family_lag_calc ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_party_lag_calc ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_party_lag_calc_empty_families ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_party_lag_calc_missing_data ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_party_lag_calc_preprocessed ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_party_lag_calc_short_data ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_template_construct_not_implemented ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_template_detect ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_tribe_detect ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_tribe_detect_masked_data ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_tribe_detect_no_processing ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_tribe_detect_parallel_process ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_tribe_detect_save_progress ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectHeavy::test_tribe_detect_short_data ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_detection_regenerate_event ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_family_addition ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_family_catalogs ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_family_equality ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_family_init ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_family_io ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_family_methods ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_family_slicing ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_family_sort ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_add ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_basic_methods ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_decluster ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_decluster_same_times ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_io ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_io_list ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_io_no_catalog_reading ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_io_no_catalog_writing ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_io_wildcards ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_plot_grouped ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_plot_grouped_rate ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_plot_individual ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_rethreshold ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_party_write_csv ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_slicing_by_name ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_template_io ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_template_printing ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_tribe_add ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_tribe_internal_methods ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_tribe_io_qml ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_tribe_io_sc3ml ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/match_filter_test.py::TestMatchObjectLight::test_tribe_remove ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::EventPlottingMethods::test_detection_multiplot ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::EventPlottingMethods::test_plot_repicked ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::EventPlottingMethods::test_pretty_template_plot ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::EventPlottingMethods::test_pretty_template_plot_basic ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::EventPlottingMethods::test_pretty_template_plot_sort ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::EventPlottingMethods::test_pretty_template_plot_sort_by_picktime ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::MultiStreamPlottingMethods::test_subspace_detector_plot ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::MultiStreamPlottingMethods::test_subspace_fc_plot ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/plotting_test.py::MultiStreamPlottingMethods::test_svd_plot ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_daylong_checks ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_dayproc ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_dayproc_nyquist_error ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_dayproc_parallel_cores_unset ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_dayproc_serial ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_dayproc_trace ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_filter_error ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_gap_overlength ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_highcut_debug ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_lowcut_debug ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_masked_array_resample ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_masked_trace ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_masked_trace_no_fill ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_parallel ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_parallel_core_unset ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_process ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_process_bad_data ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_process_datetime ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_process_nyquist_fail ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_short_data_empty_return ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_short_data_fail ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_short_data_pass ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_shortproc ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_shortproc_set_end ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_shortproc_set_start ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_shortproc_set_start_and_end ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/pre_processing_test.py::TestPreProcessing::test_trace_as_argument ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_extract_from_stack ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_extract_from_stack_and_process ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_extract_from_stack_including_z ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_misc - FileNotFo... ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_missing_data - F... ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_no_channel_code ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_no_data_for_channel ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_no_matched_picks ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_no_station_code ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_snr_cutoff - Fil... ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_swin_P - FileNot... ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_swin_all_and_all_horiz ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_triggered_data ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_undefined_phase_type ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_warn_no_phase_hint ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestEdgeGen::test_warn_zeros - Fil... ERROR ../opt/anaconda3/envs/eqcorrscan/lib/python3.8/site-packages/eqcorrscan/tests/template_gen_test.py::TestDayLong::test_day_long_processing =========================================== 61 failed, 260 passed, 103 errors in 1447.76s (0:24:07) =========================================== Failed tests