Example script that produces a comet finder chart

This commit is contained in:
Brandon Rhodes 2020-07-24 00:09:33 -04:00
parent d54977e7d2
commit c33b825944
5 changed files with 284 additions and 149 deletions

88
ci/constellationship.fab Normal file
View File

@ -0,0 +1,88 @@
And 20 677 3092 3092 5447 5447 9640 113726 116631 116631 116805 116805 116584 116584 116805 116805 116631 116631 1473 1473 2912 2912 3092 3092 2912 2912 5447 5447 4436 4436 3881 3881 5434 5434 7607 3092 3031 3031 3693 3693 4463
Ant 2 53502 51172 51172 46515
Aps 3 72370 81065 80047 81852 81852 81065
Aql 14 98036 97649 97649 97278 97278 95501 95501 93805 93805 95501 95501 93747 93747 95501 95501 97804 97804 99473 93244 93747 93805 93429 99473 96468 96468 93805 93805 93747
Aqr 21 102618 106278 106278 109074 109074 110395 110395 110960 110960 111497 111497 110960 110960 110672 110672 109074 109139 106278 106278 109074 109074 110003 110003 112961 112961 114724 114724 115033 115033 115438 115438 115033 115033 114341 114341 115033 115033 113136 113136 112716 112716 112961
Ara 8 85267 85727 85727 82363 82363 83081 83081 83153 83153 85792 85792 88714 88714 85792 85792 85258
Ari 3 8832 8903 8903 9884 9884 13209
Aur 11 25428 23015 23015 23767 23767 24608 24608 28360 28360 28380 28380 25428 23767 23453 23453 23416 23416 24608 24608 28358 28358 28360
Boo 13 69673 72105 72105 74666 74666 73555 73555 71075 71075 71053 71053 69673 69673 67927 67927 67275 69673 71795 71075 69732 69732 70497 70497 69483 69483 69732
CMa 12 30324 32349 32349 34444 34444 33579 33579 34444 34444 35904 30324 31592 31592 33152 33152 33579 32349 33347 33347 34045 34045 33160 33160 33347
CMi 1 37279 36188
CVn 1 63125 61317
Cae 3 23595 21861 21861 21770 21770 21060
Cam 9 23040 23522 23522 22783 22783 29997 29997 33694 33694 29997 29997 22783 22783 17959 17959 17884 17884 16228
Cap 9 100064 100345 100345 102485 102485 102978 102978 105881 105881 106723 106723 107556 107556 106985 106985 104139 104139 100064
Car 15 30438 45238 45238 50099 50099 52419 52419 51576 51576 50371 50371 45556 45556 42913 51576 53253 52419 54301 54301 54751 54751 54463 54463 53253 45556 41037 41037 38827 38827 39953
Cas 4 746 3179 3179 4427 4427 6686 6686 8886
Cen 27 61932 66657 66657 68702 68702 71683 71683 68702 68702 66657 66657 68002 68002 61932 61932 68002 68002 68282 68282 68245 68245 71352 71352 68245 68245 68862 68862 70090 70090 68933 68933 67464 67464 68002 55425 59196 59196 60823 60823 61932 61932 60823 60823 59449 59449 56243 67464 65936 65936 65109 65109 61789 71352 73334
Cep 12 102422 105199 105199 106032 106032 112724 112724 106032 106032 116727 116727 112724 112724 110991 110991 109492 109492 109857 109857 107259 107259 105199 101093 102422
Cet 14 12706 14135 14135 13954 13954 12828 12828 11484 11484 12706 12706 12387 12387 10826 10826 8645 8645 8102 8102 3419 3419 1562 1562 5364 5364 6537 6537 8645
Cha 5 40702 51839 51839 52633 52633 60000 60000 58484 58484 51839
Cir 2 74824 71908 71908 75323
Cnc 5 44066 42911 42911 40526 40526 42911 42911 42806 42806 43103
Col 5 26634 27628 25859 26634 28328 27628 27628 28199 28199 30277
Com 3 64241 64241 64241 64394 64394 60742
CrA 4 93825 94114 94114 94160 94160 94005 94005 90982
CrB 6 76127 75695 75695 76267 76267 76952 76952 77512 77512 78159 78159 78493
Crt 12 53740 54682 54682 55705 55705 57283 57283 58188 58188 57283 57283 55705 55705 55282 55282 55687 55687 56633 56633 55687 55687 55282 55282 53740
Cru 3 60718 61084 62434 59747 62434 59747
Crv 5 60965 59803 59803 59316 59316 61359 61359 60965 59316 59199
Cyg 14 102098 100453 100453 102488 102488 100453 100453 95947 95947 100453 100453 97165 97165 95853 95853 94779 94779 95853 95853 99848 99848 102098 102098 103413 103413 104732 104732 102488
Del 5 101421 101769 101769 101958 101958 102532 102532 102281 102281 101769
Dor 8 19893 21281 21281 23693 23693 26069 26069 21281 21281 26069 26069 27100 27100 27890 27890 26069
Dra 18 56211 61281 61281 68756 68756 75458 75458 78527 78527 80331 80331 83895 83895 89908 89908 89937 89937 89908 89908 94376 94376 97433 97433 94376 94376 87585 87585 85829 85829 85670 85670 87833 87833 87585 87585 94376
Equ 2 104987 104858 104858 104521
Eri 31 23875 22109 22109 21444 21444 19587 19587 18543 18543 17593 17593 17378 17378 16537 16537 13701 13701 12770 12770 12770 12770 12843 12843 14146 14146 15474 15474 16611 16611 17651 17651 18216 18216 18673 18673 21248 21248 21393 21393 20535 20535 20042 20042 17874 17874 17874 17874 16870 16870 15510 15510 13847 13847 12486 12486 12413 12413 11407 11407 9007 9007 7588
For 2 14879 13147 13147 9677
Gem 23 32362 35350 35350 35550 35550 34088 34088 31681 31681 34088 34088 35550 35550 36962 36962 37740 37740 36962 36962 37826 37826 36962 36962 36046 36046 34693 34693 36850 36850 34693 34693 33018 33018 34693 34693 32246 32246 30883 30883 32246 32246 30343 30343 29655 29655 28734
Gru 8 108085 109111 109111 110997 110997 109268 109268 112122 112122 110997 110997 112122 112122 112623 112623 113638
Her 29 84379 84345 84345 80816 80816 80170 80170 80816 80816 81693 81693 83207 83207 81693 81693 81833 81833 81126 81126 79992 79992 81126 81126 81833 81833 84380 84380 85112 85112 87808 87808 86414 86414 87808 87808 85112 85112 84380 84380 83207 83207 84379 84379 85693 85693 86974 86974 87933 87933 88794 77760 79101 79101 79992 80170 80463 80463 81008
Hor 5 19747 12653 12653 12225 12225 12484 12484 14240 14240 13884
Hya 19 43234 42799 42799 42402 42402 42313 42313 43109 43109 43813 43813 45336 45336 47431 47431 46390 46390 48356 48356 49402 49402 49841 49841 51069 51069 52943 52943 53740 54682 56343 56343 57936 57936 64962 64962 68895 68895 72571
Hyi 4 2021 17678 17678 11001 11001 9236 9236 2021
Ind 5 103227 102333 102333 101772 101772 105319 105319 108431 108431 103227
LMi 5 46952 49593 49593 51233 51233 53229 53229 51056 51056 49593
Lac 14 111022 111169 111169 110538 110538 110609 110609 111022 111022 110351 110351 111104 111104 111944 111944 111104 111104 111944 111944 111022 111022 111944 111944 111104 111104 109754 109754 109937
Leo 17 49669 49583 49583 50583 50583 50335 50335 48455 48455 47908 50583 54872 54872 57632 57632 54879 54879 54872 54872 54879 54879 49583 48455 46146 46146 46750 46750 47908 47908 49583 54879 55642 55642 55434
Lep 12 23685 24305 24305 25985 25985 25606 25606 23685 24845 24305 24305 24327 25606 27072 27072 27654 27654 28910 28910 28103 28103 27288 27288 25985
Lib 7 72622 74785 72622 73714 74785 76333 76333 72622 72622 76333 76333 76470 76470 76600
Lup 12 71860 74395 74395 75264 75264 76297 76297 75141 75141 73273 73273 75141 75141 76297 76297 78384 78384 75177 75177 77634 77634 78384 78384 74395
Lyn 7 45860 45688 45688 44700 44700 44248 44248 41075 41075 36145 36145 33449 33449 30060
Lyr 8 91262 91919 91919 91971 91971 91262 91262 91971 91971 92791 92791 93194 93194 92420 92420 91971
Men 1 26264 26264
Mic 1 103882 103882
Mon 13 31978 31216 31216 30419 30419 30419 30419 32578 32578 31216 31216 32578 32578 34769 34769 30867 30867 29651 29651 30867 30867 34769 34769 39863 39863 37447
Mus 6 57363 59929 59929 61585 61585 62322 62322 63613 63613 61199 61199 61585
Nor 4 78639 80000 80000 80582 80582 78914 78914 78639
Oct 3 70638 107089 107089 112405 112405 70638
Oph 25 86032 83000 83000 80883 80883 79593 79593 79882 79882 80628 80628 81377 81377 80628 80628 79882 79882 79593 79593 80883 80883 83000 83000 81377 81377 84012 84012 86742 86742 87108 87108 88048 88048 87108 87108 86742 86742 86032 84012 84970 84970 85423 81377 80894 80894 80569 80569 80343 80343 80473
Ori 27 27989 26727 26727 27366 27366 26727 26727 26311 26311 25930 25930 25336 25336 25930 25930 25281 25281 24436 27989 25336 25336 26207 26207 26207 26207 27989 23607 22957 22957 22845 22845 22509 22509 22449 22449 25336 25336 22449 22449 22549 22549 22797 22797 23123 27989 28614 28614 29038 29426 28716 28716 27913 27913 29038
Pav 14 100751 99240 99240 102395 100751 105858 105858 102395 91792 99240 99240 98495 98495 99240 99240 93015 93015 88866 88866 86929 86929 88866 88866 90098 90098 92609 92609 99240
Peg 13 109410 112158 112158 113881 113881 112748 112748 112440 112440 109176 109176 107354 677 113881 113881 113963 113963 1067 1067 677 107315 109427 109427 112029 112029 113963
Per 24 17448 18246 18246 18614 18614 18532 18532 17358 17358 15863 15863 14328 14328 13268 13268 13531 13531 14328 14328 13531 13531 14632 14632 15863 15863 14632 14632 14668 14668 14576 14576 18532 18532 14576 14576 14354 17358 19343 19343 19812 19812 20070 20070 19167 14632 12777 12777 8068
Phe 7 2081 5165 5165 6867 2081 765 765 5165 5165 5348 5348 7083 7083 6867
Pic 2 32607 27530 27530 27321
PsA 9 113368 113246 113246 112948 112948 111188 111188 109285 109285 107380 107380 107608 107608 109285 109285 111954 111954 113368
Psc 16 5742 6193 6193 5586 5586 5742 5742 7097 7097 8198 8198 9487 9487 7884 7884 4906 4906 3786 3786 118268 118268 116771 116771 115830 115830 114971 114971 115738 115738 116928 116928 116771
Pup 11 39953 39429 39429 39757 39757 38170 38170 37229 37229 36917 36917 35264 35264 31685 31685 30953 36917 37677 37677 38070 38070 38170
Pyx 3 39429 42515 42515 42828 42828 43409
Ret 4 19780 17440 17440 18597 18597 19921 19921 19780
Scl 3 4577 117452 117452 115102 115102 116231
Sco 18 78820 78401 78401 78265 78265 78401 78401 80112 80112 80763 80763 81266 81266 82396 82396 82514 82514 82729 82729 84143 84143 86228 86228 87073 87073 86670 86670 85696 85696 85927 85927 87261 78820 79374 78265 78104
Sct 4 92175 91117 91117 90595 90595 91726 91726 92175
Ser 13 77233 78072 78072 77450 77450 76852 76852 77233 77233 76276 76276 77070 77070 77622 77622 77516 77516 79593 84012 86263 86263 88048 88048 89962 89962 92946
Sex 3 48437 49641 49641 51437 51437 51362
Sge 4 98337 97365 97365 96757 96757 97365 97365 96837
Sgr 20 90185 88635 88635 89931 89931 90185 90185 89931 89931 90496 90496 92041 92041 89931 89931 92041 92041 92855 92855 93864 93864 93506 93506 92041 92041 93506 93506 90185 90185 89642 90496 89341 95168 94141 94141 93683 93683 93085 93085 94141
Tau 10 26451 21421 21421 20894 20894 20205 20205 20455 20455 20889 20889 25428 16083 18907 15900 16852 20205 18724 18724 16083
Tel 2 89112 90422 90422 90568
TrA 4 82273 77952 77952 76440 76440 74946 74946 82273
Tri 3 8796 10064 10064 10670 10670 8796
Tuc 6 2484 1599 1599 118322 118322 110838 110838 110130 110130 114996 114996 2484
UMa 26 58001 57399 57399 54539 54539 50801 50801 50372 50372 50801 50801 54539 54539 57399 57399 55219 55219 55302 59774 54061 54061 53910 53910 58001 58001 59774 59774 62956 62956 65378 65378 67301 54061 46733 46733 48319 48319 46733 46733 41704 41704 48319 48319 53910 53910 48319 48319 46853 46853 44471 44471 44127
UMi 7 11767 85822 85822 82080 82080 77055 77055 79822 79822 75097 75097 72607 72607 77055
Vel 8 42913 39953 39953 44816 44816 46651 46651 50191 50191 52727 52727 48774 48774 45941 45941 42913
Vir 20 60129 58948 58948 57380 57380 57757 57757 60129 60129 61941 61941 63090 63090 63608 63608 63090 63090 61941 61941 64238 64238 65474 65474 64238 64238 61941 61941 66249 66249 68520 68520 72220 72220 68520 68520 66249 66249 69701 69701 71957
Vol 6 44382 41312 41312 39794 39794 35228 35228 34481 34481 39794 39794 44382
Vul 1 95771 97886

