我正在尝试实现一个非常简单的天体测量代码。我已经手动在我的照片中找到了几个星星的坐标(RA/DEC和x/y像素)。
一切似乎都是直截了当的,但我还是得到了奇怪的结果,偏离了几度。在
我正在尝试求解我拍摄的一张CCD图像的板常数,在那里我用手找到了照片中的恒星坐标和位置,现在我想尝试找到(0,0)点的真实世界坐标。在
我希望有人能帮助我的代码或告诉我如何正确地做。
提前谢谢你!在
这是我的代码:import numpy as np
import os
def astrometry(star_pos, xpix, ypix, focallength, target_RA, target_DEC):
pi = np.pi
DegToRad = pi / 180
RadToDeg = 180 / pi
n = len(star_pos)
(target_RA, target_DEC) = (target_RA, target_DEC)
print(target_RA, target_DEC)
# 1) Obtain star coordinates in pixel and RA/DEC
x_pix = [row[0] for row in star_pos]
y_pix = [row[1] for row in star_pos]
ra_star = [row[2] for row in star_pos]
dec_star = [row[3] for row in star_pos]
# 2) Calculate the standard coordinates of the stars