\documentclass{article}[12pt]
\usepackage{votutorial}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{subcaption}
\usepackage{bigfoot}
\usepackage[all]{hypcap}  %navigate to TOP of figure by clicking on ref

\title{The Asteroids}
\author{Markus Demleitner, Lucas Ethington, Sonja Gabriel, 
  Florian Freistetter, \\
   Chuanming Mao}
\titlepicture{../res/ErosTitlepic.jpg}
\newcommand{\AU}{\textrm{AU}}

\begin{document}
\maketitle

\begin{abstract}
In this tutorial you will learn about asteroids, a very
interesting and current topic in our exploration of the Solar System and
of planetary formation. You will learn about their orbital characteristics
by querying a database.

Intermediate computer skills are recommended, 
as the tutorial requires the (guided) query of online electronic 
databases and use of histograms.

\end{abstract}

%\usedsoftware{\Topcat}

\section{Asteroids in the Solar System}

Planets aren't the only things orbiting our sun. Besides the planets
there are many asteroids - leftovers from the time of planetary
formation.

Our sun was initially surrounded by a large disk of dust and gas. Over
time the particles in this disk collided with each other and began to
form progressively larger objects, eventually creating the planets we
know today. However, not all the material was used to form planets.

No large planets formed in the outermost regions of the Solar System,
and Jupiter halted further planet formation in the inner Solar System
with its enormous gravitational influence.

In 1801, the astronomer Giuseppe Piazzi observed a moving star-like object.
At first, it was thought a new planet between Mars
and Jupiter has been found, though as more and more objects were found in
that general region of space, it became evident astronomers were dealing with a
different class of body, later designated as ``planetoids'' or
``asteroids''.

Today, we have discovered hundreds of thousands of asteroids between
the orbits of Mars and Jupiter, forming the so called ``Main (Asteroid)
Belt''.

The main belt, however, is not the only place asteroids can be
found. In 1992, an asteroid with an orbit outside that of Neptune was
discovered. It was the first object of the ``Kuiper Belt'', a much larger
collection of asteroids than even the main belt.

Following the dynamic interactions between planets and asteroids,
several asteroids were scattered away from their respective ``belts''.
As a result, asteroids can be discovered just about anywhere in the Solar system. 