View File

@ -0,0 +1,127 @@
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from matplotlib.collections import LineCollection
from skyfield import api
from skyfield.api import Star, load, tau
from skyfield.constants import GM_SUN_Pitjeva_2005_km3_s2 as GM_SUN
from skyfield.data import hipparcos, mpc, stellarium
from skyfield.projections import build_stereographic_projection
# The comet is plotted on several dates `t_comet`. But the stars only
# need to be drawn once, so we take the middle comet date as the single
# time `t` we use for everything else.
ts = load.timescale(builtin=True)
t_comet = ts.utc(2020, 7, range(17, 27))
t = t_comet[len(t_comet) // 2] # middle date
# An ephemeris from the JPL provides Sun and Earth positions.
eph = load('de421.bsp')
sun = eph['sun']
earth = eph['earth']
# The Minor Planet Center data file provides the comet orbit.
with load.open(mpc.COMET_URL) as f:
comets = mpc.load_comets_dataframe(f)
comets = comets.set_index('designation', drop=False)
row = comets.loc['C/2020 F3 (NEOWISE)']
comet = sun + mpc.comet_orbit(row, ts, GM_SUN)
# The Hipparcos mission provides our star catalog.
with load.open(hipparcos.URL) as f:
stars = hipparcos.load_dataframe(f)
# And the constellation outlines come from Stellarium. We make a list
# of the stars at which each edge stars, and the star at which each edge
# ends.
url = ('https://raw.githubusercontent.com/Stellarium/stellarium/master'
'/skycultures/western_SnT/constellationship.fab')
with load.open(url) as f:
constellations = stellarium.parse_constellations(f)
edges = [edge for name, edges in constellations for edge in edges]
edges_star1 = [star1 for star1, star2 in edges]
edges_star2 = [star2 for star1, star2 in edges]
# We will center the chart on the comet's middle position.
center = earth.at(t).observe(comet)
projection = build_stereographic_projection(center)
field_of_view_degrees = 45.0
limiting_magnitude = 7.0
# Now that we have constructed our projection, compute the x and y
# coordinates that each star and the comet will have on the plot.
star_positions = earth.at(t).observe(Star.from_dataframe(stars))
stars['x'], stars['y'] = projection(star_positions)
comet_x, comet_y = projection(earth.at(t_comet).observe(comet))
# Create a True/False mask marking the stars bright enough to be
# included in our plot. And go ahead and compute how large their
# markers will be on the plot.
bright_stars = (stars.magnitude <= limiting_magnitude)
magnitude = stars['magnitude'][bright_stars]
marker_size = (0.5 + limiting_magnitude - magnitude) ** 2.0
# The constellation lines will each begin at the x,y of one star and end
# at the x,y of another. We have to "rollaxis" the resulting coordinate
# array into the shape that matplotlib expects.
xy1 = stars[['x', 'y']].loc[edges_star1].values
xy2 = stars[['x', 'y']].loc[edges_star2].values
lines_xy = np.rollaxis(np.array([xy1, xy2]), 1)
# Time to build the figure!
fig, ax = plt.subplots(figsize=[9, 9])
# Draw the constellation lines.
ax.add_collection(LineCollection(lines_xy, colors='#00f2'))
# Draw the stars.
ax.scatter(stars['x'][bright_stars], stars['y'][bright_stars],
s=marker_size, color='k')
# Draw the comet positions, and label them with dates.
comet_color = '#f00'
offset = 0.002
ax.plot(comet_x, comet_y, '+', c=comet_color, zorder=3)
for xi, yi, tstr in zip(comet_x, comet_y, t_comet.utc_strftime('%-m/%d')):
text = ax.text(xi + offset, yi - offset, tstr, color=comet_color,
ha='left', va='top', fontsize=9, weight='bold', zorder=-1)
text.set_alpha(0.5)
# Finally, title the plot and set some final parameters.
angle = np.pi - field_of_view_degrees / 360.0 * np.pi
limit = np.sin(angle) / (1.0 - np.cos(angle))
ax.set_xlim(-limit, limit)
ax.set_ylim(-limit, limit)
ax.xaxis.set_visible(False)
ax.yaxis.set_visible(False)
ax.set_aspect(1.0)
ax.set_title('Comet NEOWISE {} through {}'.format(
t_comet[0].utc_strftime('%Y %B %d'),
t_comet[-1].utc_strftime('%Y %B %d'),
))
# Save.
fig.savefig('neowise-finder-chart.png', bbox_inches='tight')

View File

@ -0,0 +1,31 @@
"""Parse Stellarium data files."""
def parse_constellations(lines):
"""Return a list of constellation outlines.
Each constellation outline is a list of edges, each of which is
drawn between a pair of specific stars::
[
(name, [(star1, star2), (star3, star4), ...]),
(name, [(star1, star2), (star3, star4), ...]),
...
]
Each name is a 3-letter constellation abbreviation; each star is an
integer Hipparcos catalog number.
"""
constellations = []
for line in lines:
line = line.lstrip()
if line.startswith(b'#'):
continue
fields = line.split()
if not fields:
continue
name = fields[0]
edges = [(int(fields[i]), int(fields[i+1]))
for i in range(2, len(fields), 2)]
constellations.append((name.decode('utf-8'), edges))
return constellations

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -6,173 +6,64 @@
This section of the documentation
will gradually accumulate example scripts
for producing images from Skyfield computations.
For the moment theres only example so far,
for plotting the elevation of a satellite over time:
For now there are two:
Finder chart for comet NEOWISE
==============================
Here is a stand-alone script
that brings together four different data sources —
a planetary ephemeris, a comet orbit database, a large star catalog,
and constellation diagrams —
to plot the course of Comet NEOWISE across Ursa Major
over one week of July 2020:
.. image:: _static/neowise-finder-chart.png
.. testsetup::
import matplotlib
matplotlib.use('Agg') # to avoid “no display name” error on Travis CI
del matplotlib
.. testcode::
import sys
sys.path[0:0] = ['../../examples']
import comet_neowise_chart
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
Its code includes many design decisions and presentation tweaks
that you will probably want to adjust for your own project.
Use the script as a starting point:
from skyfield import api
from skyfield.api import load
ts = load.timescale(builtin=True)
eph = load('de421.bsp')
sun = eph['sun']
earth = eph['earth']
# In[3]:
t_comet = ts.utc(2020, 7, range(17, 27))
t = t_comet[len(t_comet) // 2] # middle date
# In[4]:
from skyfield.data import mpc
with load.open(mpc.COMET_URL) as f:
comets = mpc.load_comets_dataframe(f)
comets = comets.set_index('designation', drop=False)
row = comets.loc['C/2020 F3 (NEOWISE)']
# In[5]:
from skyfield.constants import GM_SUN_Pitjeva_2005_km3_s2 as GM_SUN
comet = sun + mpc.comet_orbit(row, ts, GM_SUN)
center = earth.at(t).observe(comet)
# In[6]:
from skyfield.api import Star
from skyfield.data import hipparcos
# In[53]:
from skyfield.projections import build_stereographic_projection
proj = build_stereographic_projection(center)
# In[54]:
with load.open(hipparcos.URL) as f:
stars = hipparcos.load_dataframe(f)
# In[55]:
star_positions = earth.at(t).observe(Star.from_dataframe(stars))
stars['x'], stars['y'] = proj(star_positions)
# In[56]:
limiting_magnitude = 6.5
bright_stars = (stars.magnitude <= limiting_magnitude)
# In[57]:
comet_x, comet_y = proj(earth.at(t_comet).observe(comet))
# In[98]:
# = 'https://raw.githubusercontent.com/Stellarium/stellarium/master/skycultures/western_SnT/constellationship.fab'
from skyfield.data.stellarium import parse_constellations
url = 'https://raw.githubusercontent.com/Stellarium/stellarium/master/skycultures/western_SnT/constellationship.fab'
with load.open(url) as f:
constellations = parse_constellations(f)
edges_star1 = [star1 for name, edges in constellations for star1, star2 in edges]
edges_star2 = [star2 for name, edges in constellations for star1, star2 in edges]
np.array([stars['x'].loc[edges_star1], stars['y'].loc[edges_star1]])
xy1 = stars[['x', 'y']].loc[edges_star1].values
xy2 = stars[['x', 'y']].loc[edges_star2].values
lines_xy = np.rollaxis(np.array([xy1, xy2]), 1)
# In[94]:
fig, ax = plt.subplots(figsize=[9, 9])
from matplotlib.collections import LineCollection
from skyfield.api import tau
field_of_view_degrees = 45.0
line_collection = LineCollection(lines_xy) #, color=['#0002'] * len(lines_xy))
ax.add_collection(line_collection)
marker_size = (0.5 + limiting_magnitude - stars.magnitude[bright_stars]) ** 2.0
ax.scatter(stars['x'][bright_stars], stars['y'][bright_stars], s=marker_size, color='k')
#ax.scatter(comet_x, comet_y, s=100, color='b')
#comet_color = '#f00'
#ax.plot(comet_x, comet_y, '+', c=comet_color, zorder=3)
ax.plot(comet_x, comet_y, '+', zorder=3)
offset = 0.002
for xi, yi, tstr in zip(comet_x, comet_y, t_comet.utc_strftime('%-m/%d')):
#text = ax.text(xi + offset, yi - offset, tstr, color=comet_color, ha='left', va='top', fontsize=12,
text = ax.text(xi + offset, yi - offset, tstr, ha='left', va='top', fontsize=12,
weight='bold')
text.set_alpha(0.3)
ax.set_title('Comet NEOWISE {} through {}'.format(
t_comet[0].utc_strftime('%Y %B %d'),
t_comet[-1].utc_strftime('%Y %B %d'),
))
ax.set_aspect(1.0)
ax.xaxis.set_visible(False)
ax.yaxis.set_visible(False)
angle = (180.0 - field_of_view_degrees) / 720.0 * tau
limit = np.sin(angle) / (1.0 - np.cos(angle))
ax.set_xlim(-limit, limit)
ax.set_ylim(-limit, limit)
fig.savefig('neowise-finder-chart.png')
.. image:: _static/neowise-finder-chart.png
.. include:: ../../examples/comet_neowise_chart.py
:literal:
.. testcleanup::
import os
os.rename('neowise-finder-chart.png', '_static/neowise-finder-chart.png')
If you choose a different rendering engine
instead of the venerable but rather ornery and complicated
`matplotlib <https://matplotlib.org/>`_,
then of course the plotting calls you make
will be completely different.
But the basic data loading and filtering will be the same,
so hopefully the script will still help get you started
in targeting a more modern plotting library.
Satellite altitude during re-entry
==================================
Here is the decreasing altitude of a satellite as its orbit decayed
and it re-entered the atmosphere above the Pacific Ocean:
.. image:: _static/goce-reentry.png
The code to produce the diagram
using `matplotlib <https://matplotlib.org/>`_,
including custom tick marks that are based on the date,
is:
.. testcode::
from matplotlib import pyplot as plt
@ -228,9 +119,7 @@ Satellite altitude during re-entry
# Render the plot to a PNG file.
fig.savefig('goce-reentry.png')
.. image:: _static/goce-reentry.png
fig.savefig('goce-reentry.png', bbox_inches='tight')
.. testcleanup::