-
Notifications
You must be signed in to change notification settings - Fork 0
/
dislocclasses.py
202 lines (145 loc) · 5.17 KB
/
dislocclasses.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
"""Classes related with disloc service
-- Fault
-- DislocParamsBean
"""
class Fault():
"""fault class
self, faultDepth,
self, faultDipAngle,
self, faultDipSlip,
self, faultLameLambda,
self, faultLameMu,
self, faultLatEnd,
self, faultLatStart,
self, faultLength,
self, faultLocationX,
self, faultLocationY,
self, faultLocationZ,
self, faultLonEnd,
self, faultLonStart,
java.lang.String faultName,
self, faultRakeAngle,
self, faultStrikeAngle,
self, faultStrikeSlip,
self, faultTensileSlip,
self, faultWidth)
"""
def __init__(self):
# python cannot define multiple constructors as in Java
pass
def setFaultDepth(self, faultDepth):
self.faultDepth = faultDepth
def setFaultDipAngle(self, faultDipAngle):
self.faultDipAngle = faultDipAngle
def setFaultDipSlip(self, faultDipSlip):
self.faultDipSlip = faultDipSlip
def setFaultLameLambda(self, faultLameLambda):
self.faultLameLambda = faultLameLambda
def setFaultLameMu(self, faultLameMu):
self.faultLameMu = faultLameMu
def setFaultLatEnd(self, faultLatEnd):
self.faultLatEnd = faultLatEnd
def setFaultLatStart(self, faultLatStart):
self.faultLatStart = faultLatStart
def setFaultLength(self, faultLength):
self.faultLength = faultLength
def setFaultLocationX(self, faultLocationX):
self.faultLocationX = faultLocationX
def setFaultLocationY(self, faultLocationY):
self.faultLocationY = faultLocationY
def setFaultLocationZ(self, faultLocationZ):
self.faultLocationZ = faultLocationZ
def setFaultLonEnd(self, faultLonEnd):
self.faultLonEnd = faultLonEnd
def setFaultLonStart(self, faultLonStart):
self.faultLonStart = faultLonStart
def setFaultName(self, faultName):
self.faultName = faultName
def setFaultRakeAngle(self, faultRakeAngle):
self.faultRakeAngle = faultRakeAngle
def setFaultStrikeAngle(self, faultStrikeAngle):
self.faultStrikeAngle = faultStrikeAngle
def setFaultStrikeSlip(self, faultStrikeSlip):
self.faultStrikeSlip = faultStrikeSlip
def setFaultTensileSlip(self, faultTensileSlip):
self.faultTensileSlip = faultTensileSlip
def setFaultWidth(self, faultWidth):
self.faultWidth = faultWidth
class DislocParamsBean():
"""DislocParamsBean class"""
def __init__(self):
self.originLat = 0.0
self.originLon = 0.0
self.gridMinXValue = 0.0
self.gridMinYValue = 0.0
self.gridXSpacing = 0.0
self.gridYSpacing = 0.0
self.gridXIterations = 1
self.gridYIterations = 1
# GRID_OBSERVATION_STYLE = 1
# SCATTER_OBSERVATION_STYLE = 0
self.observationPointStyle = 1
# Setters
def setOriginLat(self, originLat):
self.originLat = originLat
def setOriginLon(self, originLon):
self.originLon = originLon
def setGridMinXValue(self, gridMinXValue):
self.gridMinXValue = gridMinXValue
def setGridMinYValue(self, gridMinYValue):
self.gridMinYValue = gridMinYValue
def setGridXSpacing(self, gridXSpacing):
self.gridXSpacing = gridXSpacing
def setGridYSpacing(self, gridYSpacing):
self.gridYSpacing = gridYSpacing
def setGridXIterations(self, gridXIterations):
self.gridXIterations = gridXIterations
def setGridYIterations(self, gridYIterations):
self.gridYIterations = gridYIterations
def setObservationPointStyle(self, observationPointStyle):
self.observationPointStyle = observationPointStyle
# Getters
def getOriginLon(self):
return self.originLon
def getOriginLat(self):
return self.originLat
def getGridMinXValue(self):
return self.gridMinXValue
def getGridMinYValue(self):
return self.gridMinYValue
def getGridXSpacing(self):
return self.gridXSpacing
def getGridYSpacing(self):
return self.gridYSpacing
def getGridXIterations(self):
return self.gridXIterations
def getGridYIterations(self):
return self.gridYIterations
def getObservationPointStyle(self):
return self.observationPointStyle
class EarthquakeEvent():
"""earthquake event class
"""
def __init__(self, jsonURL):
""""""
self.eventUrl = jsonURL
self.monmenttensorflag = False
self.monmenttensor = ""
def setMag(self, mag):
self.mag = mag
def setTitle(self, title):
self.title = title
def setPlace(self, place):
self.place = place
def setTime(self, time):
self.time = time
def setIds(self, ids):
self.ids = ids
def setUpdated(self, updated):
self.updated = updated
def setCoordinates(self, coordinates):
self.coordinates = coordinates
def setMonmentTensorFlag(self, flag):
self.monmenttensorflag = flag
def setMonmentTensor(self, monmenttensor_dict):
self.monmenttensor = monmenttensor_dict