Giter VIP home page Giter VIP logo

prepcode's Introduction

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.

prepcode's People

Contributors

ablaer avatar

Watchers

 avatar

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.