70
70
# set_xlim leaves some padding; axis('image') changes the aspect ratio. This sets tight axis limits without forcing a bad aspect ratio.
71
71
plt .gca ().set_xbound (t [0 ],t [- 1 ])
72
72
plt .ylabel ('Pa' )
73
- plt .title ('A . Infrasound Waveform' , loc = 'left' , fontsize = 11 )
73
+ plt .title ('a . Infrasound Waveform' , loc = 'left' , fontsize = 11 )
74
74
plt .xticks (xticks , labels = [])
75
75
plt .yticks ([- 2 , 0 , 2 ])
76
76
@@ -119,7 +119,7 @@ def imageAdj(x): return(np.log(trim(x, ac_max, ac_max*r)))
119
119
#plt.axvline(0, color = 'black', lw = 0.5)
120
120
plt .axhline (slowness_threshold , color = 'black' , lw = 0.5 , ls = '--' )
121
121
plt .ylabel ('s/km' )
122
- plt .title ('B . Power vs. Time, Slowness' , loc = 'left' )
122
+ plt .title ('b . Power vs. Time, Slowness' , loc = 'left' )
123
123
w = output ['original_sh' ] < 4
124
124
plt .plot (output ['t' ][w ]- (event - loop_start ), output ['original_sh' ][w ], 'k.' , markersize = 5 )
125
125
plt .plot (output ['t' ][w ]- (event - loop_start ), output ['original_sh' ][w ], 'w.' , markersize = 2 )
@@ -132,7 +132,7 @@ def imageAdj(x): return(np.log(trim(x, ac_max, ac_max*r)))
132
132
cleanbf .image (imageAdj (spec_baz ), output ['t' ]- (event - loop_start ), baz , crosshairs = False )
133
133
plt .ylabel ('degrees' )
134
134
#plt.xlabel('Time after earthquake (seconds)')
135
- plt .title (f'C . Power vs Time, Backazimuth (Slowness > { slowness_threshold } s/km)' , loc = 'left' )
135
+ plt .title (f'c . Power vs Time, Backazimuth (Slowness > { slowness_threshold } s/km)' , loc = 'left' )
136
136
plt .plot (output ['t' ]- (event - loop_start ), (output ['original_az' ]) % 360 - 180 , 'k.' , markersize = 5 )
137
137
plt .plot (output ['t' ]- (event - loop_start ), (output ['original_az' ]) % 360 - 180 , 'w.' , markersize = 2 )
138
138
plt .yticks (baz_ticks )
@@ -198,7 +198,7 @@ def imageAdj(x): return(np.log(trim(x, ac_max, ac_max*r)))
198
198
cleanbf .image (np .log (trim (spec_s , spec_s [:,w ].max (), r * spec_s [:,w ].max ())), output ['t' ]- (event - loop_start ), sh , crosshairs = False )
199
199
plt .axhline (slowness_threshold , color = 'black' , lw = 0.5 , ls = '--' )
200
200
plt .ylabel ('s/km' )
201
- plt .title ('D . Power vs. Time, Slowness (3 sensors)' , loc = 'left' )
201
+ plt .title ('d . Power vs. Time, Slowness (3 sensors)' , loc = 'left' )
202
202
w = output ['original_sh' ] < 4
203
203
plt .plot (output ['t' ][w ]- (event - loop_start ), output ['original_sh' ][w ], 'k.' , markersize = 5 )
204
204
plt .plot (output ['t' ][w ]- (event - loop_start ), output ['original_sh' ][w ], 'w.' , markersize = 2 )
@@ -210,7 +210,7 @@ def imageAdj(x): return(np.log(trim(x, ac_max, ac_max*r)))
210
210
im = cleanbf .image (imageAdj (spec_baz ), output ['t' ]- (event - loop_start ), baz , crosshairs = False ) # im used later for colorbar
211
211
plt .ylabel ('degrees' )
212
212
#plt.xlabel('Time after earthquake (seconds)')
213
- plt .title (f'E . Power vs. Time, Backazimuth (Slowness > { slowness_threshold } s/km; 3 sensors)' , loc = 'left' )
213
+ plt .title (f'e . Power vs. Time, Backazimuth (Slowness > { slowness_threshold } s/km; 3 sensors)' , loc = 'left' )
214
214
plt .plot (output ['t' ]- (event - loop_start ), (output ['original_az' ]) % 360 - 180 , 'k.' , markersize = 5 )
215
215
plt .plot (output ['t' ]- (event - loop_start ), (output ['original_az' ]) % 360 - 180 , 'w.' , markersize = 2 )
216
216
plt .yticks (baz_ticks )
@@ -224,7 +224,7 @@ def imageAdj(x): return(np.log(trim(x, ac_max, ac_max*r)))
224
224
plt .subplot (7 ,1 ,6 )
225
225
plt .axhline (slowness_threshold , color = 'black' , lw = 0.5 , ls = '--' )
226
226
plt .ylabel ('s/km' )
227
- plt .title ('F . Slowness, traditional beamforming (3 sensors vs. 20 sensors)' , loc = 'left' )
227
+ plt .title ('f . Slowness, traditional beamforming (3 sensors vs. 20 sensors)' , loc = 'left' )
228
228
w = output ['original_sh' ] < 4
229
229
plt .plot (output_full ['t' ][w ]- (event - loop_start ), output_full ['original_sh' ][w ], 'b.' , markersize = 5 )
230
230
plt .plot (output_3 ['t' ][w ]- (event - loop_start ), output_3 ['original_sh' ][w ], 'r.' , markersize = 5 )
@@ -235,7 +235,7 @@ def imageAdj(x): return(np.log(trim(x, ac_max, ac_max*r)))
235
235
plt .subplot (7 ,1 ,7 )
236
236
plt .ylabel ('degrees' )
237
237
plt .xlabel ('Time after earthquake (seconds)' )
238
- plt .title ('G . Backazimuth, traditional beamforming (3 sensors vs. 20 sensors)' , loc = 'left' )
238
+ plt .title ('g . Backazimuth, traditional beamforming (3 sensors vs. 20 sensors)' , loc = 'left' )
239
239
plt .plot (output_full ['t' ]- (event - loop_start ), (output_full ['original_az' ]) % 360 - 180 , 'b.' , markersize = 5 , label = 'N=20' )
240
240
plt .plot (output_3 ['t' ]- (event - loop_start ), (output_3 ['original_az' ]) % 360 - 180 , 'r.' , markersize = 5 , label = 'N=3' )
241
241
plt .legend (loc = 'upper right' , framealpha = 1 )
@@ -256,7 +256,7 @@ def imageAdj(x): return(np.log(trim(x, ac_max, ac_max*r)))
256
256
257
257
258
258
#%% save figure
259
- plt .savefig ('figures/Fig4_Aftershock_20_3_paper.png' )
259
+ plt .savefig ('figures/Fig4_Aftershock_20_3_paper.png' , dpi = 300 )
260
260
#%% calculate 6-station clean result for use in supplementary figure
261
261
262
262
calculate_new_beamform_result_6 = False # set to False after running the calculation once to save time
@@ -283,4 +283,4 @@ def imageAdj(x): return(np.log(trim(x, ac_max, ac_max*r)))
283
283
with open (pkl_file6 , 'rb' ) as file :
284
284
d = pickle .load (file )
285
285
locals ().update (d )
286
- output_6 = output
286
+ output_6 = output
0 commit comments