MS_effective_splitting_N

MS_EFFECTIVE_SPLITTING_N - N-layer effective splitting operator calculation.
[fast_eff,tlag_eff]=MS_effective_splitting_N(f, spol, fast, tlag, ...)
Common Inputs:
   f (scalar) : Dominant frequency of wave (Hz)
   spol (scalar) : initial source polarisation (degrees)
   fast (scalar/vector) : fast direction(s) of layer(s) to be
                          included (s)
   tlag (scalar/vector) : lag time(s) of layer(s) to be included
                          (degrees)
Fast and tlag can be scalars or vectors but must all be the same length.
Usage:
 [fast_eff,tlag_eff]=MS_effective_splitting_N(f, spol, fast, tlag)
   or
 [fast_eff,tlag_eff]=MS_effective_splitting_N(f, spol, fast, tlag, ...
 'mode', 'S&S')
Calculate effective splitting parameters using the method of Silver
and Savage (1994). CAUTION! This is quick but is known to fail if the delay
time becomes large compared to the dominant frequency of the wave. It
also gives unstable results when the source polarisation is near the
effective fast direction. This would, however probably be seen as a
null result anyway.
[fast_eff,tlag_eff]=MS_effective_splitting_N(f, spol, fast, tlag, ...
'mode', 'GaussianWavelet')
Calculate effective splitting parameters by first applying the
splitting operators in sequence to an unsplit first-derivative
Gaussian wavelet then searching for the effective splitting operator
that minimises the second eigenvalue of the covariance matrix
of the result. This is the ray theory approach described by
Bonnin et al. (2012).
[fast_eff,tlag_eff]=MS_effective_splitting_N(f, spol, fast, tlag, ...
'mode', 'GaussianWavelet', 'PlotWavelet')
Plot the resulting wavelet when in GaussianWavelet mode.
References:
    M. Bonnin, A. Tommasi, R. Hassani, S. Chevrot, J. Wookey, G. Barruol
      (2012) "Numerical modelling of the upper-mantle anisotropy beneath
      a migrating strike-slip plate boundary: the San Andreas Fault
      system" Geophysical Journal International, v191 pp 436-458.
      http://dx.doi.org/10.1111/j.1365-246X.2012.05650.x
    Silver, P. G. and Savage, M. K. 1994 "The interpretation of shear-wave
      splitting parameters in the presence of two anisotropic layers"
      Geophysical Journal International, v119 pp 949-963.