Lining up the Lagoon

A Cosmic Panorama

Have you ever stood on the top floor of a tall building overlooking a vast city in front of you? You probably thought, “Wow, I should take a picture of this!” only to be disappointed when your camera can’t fit the scene into the image. Now, imagine your camera’s field of view is about the size of a grain of sand—at arms length. Hubble’s cameras have a field of view roughly equivalent to half of that. To get around that you might use the panorama feature on your smartphone’s camera app to stitch together several photos into one.  Behind the scenes, Hubble’s cameras are often used the same way, taking many images that are made into a mosaic to capture wide views of the cosmos. In fact, many of the most famous Hubble images are mosaics! Below, you can see the four pointings that were stitched into the final mosaic images of the Lagoon Nebula.

PanSTARRS image of the Lagoon Nebula with the WFC3/UVIS and WFC3/IR image footprints overlaid.

Pieces of a Puzzle

With how easily our phones’ computers can stitch up these images, we often take the nuances of the stitching process for granted. The curious mind may wonder how several separate images can be lined up, so that the final product comes out a beautiful, seamless shot. For something like a cityscape, the same building (or any other feature) appearing in two different images can be matched up to align the two images—as if they were pieces of a puzzle. However, when peering into space the features captured in the images are the dusty and gassy clouds of the Lagoon Nebula, or the glowing spiral arms of Messier 81, or even just “empty” space. These features aren’t always so distinct, and the images must be aligned very precisely (to a handful of milliarcseconds—a thousandth of the width of a human hair at arm’s length!) to make the final mosaic so clear and striking, and so we use the stars themselves as our guides. By lining up the stars common to multiple images, the mosaic can be sewn together. Below are two “tiles” of the infrared mosaic of the Lagoon Nebula. The stars on the right edge of the left-hand image are the same stars seen on the left edge of the right-hand image. By matching up the positions of these stars, the images are aligned.

Two of the four tiles from one of the filters in the infrared mosaic.

While many areas are rich with stars and therefore easy to mosaic, other regions of the sky are not so densely populated. Often, as seen in the visible light images of the Lagoon Nebula, for example, stars are obscured by the clouds of dust and gas in which they form, making it hard to accurately measure (or even see!) the star positions when trying to align the images.  Below, a section of the oxygen III (visible light) mosaic is displayed, showing far fewer stars than the infrared image.

Section of the O III mosaic in the dusty regions.

Furthermore, the images would need to overlap for the same stars to be seen in multiple images. When trying to make a mosaic image of a large target, less overlap is actually better, as more of the sky can be covered. This is especially critical when the field of view already appears so small. To get around these issues, Hubble relies on one of its fellow space-based observatories.

Gaia: A Map of the Stars

In December 2013 the European Space Agency (ESA) launched its spacecraft Gaia to map out our galaxy by measuring the positions of over one billion sources scattered all across the sky. By slowly scanning across strips of the sky (in contrast to Hubble’s imaging), the Gaia mission can produce the largest and most precise catalog of stars ever made for the entire sky. Just how precise? Gaia’s precision for the position of stars is around 2 milliarcseconds, approximately the size of a car on the Moon, as seen from Earth. These positions are matched up with the position of the stars in Hubble data to align the many images that go into a mosaic. You can see the locations of the stars Gaia has measured as green circles overlaid on top of a zoomed-in portion of Hubble’s image of the Lagoon Nebula below. Many of the stars are obscured by the thick dust.

Core of the Lagoon Nebula with overlay of Gaia star positions.

Gaia is the first mission to provide measurements of a quality high enough to be used with many Hubble images and provides a massive boon to scientists using Hubble, as well as many other observatories.

A Guide in the Sky

Going back to the idea of a cityscape, you could use a really accurate map of the city to figure out how to align your images. Gaia provides this map over the entire sky.  You can think of this alignment process as assembling a vast cosmic puzzle.  Instead of looking at each piece alone and finding adjacent pieces, you look at a less comprehensive version of the final picture to place all the pieces.  This method has the added benefit of not requiring overlaps between the mosaic tiles.  Using Gaia’s catalogs as a map for Hubble imagery, the process of aligning the data, which is crucial both for aesthetic and scientific purposes, is made much easier, and the results, at the very least, look spectacular!


  • Varun Bajaj

    Varun is a Senior Research Instrument Analyst working on Hubble's Wide Field Camera 3 at the Space Telescope Science Institute.

Leave a Reply

Create a website or blog at

Up ↑