apps130314_moon_flyby_geometry_plot.flybyhtmlΒΆ

''' Create HTML file
'''

import io as StringIO

import pyana.juice.mission_summary

moonname = {'G': 'Ganymede', 'C': 'Callisto', 'E':'Europa'}
s = StringIO.StringIO()

s.write('''
<html>
<head>
</head>
<body>
<p>
Moon flyby list during JUICE mission.
</p>
''')

s.write(
'''
<table>
''')

events = pyana.juice.mission_summary.get_label()[:-4]
for event in events:
    t = pyana.juice.mission_summary.get_datetime(event)
    s.write('''
    <td>%s</td>
    <td>%s</td>
    <td><a href="flyby-%s.html">summary_figure</a></td>
    <tr>
    ''' % (event, t, event))

    ### Create page html
    s2 = StringIO.StringIO()
    s2.write('''
    <html><head></head><body>
    <p>%s (%s)</p>
    <p>Summary plots for %s (%s). See description below.</p>
    <a href="png/flyby-%s.png"><img src="png/flyby-%s.png" width=90%%></a>
    <p>(Top left) Position of Jupiter (black dot at the origin), Galileo moons (black dots with orbits (from -12hr to +12 hr) from inside, Io, Europa, Ganymede, and Callisto).
    and JUICE orbit (-12 hr to + 12 hr in blue). JSE cooridnates is used.</p>
    <p>(Top middle) Time series of JUICE distance from the moon (%s) center for 24 hours. Horizontal line is the radius of the moon.
    <p>(Top right) Same for 2 hours.
    <p>(Bottom left) JUICE orbit centered at the moon (%s). You see it from the north.  Corotational flow
    from the left (+y; blue arrows). Magnetic field is perpendicular to the plane.  Jupiter is up (+x).
    The %s reference frame is used.
    <p>(Bottom center) JUICE orbit centered at the moon. You see it from outside toward the Jupiter.  Corotational flow
    from the left (+y; blue arrows). Jovian magnetic field lies in the plane (in z-direction).
    <p>(Bottom right) JUICE orbit centered at the moon. You see it from corotational plasma upstream.
    The blue dots depict the flow direction (toward the plane). Magnetic fields lies in the plane (in z-direction). Jupiter is left (+x).
    <p>
    <p>JSE Coordinate System is defined similar to GSE frame.  The x-axis directs from the Jupiter to the Sun.  The z-axis directs north perpendicular to the Jupiter's orbital plane.  The y-axis completes the right-hand system (almost anti-parallel to the Jupiter vecolity vector moving around the Sun).
    <p>Moon reference frame is a body-fixed frame for each moon.  As well as the Moon (our Moon), all the Galileo moons are locked to Jupiter, so that the moon reference frame is also used as a plasma related frame.  The +x axis is from the moon to Jupiter.  The +z axis is north perpendicular to the orbital plane.  The +y axis completes the right-hand system.  The moon rotation vector around Jupiter is (almost) parallel to -y axis.  The corotation flow vector is also (almost) parallel to -y.
    
    ''' % (event, t, event, t, event, event, moonname[event[0]], moonname[event[0]], moonname[event[0]], )
    )

    fp = open('html/flyby-%s.html' % event, 'w')
    print(s2.getvalue(), file=fp)
    fp.close()
    

s.write(
'''
</table>
'''
)

s.write(
'''
</body>
</html>
''')

fp = open('html/index.html', 'w')
print(s.getvalue(), file=fp)