Illuminated Universe

Hubble anniversaries

AG Carinae: How Hubble's 31st Anniversary Image Was Processed

A star a million times brighter than the Sun beside a faint nebula: the hardest exposure problem in astronomy, solved with two visits and a lot of masking.

AG Carinae: a brilliant white star at the center of a shell of red glowing gas and blue clumps of dust, against a field of small stars
AG Carinae, released April 23, 2021 for Hubble's 31st anniversary: Wide Field Camera 3, ultraviolet and visible light. Image: NASA, ESA and STScI

The letters AG in AG Carinae are not initials. They follow the naming convention for variable stars, which assigns letter combinations constellation by constellation, and mark this one as a variable star in Carina. It belongs to a rare class, the luminous blue variables: in the whole Local Group of galaxies, fewer than 50 have been found. Hubble's 31st anniversary image, released on April 23, 2021, shows the star and the shell of gas and dust around it in fine detail, but making that picture meant solving a problem that runs through all of astrophotography: a blinding star right next to a faint nebula.

A star on the edge

AG Carinae lies about 20,000 light-years away in the Milky Way, and the dust along that line of sight makes it look much dimmer than it is. It may be up to 70 times as massive as the Sun and shines with the light of a million Suns. Stars like it live only a few million years; AG Carinae's expected lifetime is 5 to 6 million years.

Luminous blue variables are caught in a contest between radiation pressure pushing outward and gravity pulling inward. Now and then the outward push wins, the star swells and blows off its outer layers, then settles back. The nebula around AG Carinae, about five light-years wide, came from one or more such outbursts several thousand years ago, which threw off roughly ten times the mass of the Sun. Since then the star's wind, at up to a million kilometers per hour and about ten times faster than the expanding shell, has plowed into the older material and cleared a cavity around the star.

Two colors, two kinds of light

The striking contrast in the picture has a physical meaning. The red is light emitted by hydrogen gas laced with nitrogen, excited by the star's radiation and glowing on its own. The blue is something different: dust clumps that do not glow but reflect the starlight falling on them. The most prominent blue features are filaments shaped like tadpoles and lopsided bubbles, sculpted by the wind.

A closer view of the AG Carinae nebula: blue, tadpole-shaped dust clumps and bubbles inside a ring of red gas around the overexposed central star
Detail of the nebula, cropped from the anniversary image. Blue marks dust reflecting starlight, red marks glowing gas.Image: NASA, ESA and STScI

The observations reached down to ultraviolet light, which only a space telescope can record, to test whether the nebula changes shape at those wavelengths. A similar study of nearby Eta Carinae had found ultraviolet structures that helped explain its nebula. For AG Carinae, the ultraviolet data showed nothing new. In science a null result is still a result.

Two visits and the right exposure

A star this bright saturates a detector almost at once; a nebula this faint needs long exposures. Hubble had to gather just enough light to record the faint ejecta without burying the area around the star in saturation. Hubble observed the star on two separate dates, which gave the option to adjust between them, and the result was two complete datasets. Processed separately and then combined, they extended the field of view and, because the two visits overlap, let one cover the other's artifacts.

Every Hubble image starts as gray frames holding a huge range of brightness. Stretching rescales that range to what a screen can show, and for AG Carinae the step was critical. Some saturation of the star was unavoidable; the aim was to keep it to a minimum. By working mainly on the mid-tones, the processing preserved the bright data while lifting the diffuse structure of the ejecta.

Filters and color

The four filters were F275W in the ultraviolet, F547M, F657N for hydrogen-alpha and nitrogen, and F845M in the near-infrared. In chromatic order they were tinted blue, green, orange and red, then combined additively into one color image per visit. The two visits were aligned and one was adjusted to match the other in color and tone, before a first global color balance with curves and levels. The ordering is the same one explained in Are the Colors Real?.

Ghosts, bleeds and a second pair of spikes

With two matched images, the artifacts could be attacked. The first dataset had a glaring ghost, a bright donut eclipsing the right side of the star, plus charge bleeds. Masking those areas in one image revealed clean data from the other underneath. Artifacts with no clean counterpart, such as cosmic rays and fainter ghosts and bleeds, were replaced with the average background level, the techniques covered in Image Artifacts Explained.

Diffraction spikes are artifacts too, but they are usually kept, as a Hubble signature and a cue that the viewer is looking at a bright star. Here the star is the subject, and the decision was harder. The telescope's rotation between the two visits made it worse: combining them produced a second, rotated set of spikes. Three treatments were compared. The team settled on the version without spikes, the most unfamiliar to Hubble viewers and also the closest to how the object would actually look. Removing them meant sampling good pixels near each spike and using them to replace the affected data, which also let subtler detail in the nebula come forward.

Turning the picture 130 degrees

Up to this point the image kept the standard astronomical orientation, with north at the top and east on the left. Up and down are relative in space, and even the sky's orientation from the ground depends on the observer's latitude. North-up helps when comparing datasets, but here it put the cone-shaped extension of gas and dust at the top, and the composition felt top-heavy.

Rotating the image about 130 degrees counterclockwise moved the cone to the left, where it offsets the heavy, bright reflection nebula and leads the eye from left to right. The last adjustments emphasized the difference in color and form between the reflecting dust and the glowing gas, and the faint structures around them. Knowing when to stop is part of the job; the science of the object decided it.

Questions readers ask

What does AG in AG Carinae mean?

It is a variable-star designation. Variable stars receive letter combinations within each constellation, so AG Carinae is simply one of the variable stars catalogued in Carina. It is a luminous blue variable about 20,000 light-years away.

Why does AG Carinae's nebula look red and blue?

Red is light emitted by hydrogen and nitrogen gas energized by the star. Blue is starlight reflected by dust clumps, which do not glow on their own. The two components were shaped by the same eruption and by the star's fast wind.

Why were the diffraction spikes removed from the AG Carinae image?

Combining two visits taken at different rotations added a second set of spikes, and the star itself was the subject. A spike-free version let fine detail in the nebula show and came closest to how the object would look, so it was chosen for the release.

Is the AG Carinae image upside down?

There is no fixed up in space. The released image is rotated about 130 degrees counterclockwise from the north-up convention, so that the cone-shaped extension of the nebula sits on the left and the composition is balanced.