bufferzone.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:tango 作者: LLNL 项目源码 文件源码
def _damp_flux(flux, taperwidth):
    """Apply damping to the sides of the input flux.  The damping applies to a width of
    size taperwidth on each side of the domain.

    Currently, uses a Tukey window.

    Inputs:
      flux              input signal on which to damp sides (array)
      taperwidth        width over which to apply damping at each boundary, as a fraction of domain size (scalar)
    Outputs:
      dampedFlux        signal with edges damped (array)
    """
    alpha = taperwidth * 2      # alpha sets the width of the damping for the entire signal, accounting for both left and right boundaries
    tukeyWindow = scipy.signal.tukey(len(flux), alpha)
    dampedFlux = flux * tukeyWindow
    return dampedFlux
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号