import dascore as dc
= (
patch 'example_event_1')
dc.get_example_patch("mm/(m*s)", distance='m', time='s')
.set_units(=0.05)
.taper(time=(None, 300))
.pass_filter(time
)
=True, scale=0.2); patch.viz.waterfall(show
F-K Transform
F-k transforms are common in geophysical applications for various types of filtering.
We can transform and visualize the patch in the F-K domain using the dft.
# Apply transform on all dimensions
= patch.dft(patch.dims)
fk_patch
# We can't plot complex arrays so only plot amplitude
= fk_patch.abs().viz.waterfall()
ax
# Zoom in around interesting frequencies
-500, 500);
ax.set_xlim(-.2, .2); ax.set_ylim(