Coder Social home page Coder Social logo

mess's Introduction

MESS

MESS is a matched filter earthquake detector

  • MESS Workflow
  1. Match: calculate CC trace on every station (matched filter)
  2. Expand: expand peak values on CC traces
  3. Shift: time shift to origin times for all CC traces
  4. Stack: stack CC traces of different stations & detect events on the stacked trace
  5. dt_p and dt_s are picked by cross-correlation
    Zhou et al., (2021)
  • Usage (see example_mess_workdir)
  1. Prepare template phase file (e.g. run PAL) & cut template waveform
  2. Run MESS
  • Tutorials
    2021/10 Online training in Chinese: vedio recording on KouShare
    2022/08 Online training in Chinese: vedio recording on KouShare

Installation

MESS is a set of codes. All you need is to setup proper Python environment. This can be accomplished easily by installing Anaconda, Obspy, and Pytorch sequentially. Or you can use the env/mess.yml file with conda.

References

  • Zhou, Y., H. Yue, S. Zhou, L. Fang, Y. Zhou, L. Xu, Z. Liu, T. Wang, L. Zhao, & A. Ghosh (2022). Microseismicity along Xiaojiang Fault Zone (Southeastern Tibetan Plateau) and the Characterization of Interseismic Fault Behavior. Tectonophysics; 833: 229364. doi: 10.1016/j.tecto.2022.229364

  • Zhou, Y., H. Yue, L. Fang, S. Zhou, L. Zhao, & A. Ghosh (2021). An Earthquake Detection and Location Architecture for Continuous Seismograms: Phase Picking, Association, Location, and Matched Filter (PALM). Seismological Research Letters; 93(1): 413โ€“425. doi: 10.1785/0220210111

  • Zhou, Y., A. Ghosh, L. Fang, H. Yue, S. Zhou, & Y. Su (2021). A High-Resolution Seismic Catalog for the 2021 MS6.4/Mw6.1 YangBi Earthquake Sequence, Yunnan, China: Application of AI picker and Matched Filter. Earthquake Science; 34(5): 390-398.doi: 10.29382/eqs-2021-0031

  • Lu, W., Y. Zhou, Z. Zhao, H. Yue, & S. Zhou (2021). Aftershock sequence of the 2017 Mw 6.5 Jiuzhaigou, China earthquake monitored by an AsA network and its implication to fault structures and strength. Geophysical Journal International; 228(3): 1763-1779. doi: 10.1093/gji/ggab443

mess's People

Contributors

yijianzhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mess's Issues

ValueError: Caught ValueError in DataLoader worker process 0

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.