One late night in 2007, Rogelio Bernal Andreo and his wife were driving down Highway 1 along California's Lost Coast, when his wife opened the moon roof. What spread out above them looked nothing like the mauve sky near their Sunnyvale home.

"It was like the Milky Way was in front of us," said Andreo, a former early eBay employee, who runs a Spanish-language internet company. "It looked like it was gonna fall on us."

He pulled out his digital SLR camera and spent two hours trying to capture the vast galaxy. When he got home, he downloaded the photos, and caught the astrophotography bug.

"I started to look on the internet and see all these pictures, really gorgeous pictures," Andreo said. "I said, 'How do people do this?'"

Two years of intensive study, rigorous practice, and perhaps $10,000 of equipment later, he knows. And he let Wired.com in on his process. Step-by-step, we'll break down how he went from the black-and-white star scene below to the mind-blowing space photo above.

Thanks to cheaper high-quality digital cameras and editing equipment, creating beautiful images of galaxies, nebulae and star clusters is now within the reach of anyone with a few thousand dollars to spend.

So, we live in a golden age for space photos, but looking at the technicolor images of what appears to the naked eye to be a fairly bland sky, we find ourselves asking: Does it really look like that?

As we find in this behind-the-scenes look at the making of a mind-blowing space photo, the answer is yes — but just not to your eyes, which are pretty poor sensors, compared with purpose-built astrophotographic equipment.

But that doesn't mean the photos aren't "real." Most astrophotographers have an ethic: They won't add color or lasso just a part of an image for editing. They can only bring things out of the data, not add them. The photos are often processed in Photoshop, but what they do is the opposite of falsifying the visual record. Astrophotographers are using digital-editing tools to find the truth in the noisy data that are the heavens.

"The stuff up there is really dim," Andreo said. "The good thing is that the camera records all that and the trick is to bring it out."

The first step in getting a good space photo is picking a spot without light pollution from cities. In northern California, Andreo prefers Lake San Antonio, Henry Coe State Park and Fremont Peak, depending on how far he wants to drive.

His equipment list is long. He packs a Takahashi telescope, Takahashi mount, tripod, SBIG STL11000M camera, adapters, cables, deep-cycle marine batteries, an Asus eee laptop, food and coffee of course.

This photo is how the process begins. It's the first of 11 black-and-white exposures that he'll make. The field of view is just the left third — the area around the bright blue stars of Orion's belt — of the completed panorama at the top of the page.

"This is just one shot, a 15-minute exposure," Andreo said. "That's how it comes out of the camera. The original size of the picture is like 20 megabytes."

Of course, he shoots in RAW format with no compression to maximize the amount of data the images retain.

Now, the processing begins. Andreo takes his 11 exposures and "stacks" them in PhotoshopDeep Sky Stacker, one on top of the other. Then, he averages their data to screen out the noise. Each exposure has a set of random noise in some subset of pixels. By combining them, the good pixels outweigh the bad pixels and you end up with a less noisy image.

"The stuff that's really up there is going to stay, but the noise — because it was random — is going to disappear," he said.

At this stage, he also does background calibration, which tends to brighten the image and make it a little "creamier."

Here, Andreo has started to "push the histogram," as astrophotographers say.

"You push up or down the low levels of the image and the high levels of the image and more data starts to show up," he said. "It's the first thing that most people are going to do. Once you stack your images, then adjust your histogram a little to see how much stuff is really there."

Here, more stars are obviously apparent and the creaminess has gone away with the processing for greater contrast. Next comes the color.

After he shoots an area of the sky with the monochrome, high-resolution filter, he switches to separate red, green and blue filters. He goes through the same process for each color component as he did for the black-and-white image. He takes multiple exposures, combines them, and does background calibration.

"It's just red, green and blue combined and slightly stretched to bring out all the detail," Andreo said. "You start to see more of pretty picture, basically."

Here, Andreo has draped the color data onto the more detailed luminance image.

"I take the RGB that you saw from the previous image, and I put it on top of the luminance," Andreo said, "but I don't want the details, I just want the color information."

Once that's complete, he pushes the histograms some more or perhaps adjusts the levels in the image to bring out the details. Some of the artistry comes out in this stage.

"Because there is a lot of creativity, with the same set of raw data, two different people are going to come up with different things," he said.

The last step was simply to rotate it vertically because he just "liked it more this way." After all, the number of targets for amateur astrophotographers is fairly limited. Framing is a key component of standing out.

"I'm hoping that my final picture will escape mediocrity," he said. "It may not be the best you've ever seen, but at least it's not just one more."

Later, that rotation turned out fortuitously when a friend saw the image and suggested he combine it with photos he'd taken of an adjacent region of the sky.

Working with a program called Registar that helps photographers join their photos by identifying the common stars in different images, he stitched the images together. It required rotating and cropping his original Orion belt, but when the mosaic was finished, it was absolutely breathtaking. Last month, it was selected by NASA as the agency's Astronomy Picture of the Day for September 18th.

The image certainly traveled a long way from its initial incarnation to the finished product, but is the first image any more real than the last? Does adding dozens of exposures together and "pushing the histogram" add or subtract from the reality of the image?

After stepping through the transformation, we're not convinced either way, but we're sure glad that someone takes pictures of space that look like pieces of the heavens.

Images: Rogelio Bernal Andreo.

See Also:

WiSci 2.0: Alexis Madrigal's Twitter, Google Reader feed, and green tech history research site; Wired Science on Twitter and Facebook.**