Eclipse lunaire hier soir.
Best the camera can do.Le mieux que la caméra puisse faire.

Midnight. The color is pretty accurate. Not enough light for the camera to focus.Minuit. La couleur est assez précise. Pas assez de lumière pour que l'appareil photo fasse la mise au point.
8 sec exposureExposition de 8 secondes
Code Python appelé depuis JMP pour les calculs de phases lunaires.
// 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);
Ce code a été extrait d'un autre projet qui nécessitait une description textuelle de la phase de la lune :
line1 = "La Lune se couche plus tard aujourd'hui à 06h21 et";
line2 = "se lève plus tard aujourd'hui à 21h13";
line3 = "Pleine Lune" ;
Si vous l'utilisez, testez attentivement... ce projet n'a jamais été terminé. Je travaille tard... on dirait que la lune se couche bientôt.
Le téléphone portable est pire.
Scattered clouds at the start of the eclipse. It is already dark.Nuages épars au début de l'éclipse. Il fait déjà nuit.