A stunning Nasa animation has captured magnetic field activity on the Sun from January 2011 to July 2013, displaying it through multi-coloured moving lines. The video, uploaded online on 29 January, shows how magnetic field lines shoot off the powerful star, with some looping back towards the surface.

The lines themselves are invisible to the human eye but are captured using an instrument called a magnetograph, which measures the strength and direction of magnetic fields. Scientists are not yet clear exactly where the source of the Sun's magnetic field is – whether deep inside the star, near the surface or elsewhere.

It is important to study the magnetic system of the sun because it is responsible for solar explosions that cause space weather on Earth such as auroras, Nasa said. It is also responsible for the interplanetary magnetic field and radiation through which spacecraft travel, it added.