refine.py 文件源码

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

项目:circletracking 作者: caspervdw 项目源码 文件源码
def to_cartesian(r_dev, pos, normal):
    """ Transform radial deviations from an ellipsoidal grid to Cartesian

    Parameters
    ----------
    r_dev : ndarray, shape (N, )
        Array containing the N radial deviations from the ellipse. r < 0 means
        inside the ellipse.
    pos : ndarray, shape (2, N)
        The N (y, x) positions of the ellipse (as given by ``ellipse_grid``)
    normal : ndarray, shape (2, N)
        The N (y, x) unit normals of the ellipse (as given by ``ellipse_grid``)
    """
    coord_new = pos + r_dev * normal
    coord_new = coord_new[:, np.isfinite(coord_new).all(0)]
    return coord_new
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号