DeepMoon
DeepMoon copied to clipboard
Can anyone help to explain the function estimate_longlatdiamkm
Hi, I just found there are some difference between the equation and the code in the function estimate_longlatdiamkm from get_unique_craters.py. That is , how to convert the pixel coordinate into latitude/longitude coordinate. Specifically, why there is sin and cos here.
lat_deg = lat_central - (deg_per_pix * (lat_pix - dim[1] / 2.) *
(np.pi * latdiff / 180.) /
np.sin(np.pi * latdiff / 180.))
# Determine longitude using determined latitude.
long_deg = long_central + (deg_per_pix * (long_pix - dim[0] / 2.) /
np.cos(np.pi * lat_deg / 180.))