Illuminated Universe

How images are made

Imaging the Lagoon Nebula: How a Hubble Observation Gets Made

Sixteen orbits, three mosaics and thousands of decisions about overlap and exposure, before any color was added to the Lagoon.

The Lagoon Nebula in infrared light: a dense field of orange and white stars over pale blue and gray wisps of gas and dark dust
Infrared view of the Lagoon Nebula from Wide Field Camera 3, in the J band (1.25 micrometers) and H band (1.6 micrometers), released April 2018. Image: NASA, ESA, STScI

The Lagoon Nebula pictures released for Hubble's 28th anniversary in April 2018 began months earlier as a proposal: a request for telescope time, with the instruments, filters and number of orbits written out in advance. Hubble had photographed the Lagoon before, but this program returned with Wide Field Camera 3 and added an infrared view in which the dust becomes thin and the stars hidden inside and behind the cloud appear. The steps between that request and the finished images apply to almost any Hubble observation.

Asking for time on Hubble

Every observation starts with a Phase I proposal prepared in the Astronomer's Proposal Tool. It states the scientific goal, the instruments and filters, and how many orbits are needed. Orbits are the natural unit of Hubble time: the telescope circles Earth every 96 minutes, and for most targets only about half of each orbit is usable, because Earth itself blocks the view for the rest. That blocked time is spent on calibration exposures that keep the instruments characterized.

Most proposals compete in an annual peer review run by a Telescope Allocation Committee, which approves roughly one in seven. A smaller number go directly to the director of the Space Telescope Science Institute, who holds a reserve of discretionary time. The Lagoon program came through that route and received 16 orbits.

Packing the orbits

Once a program is approved, a second, far more detailed plan follows, the Phase II program, in which every exposure has to be fitted into the allocated orbits. A large nebula needs many more single exposures than its final appearance suggests.

The Lagoon is too large for one pointing, so the plan called for four pointings arranged as a two-by-two mosaic. Wide Field Camera 3 contains two cameras in one, an ultraviolet-visible channel (UVIS) and an infrared channel (IR), and each built its own mosaic of the nebula's center. Hubble can also run two science instruments at once, so while WFC3 worked on the core, the Advanced Camera for Surveys collected a third mosaic of a neighboring field at no extra cost in time.

The visible-light tiles were given unusually generous overlaps. That created a central sweet spot where the most interesting compact structures sit; the twisted funnels known as the Lagoon's twisters ended up with four times the exposure depth of the edges. Large overlaps also brought the visible mosaic closer in size to the infrared one, since the IR detector covers a smaller patch of sky.

The 1997 Hubble image of the Lagoon Nebula twisters, dark twisted funnel shapes in glowing gas
The Lagoon's twisters in a January 1997 Hubble image, an earlier look at the same core.Image: A. Caulet (ST-ECF, ESA) and NASA

Why one picture takes dozens of exposures

At every pointing, each filter was used several times, with tiny shifts of the telescope between exposures. These shifts are called dithers. Because each exposure lands the sky on slightly different pixels, combining them lets software reject detector flaws, cosmic-ray hits and bad pixels, filling each gap from an exposure where that spot was clean. The data were of high quality, though bright stars in and just outside the frame left some ghosts and glints that needed attention later.

From raw data to a mosaic

After the observations, the raw files pass through Hubble's standard calibration pipelines and are stored in the Barbara A. Mikulski Archive for Space Telescopes (MAST) in FITS format. For each tile and filter the pipeline combines the dithered exposures automatically. A full mosaic of this size, though, has to be assembled by hand.

The tiles were first aligned to the star positions of ESA's Gaia catalog, a step described in Lining Up the Lagoon. Then all the exposures for each filter were combined into one seamless mosaic with AstroDrizzle, part of the DrizzlePac software. Drizzling was first developed for the Hubble Deep Field; besides stitching mosaics, it can recover some resolution from carefully dithered images.

Only after that does color enter. The visible-light picture uses three narrowband filters and one medium band for overall brightness:

Filters and assigned colors
FilterWhat it recordsShown as
F502NDoubly ionized oxygen [O III] at 502 nanometersBlue
F656NHydrogen-alpha at 656 nanometersGreen
F658NIonized nitrogen [N II] at 658 nanometersRed
F547MMedium-width band near 547 nanometers, mostly starlightLuminosity (brightness)
The core of the Lagoon Nebula rebuilt from its three color channels
Take the picture apartThe red, green and blue channels of the published visible-light image, separated again. Red follows the nitrogen filter, green hydrogen-alpha and blue oxygen. Switch a channel off to see where each gas glows.Image: NASA, ESA, STScI

Data anyone can use

The anniversary image was the main goal, but the observation and processing followed the same practices as any science program, and the finished mosaics were delivered to MAST as High Level Science Products, ready for research. They are FITS files, not pretty pictures, and anyone can open them in a viewer such as SAOImage ds9 to explore the full brightness range or blink between the visible and infrared mosaics and watch stars appear and vanish. FITS Liberator converts the same files into a form an image editor can use for a homemade color version. The infrared mosaic at the top of this page shows how much of the field fills with stars once the dust stops hiding them, a preview of what infrared telescopes do for studies of star formation.

Questions readers ask

How much Hubble time did the Lagoon image take?

Sixteen orbits, granted from the director's discretionary time. Each orbit lasts about 96 minutes, but only around half of that is spent observing the target, because Earth blocks the view for the rest. That time goes to calibration exposures instead.

What is dithering?

Dithering means shifting the telescope by a tiny amount between exposures of the same field. When the shifted frames are combined, defects that sit at fixed spots on the detector and random cosmic-ray hits can be identified and replaced with clean data from the other exposures.

Why does the infrared image show so many more stars?

Infrared light passes through dust that blocks visible light. Most of the extra stars sit behind the nebula, but some are young stars inside it, still wrapped in the cloud that formed them. The visible image traces glowing gas; the infrared image traces the stars.

Can anyone download the Lagoon data?

Yes. The processed mosaics are available from the Mikulski Archive for Space Telescopes as High Level Science Products in FITS format, which can be opened in ds9 or converted for image editing with FITS Liberator.