Copyright (c) 2022 by Almog Blaer
╋╋╋╋╋╋╋╋╋╋╋┏━━━┓╋╋╋╋┏┓
╋╋╋╋╋╋╋╋╋╋╋┃┏━┓┃╋╋╋╋┃┃
┏━━┳━┳━━┳━━┫┃╋┗╋━━┳━┛┣━━┓
┃┏┓┃┏┫┃━┫┏┓┃┃╋┏┫┏┓┃┏┓┃┃━┫
┃┗┛┃┃┃┃━┫┗┛┃┗━┛┃┗┛┃┗┛┃┃━┫
┃┏━┻┛┗━━┫┏━┻━━━┻━━┻━━┻━━┛
┃┃╋╋╋╋╋╋┃┃
┗┛╋╋╋╋╋╋┗┛
🏔️ 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 (), for determining the estimated P arrival for the station.
The default amplitude check: 2.
- 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).
-
- clone the prepCode repository
-
- install the dependencies:
- numpy
- matplotlib
- obspy
- pandas
- glob
- install the dependencies:
-
- 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
-
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 🎉
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.
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.