# Solar eclipses on other planets

Posted 6 years ago
14420 Views
|
5 Replies
|
19 Total Likes
|
 Here is some analysis of eclipses on other planets. We want to compare the angular diameter of the Sun to the angular diameter of the moon in question, when observed from the "surface" of the planet in question. angularDiameterSun[entity_] := angularDiameterSun[entity] = Quantity[SetPrecision[ArcTan[StarData["Sun", "Diameter"]/ PlanetData[PlanetaryMoonData[entity, "OrbitCenter"], "DistanceFromSun"]]/Degree, 2], "AngularDegree"] We use the semimajor axis of the moon's orbit as an estimate of the moon's distance from its host planet: angularDiameterMoon[entity_] := angularDiameterMoon[entity] = With[{data = PlanetaryMoonData[ entity, {"Diameter", "SemimajorAxis", "OrbitCenter"}]}, If[QuantityQ[#[[1]]], Quantity[SetPrecision[ArcTan[#[[1]]/(#[[2]] - PlanetData[#[[3]], "Radius"])]/Degree, 2], "AngularDegree"], #[[1]]] & /@ data] coverageratio[entity_] := If[QuantityQ[#[[1]]], #[[1]]/#[[2]], #[[1]]] & /@ Transpose[{angularDiameterMoon[entity], angularDiameterSun[entity]}] Here, we generate a grid showing that the ratio of the angular diameter of the Moon to the Sun is essentially 1. So, the Moon just basically covers the Sun during an eclipse. With[{ents = EntityList[EntityClass["PlanetaryMoon", "EarthMoon"]]}, With[{list = Reverse@SortBy[ Transpose[{ents, angularDiameterSun[ents], angularDiameterMoon[ents], coverageratio[ents]}], #[[4]] &]}, Grid[Prepend[TakeLargestBy[list, #[[4]] &, Min[Length[list], 10]], Text /@ {"moon", "Sun angular diameter", "moon angular diameter", "ratio"}], Dividers -> All]]] Mars only has 2 moons. Phobos, the larger of the 2, covers about 60% of the Sun during an eclipse: With[{ents = EntityList[EntityClass["PlanetaryMoon", "MarsMoon"]]}, With[{list = Reverse@SortBy[ Transpose[{ents, angularDiameterSun[ents], angularDiameterMoon[ents], coverageratio[ents]}], #[[4]] &]}, Grid[Prepend[TakeLargestBy[list, #[[4]] &, Min[Length[list], 10]], Text /@ {"moon", "Sun angular diameter", "moon angular diameter", "ratio"}], Dividers -> All]]] And for Jupiter we have: With[{ents = EntityList[EntityClass["PlanetaryMoon", "JupiterMoon"]]}, With[{list = Reverse@SortBy[ Transpose[{ents, angularDiameterSun[ents], angularDiameterMoon[ents], coverageratio[ents]}], #[[4]] &]}, Grid[Prepend[TakeLargestBy[list, #[[4]] &, Min[Length[list], 10]], Text /@ {"moon", "Sun angular diameter", "moon angular diameter", "ratio"}], Dividers -> All]]] 
5 Replies
Sort By:
Posted 6 years ago
 I should add that if you are not using Mathematica 10.1, you might have additional problems with the presented code. It makes use of:http://reference.wolfram.com/language/ref/TakeLargestBy.htmlIf you have an older 10.0 or even earlier, this code won't work without modification.
Posted 6 years ago
 Your comments are not entirely clear. The issue with supporting dates is a known recent problem dealing with how dates are exposed via EntityValue (used by StarData and PlanetaryMoonData under-the-hood). Its more general and doesn't affect the Alpha website, its only in the exposed data that the problem presents. It was fixed this morning internally but will take some time to be tested before being pushed out since the fix touches a number of components. It would be better to report such issues to support@wolfram.com since that is a more appropriate forum for reporting and tracking issues.
Posted 6 years ago
 Hello, I found that planetaryMoonData & StaData not function as before. Two days ago, they still work correctly. Now they can not accept "moon", "star". The code example from wolfram Language Documentation PlanetaryMoonData Scope now can not accept date object. moon now must use entityClass as the code you post here. Could you find out what is going on?