obspy.imaging.source.plot_radiation_pattern
- plot_radiation_pattern(mt, kind=['p_sphere', 'beachball'], coordinate_system='RTP', p_sphere_direction='inwards', fig=None, show=True)[source]
Plot the P/S farfield radiation pattern on a unit sphere grid.
The calculations are based on [Aki1980] eq. 4.29.
- Parameters
mt – Focal mechanism NM x 6 (M11, M22, M33, M12, M13, M23 - the six independent components of the moment tensor, where the coordinate system is 1,2,3 = Up,South,East which equals r,theta,phi - Harvard/Global CMT convention). The relation to [Aki1980] x,y,z equals North,East,Down convention is as follows: Mrr=Mzz, Mtt=Mxx, Mpp=Myy, Mrt=Mxz, Mrp=-Myz, Mtp=-Mxy.
kind –
One of:
(A) A list of strings or nested list of strings for a matplotlib plot (for details see
obspy.core.event.event.Event.plot()
).(B)
"mayavi"
: uses the mayavi library.(C)
"vtk"
: This vtk option writes two vtk files to the current working directory.rpattern.vtk
contains the p and s wave farfield vector field.beachlines.vtk
contains the nodal lines of the radiation pattern. A vtk glyph filter should be applied to the vector field (e.g. in ParaView) to visualize it.
fig (
matplotlib.figure.Figure
) – Figure instance to use.show (bool) – Whether to show the figure after plotting or not. Can be used to do further customization of the plot before showing it.
- Returns
Matplotlib figure or
None
(ifkind
is"mayavi"
or"vtk"
)