NoisePy tutorial: Visualization#

You may run this as a notebook on a fresh.

%load_ext autoreload
%autoreload 2
from noisepy.seis import __version__       # noisepy core functions
from noisepy.seis.io.plotting_modules import plot_all_moveout
from noisepy.seis.io.numpystore import NumpyStackStore
import random
print(f"Using NoisePy version {__version__}")


stack_data_path = "s3://scoped-noise/scedc_CI_2022_stack/"

S3_STORAGE_OPTIONS = {"s3": {"anon": False}}
stack_store = NumpyStackStore(stack_data_path, storage_options=S3_STORAGE_OPTIONS)
pairs = stack_store.get_station_pairs()
print(f"Found {len(pairs)} station pairs")
# Get the first timespan available for the first pair
ts = stack_store.get_timespans(*pairs[0])[0]
print(f"Timespan: {ts}")
# load 10% of the data to plot
sample = random.sample(pairs, int(len(pairs)*.1))
print(len(sample))
sta_stacks = stack_store.read_bulk(ts, sample)
plot_all_moveout(sta_stacks, 'Allstack_linear', 0.1, 0.2, 'ZZ', 1)