A pulsar that randomly and without warning dramatically changes its pattern of radio wave and X-ray emissions has surprised a team of astronomers, who wrote that it "challenges all proposed pulsar emission theories".

Pulsars are spinning neutron stars the size of a small city, with a mass roughly comparable to our Sun. They have a strong magnetic field that is around a million times stronger than what scientists can reproduce in labs on Earth.

They emit oppositely directed beams of radiation from their magnetic poles. Just like a lighthouse, the star spins and the beam sweeps past Earth, so that we just see a brief flash. Some pulsars produce radiation across the entire electromagnetic spectrum, including X-ray and radio wavelengths.

Despite having studied pulsars for over 45 years ago, boffins still don't know exactly how they shine the way they do.

Scientists from The Netherlands Institute for Space Research, the University of Manchester and the University of Amsterdam examined PSR B0943+10, one of the first pulsars to be discovered.

"The behaviour of this pulsar is quite startling, it’s as if it has two distinct personalities," Ben Stappers of Manchester university said.

The team found that X-rays did change synchronously with the radio emission, but in the state where the radio signal is strong and the pulses are clear, the X-rays were weak, and where radio was weak, the X-rays intensified.

All of this happens within seconds and Lucien Kuiper in the Netherlands said the evidence strongly suggests that a temporary "hotspot" close to the pulsar's magnetic pole switches on and off with the change of state.

“As well as brightening in the X-rays we discovered that the X-ray emission also shows pulses, something not seen when the radio emission is bright. This was the opposite of what we had expected," Stapper added.

"I’ve likened the changes in the pulsar to a chameleon. Like the animal, the star changes in reaction to its environment, such as a change in temperature.”