plot.py 文件源码

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

项目:sound_field_analysis-py 作者: QULab 项目源码 文件源码
def makeMTX(spat_coeffs, radial_filter, kr_IDX, viz_order=None, stepsize_deg=1):
    """Returns a plane wave decomposition over a full sphere

    Parameters
    ----------
    spat_coeffs : array_like
       Spatial fourier coefficients
    radial_filter : array_like
       Modal radial filters
    kr_IDX : int
       Index of kr to be computed
    viz_order : int, optional
       Order of the spatial fourier transform [Default: Highest available]
    stepsize_deg : float, optional
       Integer Factor to increase the resolution. [Default: 1]

    Returns
    -------
    mtxData : array_like
       Plane wave decomposition (frequency domain)

    Note
    ----
    The file generates a Matrix of 181x360 pixels for the
    visualisation with visualize3D() in 1[deg] Steps (65160 plane waves).
    """

    if not viz_order:
        viz_order = _np.int(_np.ceil(_np.sqrt(spat_coeffs.shape[0]) - 1))

    angles = _np.mgrid[0:360:stepsize_deg, 0:181:stepsize_deg].reshape((2, -1)) * _np.pi / 180
    Y = plane_wave_decomp(viz_order, angles, spat_coeffs[:, kr_IDX], radial_filter[:, kr_IDX])

    return Y.reshape((360, -1)).T  # Return pwd data as [181, 360] matrix
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号