astrom_common.py 文件源码

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

项目:astromalign 作者: dstndstn 项目源码 文件源码
def setRotation(self, rot, smallangle=True):
        '''
        Rotation angle in degrees
        '''
        rad = np.deg2rad(rot)
        if smallangle:
            # bring rad close to zero.
            rad = np.fmod(rad, 2.*pi)
            if rad > pi:
                rad -= 2.*pi
            if rad < -pi:
                rad += 2.*pi
            self.T = [ 0., -rad, rad, 0. ]
        else:
            cr = np.cos(rad)
            sr = np.sin(rad)
            self.T = [ cr - 1, -sr, sr, cr - 1 ]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号