Skip to content

Preparation code for synthetic seismic data traces, that mimic real ones

License

Notifications You must be signed in to change notification settings

ABlaer/prepCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copyright (c) 2022 by Almog Blaer


                                    ╋╋╋╋╋╋╋╋╋╋╋┏━━━┓╋╋╋╋┏┓
                                    ╋╋╋╋╋╋╋╋╋╋╋┃┏━┓┃╋╋╋╋┃┃
                                    ┏━━┳━┳━━┳━━┫┃╋┗╋━━┳━┛┣━━┓
                                    ┃┏┓┃┏┫┃━┫┏┓┃┃╋┏┫┏┓┃┏┓┃┃━┫
                                    ┃┗┛┃┃┃┃━┫┗┛┃┗━┛┃┗┛┃┗┛┃┃━┫
                                    ┃┏━┻┛┗━━┫┏━┻━━━┻━━┻━━┻━━┛
                                    ┃┃╋╋╋╋╋╋┃┃
                                    ┗┛╋╋╋╋╋╋┗┛

prepCode

🏔️ Preparation code for synthetic seismic data traces, that mimics real ones 🌎

prepCode (preparation Code) is required to convert the model products (the synthetic seismograms) to a format that corresponds to the processing process recorded in the alarm algorithm. The raw synthetic seismograms are calculated by the finite-difference software, in velocity units, the sampling rate is dictated by the simulation domain, does not include background noise, with a format that is not suitable for the Earthquake Early Warning (EEW) system replay. In real-time, the early warning system algorithm calculates the signal-to-noise ratio between the long time window and the short time window, STA/LTA1. If the short window measurement station is 20 times larger than the long time window, a signal is detected from the event. The Israeli's EEW algorithm (EPIC) algorithm uses the maximum amplitude spans in all-time windows from the identification to filter for incorrect events that may be identified as earthquake events. Because there is no noise in the raw synthetic seismograms we will use these directories from the alarm algorithm to identify the estimated P waves before the recorded processing. PrepCode is aimed to mimic real seismic data traces. The code input is synthetic raw velocity seismogram (raw data) in SAC format. Preclude output is converted to a Mini-SEED (MSEED) format, own Stream of Integers, contains all the traces, ready to be replayed in EPIC. PrepCode uses EPIC minimum velocity amplitude check (equation), for determining the estimated P arrival for the station.

The default amplitude check: equation2.

The main code steps:

  • reading raw data traces, with partial sample rate.
  • the raw data is converted to acceleration (m/sec**2) and resampled to whole numbers (40 Hz as default)
  • first white noise adding, 110dB (relative to acceleration) and 120 sec long
  • second white noise adding, before P arrival
  • the re-processed seismogram's are multiplayed by gain factor (1e7 default)
  • the final prepCode valuus are seismic acceleration data traces, with stream of integers units (Counts).

Setup

    • clone the prepCode repository
    • install the dependencies:
      • numpy
      • matplotlib
      • obspy
      • pandas
      • glob
    • make sure you got the right stations.d file, contains the columns: lat, lon and station name
    • before running the code, update the channels file in the early warning algorithm to m/sec**2 units
  1. when invoking prepCode through command-line , you may specify any of these options:
    
    usage: prepCode.py [-h] [-m MAG] [-d DEPTH] [-t LAT] [-n LON]
    
    Preparation code for synthetic data traces, that mimics real ones
    
    options:
    -h, --help            show this help message and exit
    -m MAG, --mag MAG     Synthetic event magnitude; default = 6.5 Mw
    -d DEPTH, --depth DEPTH
                     The event depth; default = 10 km
    -t LAT, --lat LAT     Latitude; default = 31.9299 deg
    -n LON, --lon LON     Longitude; default = 35.5136 deg
    
    • enter script.ipynb notebook for more information 🎉

Credits

prepCode relies on research with Ben-Gurion University of the Negev and Geological Survey of Israel. My thanks to Dr. Ran Nof and Professor Michael Tsesarsky for participating in this process.

License

Copyright (c) 2022 by Almog Blaer. prepCode is released under the GNU Lesser General Public License version 3 or any later version. See LICENSE.TXT for full details.

Footnotes

  1. Chung, A. I., I. Henson, and R. M. Allen, 2019, Optimizing Earthquake Early Warning Performance: ElarmS-3, Seismological Researc Letters, 90, no. 2A, 727–743, doi:10.1785/0220180192.

  2. Baer, M., and U. Kradolfer, 1987, an automatic phase picker for local_and teleseismic events.

About

Preparation code for synthetic seismic data traces, that mimic real ones

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages