Skip to content

Commit

Permalink
Merge pull request #4 from Thomas-Ulrich/EAF
Browse files Browse the repository at this point in the history
add EAF case
  • Loading branch information
Thomas-Ulrich committed Oct 31, 2023
2 parents e643c47 + 694e21e commit 19ccbf6
Show file tree
Hide file tree
Showing 2 changed files with 186 additions and 4 deletions.
161 changes: 161 additions & 0 deletions Guvercin_et_al_2022_focal_mec_EAF.csv
@@ -0,0 +1,161 @@
ID,Event(yyyymmddhhmm),Lat,Lon,Depth(km),Strike,Dip,Rake,Mw,VR(%),#,Stations
1,200704140430,38.325,39.323,7.19,329,80,28,3.93,69.2,5
2,200704190716,38.295,39.19,7.79,255,62,1,3.77,76.1,4
3,200705062256,36.992,35.548,11.42,340,45,-65,3.87,52.5,5
4,200705142303,37.505,35.717,9.36,354,67,-86,3.65,55.3,7
5,200708031347,38.368,39.398,2,5,66,-86,3.81,76.1,4
6,200708240253,38.259,37.452,7.24,235,45,-42,3.87,61.6,10
7,200709150526,37.859,36.904,5.4,273,41,28,4.11,65,9
8,200709152328,37.868,36.889,6.09,249,35,0,3.94,71.9,9
9,200712232355,37.533,35.688,10.47,32,70,-65,3.88,64.5,10
10,200805030320,36.697,36.618,7.81,245,54,48,3.59,51.8,7
11,200808201101,37.711,37.464,2,71,90,-64,3.85,58.5,11
12,200901170745,37.16,36.326,14,241,64,-11,4.56,70.1,12
13,200902260853,37.2,36.917,6.55,43,61,-14,3.74,75,13
14,200905031809,38.109,38.576,6.16,241,39,-26,3.15,64,14
15,200905190653,37.649,38.741,4.91,211,22,-34,3.52,57.9,7
16,200905260201,38.682,39.467,8.65,239,50,40,3.74,66.3,14
17,200906041302,36.992,35.825,14,240,59,32,3.84,71.5,8
18,200907071557,38.231,38.774,6.62,221,11,-31,4.26,71,16
19,200907240548,37.537,35.694,7.45,35,80,-84,4.23,57.9,11
20,200908122023,38.242,38.806,4.85,230,18,-25,3.59,68.1,17
21,200910050158,38.326,39.257,9.21,245,64,-3,3.46,68.1,15
22,201001241959,37.6,35.619,14,38,70,-82,3.57,69.7,5
23,201002210438,38.722,40.054,7.11,70,72,4,4.04,66.2,22
24,201003080232,38.823,40.083,6.77,49,57,2,5.68,71.8,12
25,201003080747,38.772,40.064,7.75,51,75,-7,5.11,64.8,13
26,201003081014,38.828,40.134,7.77,54,65,6,4.46,66.5,14
27,201003081112,38.784,40.087,7.17,246,77,16,4.59,57.7,22
28,201003081417,38.778,40.079,6.72,51,55,13,3.84,55.3,13
29,201003081504,38.775,40.072,8.16,51,63,4,4.36,56.5,15
30,201003090009,38.795,40.105,4.28,235,64,1,3.74,59.5,17
31,201003090614,38.761,40.059,7.63,50,80,-26,4.09,61.3,10
32,201003090721,38.862,40.181,6.31,145,60,-10,3.98,60.2,10
33,201003090734,38.753,40.05,4.58,331,71,-33,3.88,58.8,9
34,201003120135,38.706,40.081,5.88,63,57,-20,3.44,63.8,8
35,201003122250,38.807,40.054,8.43,220,48,6,3.76,72.5,19
36,201003160933,38.65,39.689,14,54,78,16,3.78,75,13
37,201003241411,38.802,40.077,12.73,251,41,19,4.72,68.8,17
38,201004111610,39.081,40.79,10.88,55,37,44,3.65,64.1,9
39,201004240515,38.795,40.122,10.13,231,54,8,3.75,72.7,11
40,201006072145,37.783,36.079,8.12,44,33,-84,3.62,64.5,17
41,201006080426,37.783,36.08,9.52,225,41,-84,3.87,61,12
42,201007052205,37.535,35.57,7.55,264,40,30,3.46,59,11
43,201008050531,37.541,35.621,12.35,39,65,-72,3.82,64.9,13
44,201009171017,38.109,39.035,6.01,51,62,6,4.54,72.9,10
45,201009271622,38.717,39.965,5.82,52,64,2,3.52,69.1,13
46,201010091637,38.67,39.909,6.68,55,55,5,3.77,65.9,15
47,201011161050,37.38,36.368,3.04,350,29,-85,4.25,68.5,11
48,201102031527,38.438,39.222,11.51,36,64,-35,3.83,63.9,14
49,201106230734,38.57,39.615,5.71,255,54,4,5.4,70.1,11
50,201106231200,38.56,39.614,5.71,254,50,0,3.64,61.3,10
51,201106291948,37.406,35.866,11.44,125,57,85,4.1,52.6,9
52,201107222120,38.562,39.628,7.67,69,64,51,3.57,67.1,12
53,201108040313,38.572,39.622,12.62,248,62,19,4.19,55.9,9
54,201109071330,37.315,36.289,8.53,354,57,-79,3.93,69.8,5
55,201110100714,38.452,39.274,8.25,220,25,-36,3.79,75.8,13
56,201205251122,38.131,38.599,4.85,246,55,-15,4.07,69.8,21
57,201209192315,37.293,37.151,7.34,34,76,9,3.69,85.4,8
58,201210160116,37.299,37.111,7.72,19,56,-46,4.19,66.2,15
59,201212120118,37.289,36.233,6.55,10,65,-83,3.7,61.5,10
60,201301080615,37.831,37.902,5.01,244,56,16,4.16,75.7,12
61,201301252124,37.896,37.946,6,265,44,46,3.25,75.5,9
62,201304252254,37.298,37.13,8.73,25,85,17,3.98,72.2,15
63,201305061833,37.215,37.129,9.97,200,82,-10,3.63,77.1,13
64,201306162031,38.107,37.079,10,79,73,-8,4.1,76.1,20
65,201307260022,36.044,35.853,10.3,231,19,-16,3.84,54.7,10
66,201308280626,38.361,38.9,9.14,235,60,-22,3.64,73.2,16
67,201311070639,37.339,36.209,8.83,0,31,-78,3.83,65.9,9
68,201311301321,38.48,39.374,6.83,240,82,5,3.69,69.6,12
69,201401101320,37.259,36.229,8.79,10,50,-76,3.85,74,8
70,201402140033,36.751,36.022,9.42,190,40,-70,4.35,63.9,12
71,201402221542,37.429,36.401,9.74,186,55,-59,4.04,70.9,19
72,201403261400,38.128,38.585,6.4,71,62,4,3.87,57.6,9
73,201406090338,36.705,36.097,8.26,16,60,-87,4.46,79.8,8
74,201407122158,36.566,35.831,9.52,186,36,-61,3.69,71.2,5
75,201408081501,37.892,37.899,7.78,245,64,43,2.98,58.9,7
76,201501032324,37.902,37.876,4.85,255,40,0,3.37,80.5,12
77,201501081844,37.084,36.838,6.87,192,69,-16,4.1,74,12
78,201503281008,37.453,36.387,10.7,195,39,-52,3.97,61.9,12
79,201508262301,37.309,36.966,8.89,181,62,-86,3.88,75.9,13
80,201509061535,36.706,36.16,14,255,37,5,3.36,65,7
81,201510032108,38.166,38.967,10.8,55,70,15,3.8,74.3,14
82,201604231951,36.888,36.604,5.78,194,57,-51,3.53,72.6,13
83,201612160641,38.043,38.206,7.87,225,68,-45,3.24,71.9,8
84,201702252106,37.029,36.102,8.13,11,44,-55,4.21,74.3,17
85,201703021107,37.607,38.482,5.88,225,80,-28,5.32,83,12
86,201703021703,37.584,38.508,4.51,220,72,-31,3.62,80.4,13
87,201703102223,37.572,38.506,5.63,38,71,7,3.74,87.7,12
88,201703201439,38.642,39.812,9.95,223,83,-34,3.77,79.6,10
89,201704061153,37.216,36.771,7.36,345,31,-90,3.05,53.6,13
90,201704061928,37.799,37.275,3.93,264,59,-17,3.21,70.4,17
91,201704082031,37.709,37.436,5.16,235,54,2,3,62.6,16
92,201705161551,37.993,37.974,10.33,239,66,40,3.11,64.7,15
93,201707252313,37.987,38.444,4.2,71,50,42,3.49,81.9,17
94,201708180430,37.577,37.583,5.61,235,45,-8,4.01,76.7,21
95,201708300734,37.198,36.6,4.7,190,55,-50,3.87,56.1,9
96,201709121329,37.629,37.388,6,55,58,1,3.04,67.3,14
97,201711291237,37.614,36.825,11.39,251,80,4,3.57,70,13
98,201712311138,37.827,37.754,5.6,255,66,-5,3.43,71.4,11
99,201801191353,38.287,38.846,6.14,228,24,-29,3.94,74.3,17
100,201802021106,36.363,36.204,4.86,209,4,-59,3.22,68.1,10
101,201804141917,37.657,37.432,6,60,60,15,3.12,66.2,12
102,201804212341,37.855,37.793,5.52,55,45,61,3.21,72.3,19
103,201804240034,37.576,38.517,3.03,214,50,-12,4.93,83.1,19
104,201805210109,37.467,38.605,5.26,15,90,-29,3.67,75.2,14
105,201807031316,37.69,37.405,3.51,239,58,10,3.73,69.5,13
106,201807141734,38.09,38.292,14,225,70,15,3.23,56.8,11
107,201807311436,37.054,36.045,14,247,74,-36,4.03,67.1,12
108,201808191522,37.381,36.365,11.2,226,46,-30,4.55,72.9,16
109,201810021529,37.69,37.414,4.52,239,56,-7,4.39,80.1,21
110,201811070638,37.689,37.407,6,249,53,10,3.12,61.4,16
111,201811160743,37.694,37.422,6,55,83,37,3.28,84.5,13
112,201902200535,36.196,35.967,8.32,247,11,14,3.86,65.9,12
113,201903120013,37.702,37.425,6,250,51,26,3.22,75,17
114,201903221004,37.234,36.901,6.08,180,45,-85,3.66,74.1,16
115,201904041731,38.402,39.154,5.18,64,56,-2,5.05,84,15
116,201907191647,37.692,37.408,6,206,43,-4,3.6,81.3,20
117,201907201342,37.331,36.514,14,272,45,41,3.06,60,12
118,201909141347,38.136,37.771,7.58,62,50,-18,3.09,62.5,8
119,201912270702,38.398,39.017,11.13,255,35,6,4.68,81.9,18
120,202001170006,38.05,38.089,8.53,274,85,-20,3.14,75.4,11
121,202001241859,38.457,39.275,10,225,90,0,4,65.4,9
122,202001241900,38.429,39.256,14,360,46,-85,4.02,50.6,7
123,202001241903,38.261,38.71,10,225,75,-15,4.8,60,18
124,202001241949,38.402,39.191,10,233,80,-19,4.5,50,14
125,202001242018,38.292,38.739,10,220,80,-25,4.1,80,10
126,202001250102,38.42,39.261,4.47,240,63,3,3.81,79.7,12
127,202001250840,38.382,39.1,10,75,75,-19,5,79.4,12
128,202001251014,38.272,38.774,10,250,80,0,4.5,72.7,9
129,202001251630,38.402,39.145,10,234,77,14,5.1,59.4,19
130,202001260247,38.433,39.243,7.61,36,72,-19,3.59,73.8,16
131,202001260936,38.416,39.223,6.29,57,70,-18,3.5,69.1,11
132,202001261536,38.436,39.24,8.49,185,60,-64,3.4,70.2,13
133,202001270458,38.507,39.37,6.19,62,66,17,3.54,82.8,17
134,202001272009,38.483,39.184,7.36,245,55,-57,3.37,72.2,14
135,202001280559,38.506,39.316,9.25,210,75,-9,3.36,80.8,14
136,202001290127,38.447,39.306,2,57,83,-25,3.36,76.6,14
137,202001290211,38.433,39.301,3.08,236,56,-5,3.79,82.9,17
138,202001301349,38.48,39.343,7.02,63,76,16,3.65,82.2,15
139,202001312332,38.492,39.329,8.8,190,55,-55,4.42,77.1,16
140,202002010003,38.452,39.254,2,241,49,-7,4.04,78.3,24
141,202002040406,38.472,39.318,9,36,35,-5,3.32,62.1,14
142,202002071957,38.411,39.218,5.19,59,83,32,3.7,72,14
143,202002120935,38.467,39.253,7.81,44,75,-9,3.65,80.8,13
144,202002131728,38.453,39.321,3.17,237,66,-8,3.53,74.6,12
145,202002291229,38.421,39.237,3.98,241,58,-5,4.34,70.1,17
146,202003040425,38.43,39.271,2,237,47,-7,3.69,79.9,15
147,202003170518,38.526,39.469,6.84,86,70,10,3.52,73.2,15
148,202003171654,38.494,39.498,7.6,93,74,25,3.58,68.5,11
149,202003191753,38.382,39.1,2,60,80,-69,4.86,68.2,8
150,202003221847,38.462,39.218,8.21,50,64,-26,3.28,53.6,13
151,202003270020,38.435,39.16,6.49,56,69,-5,3.57,78.2,12
152,202008040937,38.234,38.773,4.8,54,72,-8,5.38,81.7,18
153,202009041602,38.459,39.288,7.22,225,46,-8,3.4,80.6,13
154,202009300240,38.489,39.243,8.77,221,22,-30,3.61,75.5,17
155,202010071326,38.45,39.247,7.53,47,77,-16,3.45,80.7,14
156,202010231036,38.438,39.306,3.26,238,49,-6,3.62,75.6,16
157,202012261109,38.487,39.209,10.36,230,27,-30,3.91,87,7
158,202012270637,38.47,39.2,9.54,225,30,-24,5.32,79.7,23
159,202012270637,38.522,39.181,9.54,225,30,-24,5.32,77.8,9
160,202012272008,38.417,39.152,4.94,239,86,-24,3.54,72.1,14
29 changes: 25 additions & 4 deletions StressInversionNotebook.ipynb
Expand Up @@ -83,10 +83,10 @@
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from scipy.linalg import lstsq\n",
"import seaborn as sns\n",
"#import seaborn as sns\n",
"import pandas as pd\n",
"\n",
"sns.set()\n",
"#sns.set()\n",
"\n",
"\n",
"np.set_printoptions(threshold=10)\n",
Expand Down Expand Up @@ -405,7 +405,8 @@
"source": [
"# mydata = ''\n",
"mydata = \"NZ\"\n",
"# mydata = \"Japan2000_2010\"\n",
"mydata = \"Japan2000_2010\"\n",
"mydata = \"EAF\"\n",
"# mydata = 'Japan2012_2020'\n",
"use_auxiliary_plane = False\n",
"\n",
Expand All @@ -428,6 +429,23 @@
" df = df.rename(columns={\"STRIKE\": \"strike1\", \"DIP \": \"dip1\", \"RAKE \": \"rake1\"})\n",
" df = df.rename(columns={\"STRIKE.1\": \"strike2\", \"DIP .1\": \"dip2\", \"RAKE .1\": \"rake2\"})\n",
" lon0, lon1, lat0, lat1, depth0, depth1 = 141, np.inf, -np.inf, 38.2, 20, np.inf\n",
"elif mydata == \"EAF\":\n",
" # Focal mechanisms in the East Anatolian Fault region, inferred by\n",
" # Güvercin, S. E., Karabulut, H., Konca, A. Ö., Doğan, U., & Ergintav, S. (2022). \n",
" # Active seismotectonics of the East Anatolian Fault. Geophysical Journal International, 230(1), 50-69.\n",
" # https://doi.org/10.1093/gji/ggac045, in supplementary material\n",
" df = pd.read_csv(\"Guvercin_et_al_2022_focal_mec_EAF.csv\")\n",
" df = df.rename(columns={\"Lat\": \"lat\", \"Lon\": \"lon\", \"Depth(km)\": \"depth\", \"Strike\": \"strike1\", \"Dip\": \"dip1\", \"Rake\": \"rake1\"})\n",
" df['strike2'] = df['strike1']\n",
" df['dip2'] = df['dip1']\n",
" df['rake2'] = df['rake1']\n",
" lon0, lon1, lat0, lat1, depth0, depth1 = 37.5, 38, -90, 90, 0, 30\n",
" lon0, lon1, lat0, lat1, depth0, depth1 = 37.5, 38.5, -90, 90, 0, 30 \n",
" lon0, lon1, lat0, lat1, depth0, depth1 = 37, 37.5, -90, 90, 0, 30\n",
" lon0, lon1, lat0, lat1, depth0, depth1 = 36.5, 37, 37, 38, 0, 30\n",
" lon0, lon1, lat0, lat1, depth0, depth1 = 36., 36.75, -90, 37.25, 0, 30\n",
" lon0, lon1, lat0, lat1, depth0, depth1 = 37.25, 37.75, -90, 90, 0, 30\n",
" lon0, lon1, lat0, lat1, depth0, depth1 = 36.5, 38.5, 37.8, 90, 0, 30\n",
"elif mydata == \"\":\n",
" # default file from Stressinverse_1.1.2\n",
" print(\"using default dataset\")\n",
Expand All @@ -453,6 +471,7 @@
" strike, dip, rake = [df[name].values for name in [\"strike1\", \"dip1\", \"rake1\"]]\n",
" strikeAP, dipAP, rakeAP = [df[name].values for name in [\"strike2\", \"dip2\", \"rake2\"]]\n",
"print(strike)\n",
"print(strike.shape)\n",
"\n",
"if use_auxiliary_plane:\n",
" # set for 30% of focal mechanism the wrong plane\n",
Expand Down Expand Up @@ -505,6 +524,8 @@
"v2 = (eigenVectors[:, :, 1]).T\n",
"v3 = (eigenVectors[:, :, 2]).T\n",
"plot_stress_axes(v1, v2, v3, \"\")\n",
"print(f\"based on {strike.shape[0]} focal mechanisms\")\n",
"print(f\"lon: [{lon0},{lon1}], lat:[{lat0}, {lat1}], depth: [{depth0}, {depth1}]\")\n",
"plotSHmaxR(eigenVectors, eigenValues)"
]
}
Expand All @@ -525,7 +546,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 19ccbf6

Please sign in to comment.