Skip to content

Commit

Permalink
Merge pull request #112 from mdenolle/marine_test_again
Browse files Browse the repository at this point in the history
update plotting, conj
  • Loading branch information
mdenolle authored May 10, 2023
2 parents 7e61f06 + ead6d95 commit ac669d7
Show file tree
Hide file tree
Showing 6 changed files with 572 additions and 45 deletions.
Empty file added script/run_mpi_all.sh
Empty file.
2 changes: 1 addition & 1 deletion src/noisepy/seis/S1_fft_cc_MPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def cross_correlate(
t10 = time.time()
logger.debug("smoothing source takes %6.4fs" % (t10 - t00))
else:
sfft1 = fft1.reshape(N, Nfft2)
sfft1 = np.conj(fft1).reshape(N, Nfft2)

# get index right for auto/cross correlation
istart = iiS # start at the channel source / only fills the upper right triangle matrix of channel pairs
Expand Down
17 changes: 8 additions & 9 deletions src/noisepy/seis/plotting_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,14 @@ def plot_substack_cc(sfile, freqmin, freqmax, disp_lag=None, savefig=True, sdir=
ax1.set_yticks(np.arange(0, nwin, step=tick_inc))
ax1.set_yticklabels(timestamp[0::tick_inc])
ax1.xaxis.set_ticks_position("bottom")

ax2.plot(amax / min(amax), "r-")
ax2.plot(ngood, "b-")
ax2.set_xlabel("waveform number")
ax2.set_xticks(np.arange(0, nwin, step=tick_inc))
ax2.set_xticklabels(tmarks[0:nwin:tick_inc])
for tick in ax2.get_xticklabels():
tick.set_rotation(30)
ax2.legend(["relative amp", "ngood"], loc="upper right")
ax2.set_title("stacked and filtered at %4.2f-%4.2f Hz" % (freqmin, freqmax))
ax2.plot(
np.arange(-disp_lag, disp_lag + dt, dt),
np.mean(data, axis=0),
"k-",
linewidth=1,
)
ax2.set_xticks(t)
fig.tight_layout()

# save figure or just show
Expand Down
Loading

0 comments on commit ac669d7

Please sign in to comment.