Repository: sunpy/sunpy

Issue:
Add a HMI overplotting on AIA example
Should use Composite map to over plot the magnetic field strength contours on an AIA image.


Discussion:
Is the idea to create an example like the ones that are accessible via tutorial from a sample data or make a general routine for this that will make this overplot for any point in time?

I'm currently making plots of Poynting flux over HMI Br component so I may be able to help with this if I understand it correctly.
We already have this functionality in `sunpy.map.compositemap`, the issue is to write an example like [this](http://docs.sunpy.org/en/stable/generated/gallery/maps/map_rotation.html#sphx-glr-generated-gallery-maps-map-rotation-py) which live in the [`examples/`](https://github.com/sunpy/sunpy/tree/master/examples) directory.
(note: composite map will only over plot if the data is already aligned, so both the AIA and HMI image should be thrown through `aiaprep` first)

(note, note: we don't actually have any HMI data in our sample data at the moment, so we should really add that as well)
I think I understood.
May I try to solve this then?

I should then download then a magnetogram to match the AIA timestamp I suppose and add it to the repository?
The sample data lives in this repo https://github.com/sunpy/sample-data (using git-lfs) so please don't commit it to this one.

Please feel free to have a go at solving this :) 

Resolving patch:
diff --git a/examples/acquiring_data/hmi.py b/examples/acquiring_data/hmi.py
new file mode 100644
--- /dev/null
+++ b/examples/acquiring_data/hmi.py
@@ -0,0 +1,54 @@
+"""
+====================================
+Downloading and plotting a HMI image
+====================================
+
+In this example, we will demonstrate how to download and plot
+line of sight magnetic field data from HMI.
+"""
+# Start by importing the necessary modules.
+import astropy.units as u
+
+import sunpy.map
+from sunpy.net import Fido, attrs as a
+
+###############################################################################
+# Now we will download some data with `sunpy.net.Fido`.
+# A `Fido.search` requires us to specify a `~sunpy.net.attr.Time`,
+# `~sunpy.net.attr.Sample`, `~sunpy.net.attr.Instrument`
+# and the `~sunpy.net.attr.vso.Physobs`.
+
+# We set a time range from ``2015/11/04 12:00:00`` to ``2015/11/04 12:10:00``
+# for HMI ``LOS_magnetic_field`` with the images spaced every 720 seconds.
+result = Fido.search(a.Time('2015/11/04 12:00:00', '2015/11/04 12:10:00'),
+                     a.Instrument('hmi'),
+                     a.Sample(720*u.s),
+                     a.vso.Physobs('LOS_magnetic_field'))
+
+###############################################################################
+# Now we can see what results we obtained from our search.
+print(result)
+
+###############################################################################
+# Once we are happy with the results obtained from the search.
+# We can download the data with `Fido.fetch` .
+# In this case we only want one file so we can index the result.
+
+# Notice we have two files. One is the full disk image we plan to display
+# and the other is a synoptic version of said image.
+downloaded_files = Fido.fetch(result)
+
+###############################################################################
+# The ``downloaded_files`` variables returns a list with the path for the file
+# that was downloaded.
+print(downloaded_files)
+
+###############################################################################
+# Now we are going to create a `sunpy.map.Map` object out of the first result.
+
+hmi_map = sunpy.map.Map(downloaded_files[0])
+
+###############################################################################
+# Once we have created our Map, we can plot it quite simply doing:
+
+hmi_map.peek()
diff --git a/examples/map/composite_map_AIA_HMI.py b/examples/map/composite_map_AIA_HMI.py
new file mode 100644
--- /dev/null
+++ b/examples/map/composite_map_AIA_HMI.py
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+"""
+========================
+Creating a Composite map
+========================
+
+In this example we make a composite map out of images provided by AIA and HMI.
+AIA images look at the solar corona at a given temperature while an HMI image will
+measure the line of sight magnetic field at the photospheric level.
+"""
+
+# Start by importing the necessary modules.
+import sunpy.map
+import sunpy.data.sample
+
+##############################################################################
+# Sunpy's sample data contains a selection of data
+# which we will use for this example
+
+aia_map = sunpy.map.Map(sunpy.data.sample.AIA_171_IMAGE)
+hmi_map = sunpy.map.Map(sunpy.data.sample.HMI_LOS_IMAGE)
+
+##############################################################################
+# Now we will create the composite map which is a set of images stacked upon
+# each other. To do this, we have to call `~sunpy.map.Map` with
+# an extra keyword.
+
+comp_map = sunpy.map.Map(aia_map, hmi_map, composite=True)
+
+##############################################################################
+# Now we want to see what coronal features overlap with regions of strong
+# line of sight magnetic field. So we need to set the contour levels of
+# our composite map using `.set_levels`.
+
+# We want to contour the HMI map, which is the second image in our composite map.
+# Therefore the index is 1.
+# We will filter contours ranging from a few hundred to a thousand Gauss which
+# is the typical field associated to umbral regions of Active Regions.
+comp_map.set_levels(index=1, levels=[-1000, -500, -250, 250, 500, 1000])
+
+##############################################################################
+# Now let us look at the result. Notice that we can see the coronal structures
+# present on the AIA image and how they correspond to the line of sight
+# magnetic field.
+
+comp_map.peek()


Test patch: