yijianzhou / mess Goto Github PK
View Code? Open in Web Editor NEWMatched filter earthquake detector
Matched filter earthquake detector
Hi Yijian,
Thanks for sharing the codes, PAL and MESS, and the user guide and video are helpful.
I try to follow your user guide to run MESS, but an error occurred in cutting templates, cut_template_eg.py.
I trace the error and the problem lies in line 150 in cut_template_tensor.py.
for i, data_paths_i in enumerate(dataloader):
print(1)
data_paths += data_paths_i
if i%10==0: print('%s/%s sta-date pairs done/total'%(i+1,len(dataset)))
The error is also listed below.
runfile('/home/yu.jiang/Program/122PAL/example_mess_workdir/cut_template_eg.py', wdir='/home/yu.jiang/Program/122PAL/example_mess_workdir')
0/2828 events done/total
1000/2828 events done/total
2000/2828 events done/total
reading CI.CCC 2019-07-04
reading CI.JRC2 2019-07-04
reading CI.WBM 2019-07-04
reading CI.SLA 2019-07-04
reading CI.LRL 2019-07-04
reading CI.CLC 2019-07-04
reading CI.MPM 2019-07-04
reading CI.SRT 2019-07-04
reading CI.TOW2 2019-07-04
<enumerate object at 0x7fa2818c5b80>
Traceback (most recent call last):
File "/home/yu.jiang/Program/122PAL/cut_template_intense.py", line 151, in <module>
for i, data_paths_i in enumerate(dataloader):
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 681, in __next__
data = self._next_data()
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1376, in _next_data
return self._process_data(data)
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1402, in _process_data
data.reraise()
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/scipy/signal/windows/_windows.py", line 2214, in get_window
beta = float(window)
ValueError: could not convert string to float: 'hanning'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/scipy/signal/windows/_windows.py", line 2232, in get_window
winfunc = _win_equiv[winstr]
KeyError: 'hanning'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = self.dataset[possibly_batched_index]
File "/home/yu.jiang/Program/122PAL/cut_template_intense.py", line 105, in __getitem__
stream = preprocess(stream)
File "/home/yu.jiang/Program/122PAL/dataset_gpu.py", line 184, in preprocess
if org_rate!=samp_rate: st.resample(samp_rate)
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/obspy/core/stream.py", line 2335, in resample
tr.resample(sampling_rate, window=native_str(window),
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/obspy/core/util/decorator.py", line 245, in skip_if_no_data
return func(*args, **kwargs)
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/obspy/core/trace.py", line 273, in _add_processing_info
result = func(*args, **kwargs)
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/obspy/core/trace.py", line 1733, in resample
large_w = np.fft.ifftshift(get_window(native_str(window),
File "/home/yu.jiang/.conda/envs/obspy/lib/python3.8/site-packages/scipy/signal/windows/_windows.py", line 2234, in get_window
raise ValueError("Unknown window type.") from e
ValueError: Unknown window type.
Note that, enumerate(dataloader) seems okay, which returns
reading CI.CCC 2019-07-04
reading CI.JRC2 2019-07-04
reading CI.WBM 2019-07-04
reading CI.SLA 2019-07-04
reading CI.LRL 2019-07-04
reading CI.CLC 2019-07-04
reading CI.MPM 2019-07-04
reading CI.SRT 2019-07-04
reading CI.TOW2 2019-07-04
Could you help me to figure out what happened? Many thanks for your help.
Kind regards,
Yu
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.