When two neutron stars collide, it's not like we can just pop up there with a thermometer to measure the intense temperatures being generated at the heart of the collision.

There are other observables that can help us calculate surface temperatures, but inside? That's a little trickier.

Add to that the fact that we've only ever seen one neutron star collision (that we know of), it's not like there are a bunch of opportunities on which to perfect techniques for taking the temperature of a neutron star fender bender.

So scientists at the Technical University of Munich and the GSI Helmholtz Centre for Heavy Ion Research in Germany (the HADES Collaboration) got creative. They figured out how to simulate a neutron star collision right here on Earth. And the answer was another type of collision - particles.

Heavy ions, to be precise. As it turns out, some of the conditions in heavy ion collisions - namely the densities and temperatures - are similar to those in neutron star collisions. And, just as virtual photons are produced in a neutron star collision, they can also appear when two heavy ions are smashed together at velocities approaching light speed.

This can be done using the GSI's heavy ion accelerator, but there are two main problems. The first is that the virtual photons appear very rarely. The second is that they are very weak.

The first problem is easy to solve, if somewhat time consuming. You just make more collisions.

"We had to record and analyse about 3 billion collisions to finally reconstruct 20,000 measurable virtual photons," said TUM physicist Jürgen Friese.

The second problem is a little bit trickier. The team had to design a large custom camera - 1.5 square metres - to detect the very faint Cherenkov radiation patterns generated by the decay products of virtual photons.

These are too faint to be seen with the naked eye.

"We therefore developed a pattern recognition technique in which a 30,000 pixel photo is rastered in a few microseconds using electronic masks," Friese said.

"That method is complemented with neural networks and artificial intelligence."

This data allowed the team to probe the bulk properties of the extremely dense matter briefly produced by the heavy ion collisions - and they found that it resembles the properties expected in the matter that forms during a neutron star merger.

In turn, they were able to determine that two colliding neutron stars, each with a mass 1.35 times that of the Sun, would produce a temperature of 800 billion degrees Celsius. This means that such collisions fuse heavy nuclei.

But that's not all. This research provides insight into the dense quark matter (QCD matter) that filled the Universe just moments after the Big Bang.

"A plasma of quarks and gluons transitioned into nucleons and other hadronic bound states in the early universe," the researchers wrote in their paper.

"Similar states of matter, at lower temperatures, are believed still to exist in the interior of compact stellar objects, such as neutron stars. The formation of such cosmic matter in heavy-ion collisions provides access to studies of the microscopic structure of QCD matter at the femtoscale."

The team's research has been published in Nature Physics.