The Sun was a feisty as a toddler, growing in spurts while burping out bursts of X-rays, according to a new study.

The determination was made by Nancy Brickhouse of the Harvard-Smithsonian Center for Astrophysics (CfA) and her colleagues after studying the young star TW Hydrae located some 190 light-years away in the southern constellation Hydra.

An orange, type K star weighing about 80 percent as much as the Sun, TW Hydrae is 10 million years old and still accreting gas from a surrounding disk of material that may contain newborn planets.

In order to grow, a star must “eat” gas from the disk; however, because the disk doesn’t extend all the way to the star’s surface, it cannot dine from it directly but instead must funnel infalling gas along some magnetic field lines to the star’s poles.

Fortunately for Brickhouse and her team, Earth is looking almost directly down one of the star’s poles, giving them a detailed image of the process.

“We’re looking right where the action is,” team member Andrea Dupree of the CfA said in a press release.

For this reason, the scientists have been able to witness shockwaves as the material smashes into the star, heating the accreting gas to temperatures greater than 5 million degrees Fahrenheit and then cooling as it moves inward.

“We traced the whole accretion process for the first time," explained Brickhouse.

As a result, the researchers discovered that accretion is a clumpy, episodic way of building a star given that the amount of material landing on TW Hydrae can vary by a factor of five over the course of just a few days.

"The accretion process changes from night to night," Dupree said. "Things are happening all the time."

Moreover, some of the infalling material is pushed away in a stellar wind much like the solar wind that lights the solar system, while other material is channeled into giant loops and stellar prominences.

"The very process of accretion is driving magnetic activity on TW Hydrae," Brickhouse added.

Ultimately, while astronomers have long known that young stars are much more magnetically active the middle-aged Sun, with the recent findings they will now be able to probe the interplay between the star’s magnetic fields and the protplanetary disk.