Skip to content

Commit

Permalink
Merge cc5b8d7 into 1641ef7
Browse files Browse the repository at this point in the history
  • Loading branch information
medlin01GA committed Apr 30, 2020
2 parents 1641ef7 + cc5b8d7 commit 247ad86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions seismic/receiver_fn/plot_ccp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
Generate common conversion point (CCP) plot as per *C.Sippl, "Moho geometry along a north-south passive seismic
transect through Central Australia", Technophysics 676 (2016), pp.56-69,
transect through Central Australia", Technophysics 676 (2016), pp.56-69,
DOI https://doi.org/10.1016/j.tecto.2016.03.031*
This code adapted from Christian Sippl's original code.
Expand Down Expand Up @@ -83,9 +83,14 @@ def plot_ccp(matrx, length, max_depth, spacing, vlims=None, metadata=None, title
plt.xticks(np.arange(0.0, length*1.0001, tickstep_x), fontsize=12)
plt.yticks(np.arange(0, max_depth*1.0001, tickstep_y), fontsize=12)
plt.tick_params(right=True, labelright=True, axis='y', labelsize=12)
plt.gca().xaxis.set_major_locator(MultipleLocator(50))
plt.gca().xaxis.set_minor_locator(MultipleLocator(5))
plt.gca().xaxis.set_tick_params(which='both', top=True)
plt.gca().yaxis.set_major_locator(MultipleLocator(10))
plt.gca().yaxis.set_minor_locator(MultipleLocator(1))
plt.gca().yaxis.set_tick_params(which='minor', right=True)
plt.grid(color='#80808080', linestyle=':', axis='y')
plt.grid(color='#808080', which='major', linestyle=':', alpha=0.5)
plt.grid(color='#a0a0a0', which='minor', linestyle=':', alpha=0.2, linewidth=0.5)

if metadata is not None:
stn_labels = []
Expand Down Expand Up @@ -122,7 +127,7 @@ def setup_ccp_profile(length, spacing, maxdep):
:return: Zeroed matrix and mesh coordinates
:rtype: numpy.array, numpy.array, numpy.array
"""
#calculate number of cells in x and y direction
#calculate number of cells in x and y direction
n_y = int(round(maxdep / spacing, 0))
n_x = int(round(length / spacing, 0))

Expand Down Expand Up @@ -152,7 +157,7 @@ def add_ccp_trace(trace, inc_p, matrx, matrx_entry, vmod, depstep, lenstep, sta_
"""
project amplitudes from all RFs onto the profile...2D rot:
"""
# start at zero: inc_p given, inc_s needs to be calculated
# start at zero: inc_p given, inc_s needs to be calculated
h = 0
c = 0
d = 0
Expand Down
4 changes: 2 additions & 2 deletions seismic/receiver_fn/plot_ccp_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def run_batch(transect_file, rf_waveform_file, fed_db_file, amplitude_filter=Fal
# and will break down near poles, for long transects, or if transect crosses the antimeridian.
dirn = (end - start)
dirn = dirn/np.linalg.norm(dirn)
start -= 25*dirn/rf_util.KM_PER_DEG
end += 25*dirn/rf_util.KM_PER_DEG
start -= 25*dirn/KM_PER_DEG
end += 25*dirn/KM_PER_DEG
start_latlon = (start[1], start[0])
end_latlon = (end[1], end[0])

Expand Down

0 comments on commit 247ad86

Please sign in to comment.