view.py 文件源码

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

项目:Projects 作者: it2school 项目源码 文件源码
def __call__(self, rhotheta):
        """Project rho and theta"""
        if None in rhotheta:
            return None, None
        rho, theta = rhotheta
        # Center case
        if theta == 0:
            return super(PolarThetaLogView, self).__call__((0, 0))
        theta = self.box._tmin + (self.box._tmax - self.box._tmin) * (
            log10(theta) - self.log10_tmin) / (
            self.log10_tmax - self.log10_tmin)

        start = 3 * pi / 2 + self.aperture / 2
        theta = start + (2 * pi - self.aperture) * (
            theta - self.box._tmin) / (
                self.box._tmax - self.box._tmin)

        return super(PolarThetaLogView, self).__call__(
            (rho * cos(theta), rho * sin(theta)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号