\begin{figure}[ht] 
	\center{\includegraphics[scale=1.5]{../res/Inner_solar_system_objects_top_view_for_wiki.png}}
	\caption{Graphic \href{https://commons.wikimedia.org/wiki/File:Inner_solar_system_objects_top_view_for_wiki.png}
	{A top view of asteroid group location in the inner Solar system}
	by \href{https://commons.wikimedia.org/wiki/User:Unmismoobjetivo}
	{Pablo Carlos Budassi} / \href{https://commons.wikimedia.org/wiki/Category:CC-BY-SA-4.0}{CC-BY-SA-4.0}}
	\label{fig:asteroids}
\end{figure}


All data concerning asteroids are administrated by 
the Minor Planet
Center\footnote{\url{https://www.minorplanetcenter.net/iau/mpc.html}}
(MPC) of the International Astronomical Union (IAU). They
archive and analyze all observations of asteroids, using the data to
calculate their orbits and publish them for the scientific community.
The IAU also decides how the asteroids are named.

The large MPC database can be accessed via the Virtual
Observatory, which makes it possible to learn about the basic properties of
asteroids.





\section{The MPC Database}



The complete MPC database can be queried with different techniques in
the data centre of the German Virtual Observatory (GAVO).
The web form \url{http://dc.zah.uni-heidelberg.de/mpc/q/pla/form} at can
be used to search the database with the most commonly used
parameters. These include the orbital elements, the values describing
the position and shape of the asteroids orbit.

Let us have a look at what orbital elements the MPC planetoid database
uses.

The \textbf{semimajor axis} is defined as
half the longest diameter of an elliptical
orbit. In other words, it represents an estimate of the ``size'' of the
orbit; see Figure \ref{fig:smajax} for an illustration.
The unit used to measure the semimajor axis is the Astronomical Unit \AU{}, 
which used to be defined as semimajor axis of the Earth's Orbit. While
in 2012 the astronomers decided to give it a fixed value\footnote{The
Earth's orbit slightly ``wobbles'' over time, and so does its major
axis, so before 2012 the AU could change, which is not a good thing for
a unit.}, it is still right to think of ``approximate radius of the Earth
orbit'' when reading \AU.

\begin{figure}[ht] 
	\center{\includegraphics[scale=0.4]{../res/semimajoraxis.png}}
	\caption{semimajor axis}
	\label{fig:smajax}
\end{figure}

The measured \textbf{eccentricity} $e$ of the orbit is defined as the deviation from a perfect
circle, and has a value between 0 and 1, where 0 describes a
perfect circle. An orbit with a value greater than 1 means the asteroid is leaving the 
Solar System, which is why you will not find anything like that in the database.

The semimajor axis and eccentricity give information about size and
shape of the orbit.  However, we do not yet know about the
location and orientation of the orbit. To define these, three angles are needed.

The first angle is the \textbf{inclination} $i$. It describes the relative
inclination of an orbits plane relative to the ecliptic plane. The ecliptic is
the reference plane we use in our Solar System and it corresponds to the
average orbital plane of the Earth. This is sketched in Figure
\ref{fig:incl}.

\begin{figure}[ht] 
	\center{\includegraphics[scale=1.5]{../res/OrbitalPlanesUno.png}}
	\caption{Inclination}
	\label{fig:incl}
\end{figure}

The \textbf{longitude of the ascending node} $\Omega$ is  the second angle (see Figure 
\ref{fig:ascnode}). The point
where the orbit passes the plane of the Earth's orbit (the ecliptic)
from north to south is
called the descending node, where it crosses from south to north is
called the ascending node. The value of the longitude of the ascending
node is the angle between the lines connecting the sun with the vernal
point and the ascending node.
This vernal point technically is where the celestial equator and the
ecliptic intersect; in practical terms, it is what astronomers agreed
upon as the equivalent of Greenwich on the sky, the point from where to
count longitudes.


\begin{figure}[ht] 
	\center{\includegraphics[scale=1.5]{../res/OrbitalPlanesDos.png}}
	\caption{Longitude of ascending node}
	\label{fig:ascnode}
\end{figure}

The \textbf{argument of perihelion} $\omega$ is the third angle (see
Figure \ref{fig:arg}). 
It is defined as the angle between the lines connecting the sun to the 
perihelion (i.e., the point on the orbit closest to the sun) and the
ascending node.

\begin{figure}[ht] 
	\center{\includegraphics[scale=1.5]{../res/OrbitalPlanesTres.png}}
	\caption{Argument of perihelion}
	\label{fig:arg}
\end{figure}

With these three angles (i, $\Omega$, $\omega$) it is possible to
uniquely define the position of an orbital ellipse in space. We now know
what the orbit looks like, which is great, but we still don't know where
the asteroid actually is.

To determine this there are different methods. The most commonly used
is the mean anomaly. 
The mean anomaly is defined with the help of the ``mean object''. 
The mean object is a virtual object with the same orbital period
as the asteroid and which passes the perihelion at the same time.
It is defined as having a circular orbit leading to a constant 
velocity for its entire orbit. 

The lines connecting the centre of the circle to the
current location of the ``mean objects'', and the one connecting the centre of 
the circle to the
perihelion is called the mean anomaly.

The MPC database can be searched using all of these values. Additionally,
it is also possible to search the database for the epoch (the time when
these values were first measured) and the absolute magnitude\footnote{That's 
the brightness the asteroid would have if it were at a distance of
$1\,\AU$ from the sun and then viewed from there.  Since most asteroids
don't come this close to the sun and nobody can measure from there, this
necessarily is a value derived from observations under different
circumstances.} $H$  of the object.



\section{Investigating Asteroids in your Web Browser}

As we said in the introduction, the asteroids are not distributed
randomly.  So, the first question we want to look at is:
Where are all of the asteroids in our Solar System? The main 
belt between Mars and Jupiter is fairly well known, so let's first
look away from the main belt (see a sketch of the Solar System in Figure \ref{fig:asteroids}). Mars' semimajor axis is 1.52 \AU, and Jupiter's
is 5.2 \AU. So, let's look outside of Jupiter's orbit, far away from the main
belt, with a semimajor axis between 6 and 7 \AU.

\tutstep[Load data from the database] 
To do this, open the GAVO's MPC database in a Web Browser:
\url{https://dc.g-vo.org/mpc/q/pla/form}.  There, you can enter
constraints to just select the objects you are interested in. Various
fields such as \textit{Name}, \textit{semimajor axis}, or
\textit{eccentricity} can be constrained.  The little links starting
with ``?'' explain the syntax you can use for the constraints here; we
want ``value between $x$ and $y$'', which is written here with two dots.
So:

\begin{enumerate}
	\item In the field \textit{Semimaj. ax.}, type \verb|6 .. 7| (for
	``semimajor axis between 6 and 7 \AU).
	\item Hit the button \key{Go} to run the search
\end{enumerate}

Do not forget the space symbol before and after the two points.  A table
with all the known asteroids possessing a semimajor axis between 6 and 7
\AU\ will load in your browser. At the time of writing this tutorial,
there are 75 asteroids in this range.

By the way, at the bottom of the page you will also find a sort field,
which allows you to sort the results, and
a limit field giving the maximum number of records returned in case
there are many matches.  By default, that is 100, but it can be raised
up to 250'000.  However, if you
let your browser handle that many result rows, things may get very slow
and/or fail.  We will later see ways to deal with result sets of that
size (which you probably do not want to download in the first place).
The queries below are chosen to keep the number of matches below 10'000,
which on modern platforms should not overtax browsers.


\tutstep[Understanding the properties of Asteroids around 6.5 AU] 
It is hard to see much when
staring at these 75 table rows.  To gain insights into what you have
retrieved, plot a histogram.  To do that, you could download the results
in, for instance, CSV (see ``Output Format'') and use an external
application -- or you can use the \key{Quick Plot} option that the
website provides.

After you click on \key{Quick Plot}, a graph will appear. Using the drop-down
menus at the bottom of the graph, you can change the output to visualise what 
you want to see. For example, we want to see how the asteroids'
inclinations, eccentricities, and semimajor axes are distributed.  To do
that,

\begin{enumerate}
	\item Click on the button \key{Quick Plot}
	\item Select the left drop-down menu to be one of the properties (e.g.,
\key{Semimaj. ax.})
	\item Select the right drop-down menu to be \key{Histogram}
\end{enumerate}

Interesting conclusions can be drawn from the histograms. Most of the asteroids 
between 6 and 7 \AU{}  have a rather non-circular (i.e., the eccentricity $e$ is
a good deal away from 0) orbits.
In the distribution of the semimajor axes
between 6 to 7 \AU{}, you cannot see much structure; perhaps there is
a bump aournd $6.25\,\AU$, but then that could be noise, too.
Looking at the histogram of inclinations reveals a reasonable
concentration to the ecliptic ($i=0$), but quite a few of these
asteroids have orbits going far above and below the ecliptic plane (for
reference: Mercury, the planet with the largest inclination, is at
$i=7^\circ$), some even orbit the sun against the rotation sense of the
planet ($i>90^\circ$).


\begin{figure}[h!] 

\begin{minipage}[t]{.5\textwidth}
	\centering
	\includegraphics[width=.8\linewidth]{../res/quickplot_ecc.png}
\end{minipage}%
\begin{minipage}[t]{.5\textwidth}
	\centering
	\includegraphics[width=.8\linewidth]{../res/quickplot_i.png}
\end{minipage}
\caption{Histograms of the eccentricities (\textit{left}) and inclinations (\textit{right})
of asteroids with a semimajor axis between 6 and 7 \AU{}.}
	\label{fig:quickplot}
\end{figure}


\tutstep[Comparing our findings with main belt asteroids] 
To compare these asteroids with those of the main belt, we can look at the 
semimajor axis between 3.9 and 4.1 \AU. The procedure is the same 
as described before except that you need to increase the limit up to 
10'000 objects. If your browser really cannot handle this many entries, 
try with a lower limit -- but be aware that this will skew your results
uncontrollably.

Now, if you use the \key{Quick Plot} tool again and look at the different 
distributions, we can clearly see a difference to the asteroids within 6 to 7 \AU.
Most of the main belt asteroids have a more circular orbit, and in
our small sample of them, there is a clear
density peak around 3.97 \AU. Looking at their orbit inclinations, it 
turns out that most of them are also much 
closer to the ecliptic than the objects farther out. Also note
that there are way more asteroids (close to 6000 objects as we write
this) found in a much smaller range of semimajor axes 
than for asteroids within 6 to 7 \AU.

All these differences are mainly due to the 
overwhelming influence of Jupiter, which will
expell objects on unruly orbits and clear orbits that would bring
objects on them into resonances with Jupiter (i.e., very similar
constellations every few revolutions, the effects of which will add up).
 
It would be nice to get a feel for how the asteroids are distributed in
the whole Solar System. Thus, consider all asteroids within planetary orbits,
say a semimajor axis smaller than 50 \AU. For this, just type \verb|< 50| in 
the search field \textit{Semimaj. ax.}.

If you run the same search as before, you will be warned that the
results were truncated – you have exceeded the match limit.
Not even the maximum limit of 250 000 would return all matches -- and
trying that would probably kill your browser.

We have reached a point at which one should not be downloading all the data
for local analysis in the first place, and at which you want a more
specialised tool than a web browser. 


\section{Server-side Analysis using TOCAT, TAP, and ADQL}

\resettutstep

The software TOPCAT
offers a much more flexible way to query data, in particular 
using a query language called ADQL (Astronomical Data Query Language).
This lets you write little programs using a variation on the popular
database query language SQL and have them execute on your behalf within
the remote database.


TOPCAT is an interactive graphical viewer 
and editor for tabular data and it is frequently used in astronomy to 
manipulate astronomical data. It can be downloaded for free\footnote{\url{http://www.star.bris.ac.uk/~mbt/topcat/#install}}.

\tutstep[Finding the service holding the MPC and the MPC table]
With \texttt{TOPCAT}, you can access the asteroid data from the 
MPC with the following steps:
\begin{enumerate}
	\item Open \texttt{TOPCAT}, go to the menu \key{VO}
	\item Select \key{Table Access Protocol (TAP) Query} (a new window opens)
	\item In the field \textit{Keywords}, type \verb|GAVO DC TAP|
	\item Double click on it in the list (again a new window)
	\item In the field \textit{Find}, type \verb|mpc.mpcorb| and select the 
		service with clicking
\end{enumerate}
With selecting \textit{mpc.mpcorb} in the last step, we select the same database as we used in the 
first two steps of this tutorial.

\tutstep[Running a first query]
Now, we are ready to type ADQL commands in the text box at the bottom 
to access the asteroid data we want to analyze.
See the \key{Columns} pane for the columns of the mpcorb table; this is
what you will get back, and this is what you can use in queries.

Let us begin with a small example to learn how to use ADQL to select and analyze astroid data. At the bottom of the window select the 
button \key{Examples} $\rightarrow$ \key{Basic} $\rightarrow$ \key{Full table}.
This fills the text box with a trivial example query,

\vspace{0.3cm} \texttt{SELECT TOP 1000 * FROM mpc.mpcorb} \vspace{0.3cm}

In this simple case, you can almost read the ADQL like English.

By clicking on the button \key{Run Query}, a new table pops up in the
list of tables in TOPCAT's main window.

\tutstep[Plotting a histogram in TOPCAT]  In the main window, 
click on the histogram icon
to create a histogram plot. Select the option
\verb|semimaj_ax| to plot the distribution of the asteroids for their
orbit sizes.
While there is no guarantee exactly which 1000 records the database will
choose with the construct above, it is quite certain that you will see that 
most of what you see will be between 1 and 5 \AU.



\tutstep[Increase number of analysed asteroids by aggregating
server-side]
Since we are interested in the distribution of the semimajor axis of all the asteroids in 
this range, not only the some more or less random sample of 1000, we
\emph{could} download the whole catalogue and repeat the exercise –
TOPCAT would actually let you do that.  But it is much more efficient to
create the histogram \emph{on the server side} and then just download
the histogram.  This is possible using ADQL's \verb|GROUP BY| construct.
Consider:

%We can also reduce the number of returned results by rounding the 
%semimajor axis of the asteroids. For this purpose, type in the ADQL window:

\begin{verbatim}
SELECT ROUND(semimaj_ax*10)/10 AS bin, COUNT(*) AS n 
FROM mpc.mpcorb
WHERE semimaj_ax BETWEEN 1 AND 5 
GROUP BY bin 
ORDER BY bin
\end{verbatim}

There is a lot going on in these few lines -- as said above, in ADQL you
can write little programs.  Some observations:

\begin{itemize}

	\item We select the semimajor axis data of all asteroids in the MPC database with 
	\verb|SELECT semimaj_ax FROM mpc.mpcorb|

	\item With \verb|... AS bin| we add a new, computed table column \verb|bin|
	that we want to have
	the same value for all asteroids within a range of semimajor axes.
  In this example, we write \verb|ROUND(parameter*10)/10|, which means
  that these ranges are one tenth of an AU wide (as in ``from 4.45 to
  4.55'' -- all of these are mapped to 4.5).  Use a larger number than
  10 to have smaller bins and hence higher resolution.

	\item The ``aggregate function'' \texttt{count(*)} computes
	the number of entries for each group.
	We let this end up in a computed column named \texttt{n}.

	\item \verb|where semimaj_ax between 1 and 5| defines the interval to 
	consider.  Since the heavy lifting is done on the database side, we
	could as well look at the entire table, but by restricting our
	attention to the main belt, the result is a lot easier to plot.

	\item The phrase \verb|GROUP BY bin| is what creates the histogram:
	it separates the whole result into subsets of identical \verb|bin|, only
	returning one row per such group.  Grasping this trick usually is the
	hardest part; having a close look at the result of the query perhaps
	helps a bit with this.
	
	\item \verb|order by bin| finally makes it so the smallest bins come
	first.  This just makes the result table a bit more readable.

\end{itemize}

Using the ADQL code above and hitting \key{Run Query} gives you a new
table that you can now see in TOPCAT's main window. 

\tutstep[Plot the histogram table just retrieved] Since we have
retrieved already aggregated values this time (rather than the full
table as before), you need some extra configuration in the Histogram
plot.  So, again hit the histogram button in TOPCAT's main window.  The column
\verb|bin| should already be selected.  This time, however, you also
have to set \key{Weight} to the
number of items in the bin, \verb|n|. The histogram then
shows the distribution of all asteroids between 1 and 5 \AU. Make sure
you also look at the table retrieved itself and appreciate that it
is much smaller than what we retrieved in our first example -- and yet
it reflects the whole table rather than just a random subset of
1,000 asteroids.



\tutstep[Plot the density across the whole solar system]
To push things further, we can also look at the asteroid distribution 
throughout the ``whole'' Solar System by constraining the semimajor axis
from 0 to 50 (or perhaps dropping the whole WHERE clause).  This will
result in something like
Figure~\ref{fig:densitysolarsystem}.


\begin{figure}[ht] 
	\center{\includegraphics[scale=0.33]{../res/density_solarsystem.png}}
	\caption{Histogram of the asteroid distribution in the Solar System}
	\label{fig:densitysolarsystem}
\end{figure}


To gain further insights, try different bin sizes (there is a slider for
that in the \key{Bins} pane).
Furthermore, there is a lot of dynamics in this plot (the ratio between
the smallest and the largest value is large):  The density between
1 and 5 \AU{} is so large that the small densities are essentially
invisible.  In such a situation, it is usually a good idea to plot the
\emph{logarithm} of the value or, equivalently, have the logarithm on
the axis.  TOPCAT lets you do that:
Go to the tab \key{Axes} and select \key{Y Log}.  This will let you look
at the high concentration in the main belt at the same time with the
fine structure further in and out.

\section{The different asteroid belts}

\tutstep[Main belt and resonances] The histogram in Figure \ref{fig:densitysolarsystem} gives us the 
general idea as to how the asteroids are distributed. 
The details however are hardly visible, because of the massive scale.
To closer investigate the main belt between Mars and Jupiter lets plot another
histogram, this time limiting ourselves to asteroids with a semimajor
axis between 0.5 and 6 AU. 

The result should be along the lines of
Figure~\ref{fig:Main_belt_distr}.  It is obvious that the asteroids are
very unevenly distributed.  Some groups of orbits are a lot more
populated than others.  For example, there are not many asteroids around
2.1 or 2.5 \AU{}.  Between 1.9 and 2.4 you will find a lot more.

\begin{figure}[ht] 
	\center{\includegraphics[scale=0.33]{../res/Main_belt_distr.png}}
	\caption{Main belt asteroid distribution}
	\label{fig:Main_belt_distr}
\end{figure}

These gaps in the belt are called Kikwood-Gaps. As mentioned above,
these are caused by Jupiter and are in places where every few
revolutions, the asteroid and Jupter have the same relative positions.
That way, moderate
gravitational disturbances add up and kick the asteroid into a
different orbit. In its place a gap is left.

The resonance can be calculated using Kepler's third law: 
\begin{equation}
p^2 = a^3 \quad\text{or}\quad \frac{p^2}{a^3} = \textrm{const}, 
\end{equation}
where $p$ is orbital period, and $a$ is the semimajor axis. Due to this
proportionality,
we do not actually need to know the orbital period of the objects to calculate 
the mean resonance. 

However, given that getting the exact semimajor axis for these
resonances is difficult with the histogram we have, it is easier to
calculate the semimajor axis from the resonances; the criterion above
translates that ``every \emph{few} years'' (i.e., revolutions) the
asteroid and Jupiter meet.  In other words, their orbital periods are
like $n:m$ for two small integers $n$ and $m$, like, for instance,
4:1, 3:1, 5:2, 7:3 and 2:1.

Knowing this, we can take $p^2 = a^3$ and solve for p, yielding $p =
\sqrt{a^3}$. To find where major semiaxes with resonance are, divide the
orbital periods
of the two bodies, 
with the larger orbital period going into the numerator. This yields
$n/m = \sqrt{a_J^3 / a_A^3}$. Given that we are looking for the semimajor axis 
of the asteroid, we solve for $a_A^3$ and arrive at
$$\sqrt[3]{(n/m)^2 \cdot a_J^3} = a_A.$$

When we calculate the semimajor axes for the resonances given above,
we find 1.3, 1.73, 2.08, 2.23 and 2.6.
Do you find these in your histogram?

In case you are curious: 
Are there resonances at the positions of the peaks (see Figure 
\ref{fig:Main_belt_distr})? 
And can you figure out why there is a peak at the 1:1 resonance, exactly
at Jupiter position?

% \tutstep[Jupiter trojans] Trojans are small celestial objects that 
% share the same orbit of a larger object. The most well known trojans 
% in our solar systems are the trojans of Jupiter. 
% Knowing the distance of Jupiter from the sun is about 5 \AU{}, we 
% can use the simliar command as before to select all asteroids 
% between 4 and 6 \AU{}. By plotting the same histogram of asteroid 
% distribution at each semimajor axis, we find that the asteroids are 
% mostly distributed between 5.1 to 5.3 \AU{}, similar to the solar 
% distance of Jupiter. These asteroids are exactly the Jupiter trojans.




\section{The Kuiper belt}
\resettutstep

As previously mentioned, there is another asteroid belt at
the outer edge of the Solar System. This belt is called the Kuiper belt,
and is much larger than the main belt (20 times as wide and $\sim 100$
times as large) -- though only a small fraction of its
asteroids have been discovered to date.

The belt stretches from the orbit of Neptune at ~30 \AU{} all the 
way to ~50 \AU{} and most of the asteroids consist mainly of frozen compounds such
as methane, ammonia and water. The most massive and probably the most famous object in the Kuiper
belt is the dwarf planet Pluto (which for historical reasons is not in
our database).


To take a closer look at the distribution of asteroids in the belt,
let us plot another histogram, with a semimajor axis ranging from 37 to 50 AU{}.

\begin{figure}[ht] 
	\center{\includegraphics[scale=0.33]{../res/Kuiper_belt_distr.png}}
	\caption{Kuiper belt asteroid distribution}
	\label{fig:Kuiper_belt_distr}
\end{figure}

Again we see a pattern of spikes and valleys, this time resulting from
resonances with Neptune. 

A clear peak can be found at 39.5 AU{}, a group containing Pluto, which is
where this group got the name, ``Plutinos''.  Farther out, between 40
and 50 AU{}, is, if you will the main Kuiper belt.

Examine other the parameters you have encountered: eccentricities and
inclinations.  Start from our histogram-making ADQL code above and
and adapt the columns, ranges to be 
searched and bin sizes. For insstance, the histogram of the inclinations should look like
Figure \ref{fig:Kuiper_belt_inclinations}.

\begin{figure}[ht] 
	\center{\includegraphics[scale=0.33]{../res/kuiper_inclinations.png}}
	\caption{Inclinations of the asteroids in the Kuiper belt}
	\label{fig:Kuiper_belt_inclinations}
\end{figure}


Finally, try to recreate Figure~\ref{fig:Kuiper_belt_inclinations2},
which shows the densities of
asteroids in the Kuiper belt having inclinations of larger and smaller
than 5~degrees.

\begin{figure}[ht] 
	\center{\includegraphics[scale=0.33]{../res/kuiper_incl_gs5.png}}
	\caption{Histogram of Kuiper asteroids over their semimajor axes with asteroids with an inclination
	\label{fig:Kuiper_belt_inclinations2}
	$<5$ in \textit{blue} and $>5$ degrees in \textit{red}.}
\end{figure}

One way to get this is by running two queries of the type

\begin{verbatim}
SELECT round(semimaj_ax*10)/10 AS bin, COUNT(*) AS n
FROM mpc.mpcorb 
WHERE (semimaj_ax BETWEEN 25 AND 50) AND (inclination<5) 
GROUP BY bin
\end{verbatim}

Then do a second run with \verb|inclination>5|; this will give you two
tables, which you now need to combine into one plot. Open the histogram for
the first dataset as usual, but this time,
just below the histogram, click the 
second icon from the left (small histogram with a green ``+'') to add another histogram to your plot 
which pops up in the lower left corner with the description \key{\textless no table\textgreater}. By clicking that, you 
can select the additional data to be shown with the drop-down menu at \key{Table}. Select your second 
dataset and choose another color for it at the tab \key{Subsets}.

We observe that the ``Plutinos'' have a higher inclination than the
asteroids in the classic Kuiper belt, which suggests that they are two
distinct groups of objects that originated from rather different
processes.

\vfill \onvott \cczero \eject
\end{document}




