planck#

gwpy.signal.window.planck(size: int, nleft: int = 0, nright: int = 0) NDArray[source]#

Return a Planck taper window.

Deprecated since version 4.0.0: This function is deprecated and will be removed in a future release. Use a different window function (e.g. tukey) or implement your own version of the Planck window if needed.

Parameters:
sizeint

Number of samples in the output window.

nleftint

Number of samples to taper on the left, should be less than size/2.

nrightint

Number of samples to taper on the right, should be less than size/2.

Returns:
wndarray

The window, with the maximum value normalized to 1 and at least one end tapered smoothly to 0.

References

[1]

McKechan, D.J.A., Robinson, C., and Sathyaprakash, B.S. (April 2010). “A tapering window for time-domain templates and simulated signals in the detection of gravitational waves from coalescing compact binaries”. Classical and Quantum Gravity 27 (8). doi:10.1088/0264-9381/27/8/084020

Examples

To taper 0.1 seconds on both ends of one second of data sampled at 2048 Hz:

>>> from gwpy.signal.window import planck
>>> w = planck(2048, nleft=205, nright=205)