Apparently our galaxy really likes to boogie. It has, on several occasions, enjoyed a Monster Mash; now it's been caught doing the Twist. A new study has revealed that the Milky Way isn't a nice, neat, flat disc - it's seriously warped around the edges.

We often compare our home galaxy to our next-door neighbour, Andromeda. Andromeda is (probably) bigger than the Milky Way, but both galaxies are pretty large, both are spiral galaxies, and they're both about the same age.

Since we live inside the Milky Way, we can't actually observe its full shape - that would be like sitting in a stationary submarine and trying to figure out the dimensions of the ocean. But, given what we know about galaxies in general, until now it made sense to think the Milky Way probably looks a bit like Andromeda, with its nice orderly spiral arms.

Now astrophysicists have discovered that the farther one travels from the galactic centre, the more warped and twisted the Milky Way's disc actually becomes. Its galactic plane isn't a straight line; instead, it looks a bit more like an elongated S.

The discovery is all thanks to some new distance measurements to stars in the outer regions of the galaxy.

"It is notoriously difficult to determine distances from the Sun to parts of the Milky Way's outer gas disc without having a clear idea of what that disc actually looks like," said astronomer Xiaodian Chen of the National Astronomical Observatories of Chinese Academy of Sciences (NAOC).

One way is to use a type of star called a Cepheid variable. These are very bright stars that pulsate with a precise frequency, which allows astronomers to calculate their absolute magnitude. In turn, this allows the distances to those stars to be calculated.

In the optical spectrum, dust and gas between us and the star can get in the way of an accurate determination of brightness, which means there's a bit of uncertainty in the resulting distance calculations.

But infrared radiation can penetrate the dust, which makes for a more accurate result - so this is what the scientists used.

"We used a new catalogue of infrared observations obtained with the WISE space observatory to reduce the effects of dust and determine the distances to our Cepheids with uncertainties of less than 3 to 5 percent - that's an unprecedented accuracy to date," astrophysicist Richard de Grijs of Macquarie University in Australia told Science Alert.

"Combined with their apparent locations in the sky, we constructed a three-dimensional map of the Milky Way as traced by these Cepheids, which we compared with the gas distribution.

"Both appeared to deviate from a flat disc."

It's not, he notes, unusual for a spiral galaxy to become warped around the edges, particularly the atomic hydrogen gas that extends out beyond the stellar disc. What makes the Milky Way's warp so interesting is that it includes stars - and young ones to boot.

But, de Grijs said, it's even more interesting that the Milky Way's disc is twisted, or precessed.

"The precession of the disc seems to imply that the massive inner disc of the Milky Way may have forced the outer disc to follow its rotation, but the rotation of the outer disc lags behind - that causes the twisting," he said.

"This had not seen before for the Milky Way, but [retired astronomer] Frank Briggs had found this a number of years ago for a dozen large spiral galaxies in the nearby Universe. Combining his and our results, we believe that the same dynamics are at play in the Milky Way."

It's a result that gives us a better understanding of the both the three-dimensional structure and dynamics of our galaxy, and will allow us to set an upper limit on the quantity and distribution of matter in the galaxy - which will be "particularly interesting in the context of the question where the dark matter is located," de Grijs said.

It will also help us better understand the Milky Way's relationship and interactions with its satellite galaxies, specifically the Magellanic Clouds, and the history of our local (groovacious) pocket of space.

The team's research has been published in the journal Nature Astronomy.