-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
executable file
·62 lines (49 loc) · 1.83 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
from core.Catalog import generateCatalog
from core.Extra import readConfiguration
from core.Report import prepareReport
from core.Station import generateStationNoiseModel, generateStations
from core.VelocityModel import createVelocityModel
from core.Visualize import (plotNoise, plotSeismicityMap, plotStatistics,
plotVelocityModel2D, plotVelocityModel3D, plotMisfits)
from hypo71.Locate import locateHypo71
from hypocenter.Locate import locateHypocenter
from hypodd.Locate import locateHypoDD
class Main():
def __init__(self):
self.config = self.readConfig()
self.locators = ["hypocenter", "hypo71", "hypoDD"]
def readConfig(self):
config = readConfiguration()
return config
def prepareVelocityModel(self):
createVelocityModel(self.config)
def prepareStations(self):
generateStations(self.config)
generateStationNoiseModel(self.config)
def prepareCatalog(self):
generateCatalog(self.config)
def locateCatalog(self):
locateHypocenter(self.config)
locateHypo71(self.config)
locateHypoDD(self.config)
def visualizeVelocityModel(self):
plotVelocityModel2D(self.config)
plotVelocityModel3D(self.config)
def visualizeCatalog(self):
for locator in self.locators:
plotSeismicityMap(self.config, locator)
plotStatistics(self.config, locator)
plotMisfits(self.config, locator)
# plotNoise(self.config)
def reportCatalog(self):
for locator in self.locators:
prepareReport(self.config, locator)
if "__main__" == __name__:
app = Main()
app.prepareVelocityModel()
app.prepareStations()
app.prepareCatalog()
app.locateCatalog()
app.visualizeVelocityModel()
app.visualizeCatalog()
app.reportCatalog()