A new NASA video has captured two cosmic wonders — a comet and a massive solar storm — with the Earth in the background as seen by a sun-watching spacecraft.

In the video, the Comet Pan-STARRS can be seen streaking through the inner solar system, orbiting the sun over the course of five days (March 10-15). As Pan-STARRS makes its ways into view, a coronal mass ejection (CME) — an explosion of plasma from the surface of the star — shoots towards Earth.

"The bright light on the left comes from the sun and the bursts from the left represent the solar material erupting off the sun in a CME," officials with NASA's Goddard Space Flight Center Scientific Visualization Studio wrote in a video description.

The dramatic video of Comet Pan-STARRS and the sun stormwas captured by one of NASA's twin Stereo spacecraft ( the name is short for Solar Terrestrial Relations Observatory) .. Launched in 2006, the two Stereo probes work together to provide a constant watch on the sun's solar weather events. One Stereo probe orbits just ahead of the Earth while the other trails behind. [How to see the comet]

"While it appears from Stereo's point of view that the CME passes right by the comet, the two are not lying in the same plane, which scientists know since the comet’s tail didn’t move or change in response to the CME's passage," NASA officials wrote.

Comet Pan-STARRS put on a brilliant show in the Southern Hemisphere before becoming visible to stargazers in the North during the first part of March. Astronomers using the Panoramic Survey Telescope and Rapid Response System (or Pan-STARRS) atop a volcano in Hawaii initially spotted the comet in June 2011.

Pan-STARRS is one of two comets expected to put on a show this year. Since reaching its maximum brightness earlier in March, Comet Pan-STARRS has been getting steadily dimmer, but it should be visible low on the western horizon, just after sunset, to stargazers with binoculars or small telescopes, NASA officials have said.

Story continues

Comet ISON should make its first appearance in April, and some astronomers think it could be the brightest comet in a generation.

NASA's Stereo spacecraft are one of several missions that constantly monitor the sun for signs of solar flares and eruptions. The sun is currently in an active phase of its 11-year solar weather cycle. The current cycle is known as Solar Cycle 24 and is expected to reach its peak this year.

Editor's note: If you snap an amazing photo of Comet Pan-STARRS, or any other celestial object, and you'd like to share it for a possible story or image gallery, please send images and comments, including location information, to Managing Editor Tariq Malik at spacephotos@space.com.

Follow Miriam Kramer @mirikramer and Google+. Follow us @Spacedotcom, Facebook and Google+. Original article on SPACE.com.

Copyright 2013 SPACE.com, a TechMediaNetwork company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.