def orientation_angle(self):
"""
This function ...
:return:
"""
diag_a = self.pixel_scale_matrix[0,1]
diag_b = self.pixel_scale_matrix[1,0]
if not np.isclose(diag_a, diag_b, rtol=0.05):
warnings.warn("The diagonal elements of the pixel scale matrix are not equal: " + repr(diag_a) + " and " + repr(diag_b))
first = self.pixel_scale_matrix[0,0]
radians = np.arctan(diag_a / first)
degrees = radians / math.pi * 180.
return Angle(degrees, "deg")
# -----------------------------------------------------------------
评论列表
文章目录