昨晚發生月食。
Best the camera can do.相機能做到的最好的。

Midnight. The color is pretty accurate. Not enough light for the camera to focus.午夜。 顏色相當準確。 光線不足,相機無法對焦。
8 sec exposure8秒曝光
從 JMP 呼叫 Python 程式碼進行月相計算。
// python -m pip install pylunar
Python Init(); // one-time startup...
// 0: startup
xrc = Python Execute( {},
{rc},
"\[
try:
import pylunar,datetime
def timeFromRST(rst):
# print(rst,isinstance(rst,str))
if isinstance(rst,str):
rst = (1,1,1,1,1,1)
return datetime.datetime(*rst)
rc = "ok"
except Exception as e:
rc = repr(e)
]\"
);
If( xrc != 0 | rc != "ok", Throw( "start up pylunar failed" || Try( ": " || Char( rc ), "" ) ) );
xrc = Python Execute( {},
{rc,line1,line2,line3},
"\[
try:
localnow = datetime.datetime.now()
mi = pylunar.MoonInfo((35, 45, 0), (-78, 40, 0)) # about my location degrees/minutes/seconds
utc = datetime.datetime.utcnow()
mi.update(utc) # find the answer for right now
todayRST = mi.rise_set_times('America/New_York')
mi.update(utc + datetime.timedelta(days=1)) # find the answer 24 hours from now
tomorrowRST = mi.rise_set_times('America/New_York')
mi.update(utc) # put it back, not finished with today yet
moonTransit=-1
moonSet=-1
moonRise=-1
for earlyRST in todayRST:
if earlyRST[0]=="transit":
moonTransit = timeFromRST(earlyRST[1])
elif earlyRST[0]=="rise":
moonRise = timeFromRST(earlyRST[1])
elif earlyRST[0]=="set":
moonSet = timeFromRST(earlyRST[1])
else:
print("BUMMER 1*********************")
stop()
for lateRST in tomorrowRST:
if lateRST[0]=="transit":
if moonTransit < localnow:
moonTransit = timeFromRST(lateRST[1])
elif lateRST[0]=="rise":
if moonRise < localnow:
moonRise = timeFromRST(lateRST[1])
elif lateRST[0]=="set":
if moonSet < localnow:
moonSet = timeFromRST(lateRST[1])
else:
print("BUMMER 2*********************")
stop()
if moonRise.day==localnow.day:
riseday="later today"
else:
riseday="tomorrow"
if moonSet.day==localnow.day:
setday="later today"
else:
setday="tomorrow"
if moonRise < moonSet :
line1="The Moon rises "+riseday+" at "+moonRise.strftime("%I:%M %p")+" and"
line2="sets "+setday+" at "+moonSet.strftime("%I:%M %p")
else:
line1="The Moon sets "+setday+" at "+moonSet.strftime("%I:%M %p")+" and"
line2="rises "+riseday+" at "+moonRise.strftime("%I:%M %p")
line3=mi.phase_name().replace("_"," ").title()
rc = "ok"
except Exception as e:
rc = repr(e)
]\"
);
show(rc,line1,line2,line3);
該程式碼是從另一個需要月相文字描述的項目中刪除的:
line1 = "月亮在今天早上 06:21 落下並且";
line2 = "今天晚些時候 09:13 PM 升起";
line3 = "滿月";
如果您使用它,請仔細測試...該項目從未完成。 我工作到很晚了……看來月亮快落山了。
手機就更差了。
Scattered clouds at the start of the eclipse. It is already dark.日食開始時雲層分散。 天已經黑了。