Cosine Taper.
Parameters: |
|
---|---|
Return type: | float NumPy ndarray |
Returns: | Cosine taper array/vector of length npts. |
Example
>>> tap = cosTaper(100, 1.0)
>>> tap2 = 0.5 * (1 + np.cos(np.linspace(np.pi, 2 * np.pi, 50)))
>>> np.allclose(tap[0:50], tap2)
True
>>> npts = 100
>>> p = 0.1
>>> tap3 = cosTaper(npts, p)
>>> ( tap3[npts*p/2.:npts*(1-p/2.)]==np.ones(npts*(1-p)) ).all()
True