Author: Utpal Kumar, Nguyễn Công Nghĩa
This program can be used to obtain the earthquake information from various sources. The user can search for any event for given time range, magnitude range, depth range, geographical area. It can also obtain the focal mechanism solutions for the given parameters. It gives the output file (catalog.txt by default) where all the information is stored. It also plots the output (both with the focal mechanism and without it.) This program makes use of the obspy module of Python and retrieve data from the International Seismological Center (ISC) server
To run with default parameters
To obtain the earthquake info between today, March 2016 to the current time
python3 earthquakeFinder.py st=2016/3
To obtain the earthquake info between 2016, march, 29 to 2016, september, 22
python3 earthquakeFinder.py st=2016/3/29,et=2016/9/22
To obtain the catalog for magnitudes between 4-9 and with focal mechanism
python3 earthquakeFinder.py mxmag=9,mnmag=4,fm=yes
To obtain catalog for magnitude 4-7, and within radius of 10 (default) and central coordinates 22(lat),121(lon) with focal mechanism
python3 earthquakeFinder.py mxmag=7,mnmag=4,clat=22,clon=121,mxrad=80,fm=yes
Parameters to change (default values in the braces):
mnla(-90),mxla(90),mnlo(-180),mxlo(180),mndep(0),mxdep(700),mnmag(4),mxmag(10),mnrad(0),mxrad(10),clat(None),clon(None),st(-1 month),et (current time),fm(no)
Output format of the catalog
Without Focal Mechanism -> "YEAR MONTH DAY HOUR MINUTES SECONDS LONGITUDE (in deg) LATITUDE(in deg) DEPTH(in km) MAG_TYPE MAG EVENT_NAME."
With Focal Mechanism -> "YEAR MONTH DAY HOUR MIN SEC LONGITUDE LATITUDE DEPTH EXP(Nm) M0 MAG Mrr Mtt Mpp Mrt Mtp Mpr Str1 Dip1 Rake1 Str2 Dip2 Rake2."
(a) basemap: It is a great tool for creating maps using python in a simple way. The best way to obtain basemap is via Anaconda/Miniconda For Linux/Mac users just download the bash installer and inside the download directory, execute the following command:
bash Miniconda*.shFor Windows user, download the exe file and install it. After the installation of Anaconda/Miniconda, basemap can be obtained by simply executing the command
conda install basemap
(b) pandas: It is an easy-to-use data structure and data analysis tool in python
(c) obspy: It is a python tool for seismology.
To install all, simply execute the following command in your terminal:
conda insatll basemap pandas
pip install obspy