关于python:python-计算天顶角

40次阅读

共计 419 个字符,预计需要花费 2 分钟才能阅读完成。

from astral import sun
import pytz
import math
city = LocationInfo(“Hefei”, “China”, “Asia/Shanghai”, 31.798172,117.116531)
print((

f"Information for {city.name}/{city.region}\n"
f"Timezone: {city.timezone}\n"
f"Latitude: {city.latitude:.02f}; Longitude: {city.longitude:.02f}\n"

))
test=[t.replace(tzinfo=pytz.timezone(‘Asia/Shanghai’)) for t in obsdata[date_str].index]

zenith=[sun.zenith(city,i,False) for i in test]
now=datetime.now()
now.tzinfo==None

正文完
 0