SPECFEM / specfem3d

SPECFEM3D_Cartesian simulates acoustic (fluid), elastic (solid), coupled acoustic/elastic, poroelastic or seismic wave propagation in any type of conforming mesh of hexahedra (structured or not).
GNU General Public License v3.0
409 stars 227 forks source link

Regarding convolution with the source time function #1668

Open VarunD21029 opened 9 months ago

VarunD21029 commented 9 months ago

I would like to know what the preferred way is to convolute the seismogram with the source time functions. The manual suggests using the Seismic Analysis Code (SAC) software for the task, but I am having difficulties reading the output file in SAC. Thanks in advance for suggestions.

danielpeter commented 8 months ago

I guess you meant "convolve", not "convolute" the seismograms - this might have different meanings :)

in general, the convolution step is part of your post-processing. thus, it depends on how you do your preferred post-processing. this could be with python scripts, perl scripts, bash scripts and/or together with SAC or obspy etc.

the SPECFEM3D package only provides a very simple convolution post-processing tool bin/xconvolve_source_timefunction when compiled. simple in the sense of only convolving "smooth triangle" functions (Gaussians with a decay such that they are similar to triangular functions).

regarding SAC, it should be able to read in the ASCII trace outputs using a command like

read alpha <tracefile>

for the rest of the procedure follow the SAC manual.

and other convolution possibilities can be found online using obspy or numpy for python scripts.

and hopefully other users following this discussion can provide you with more specific script examples on how to convolve your traces with arbitrary source time functions.