Probes that enter a planet's atmosphere can easily gather information about the composition of the planet based on the chemical makeup of the atmosphere. We can also use an instrument known as a spectrometer, which measures light in relation to the periodic table of elements. Once the composition of a planet or moon is found, we can then use that information along with the measurement of gravitational pull to find the body's mass. With the mass found, we can then make an educated guess about the interior structure of a planet. A terrestrial planet is likely either hot or cold internally, while the others have a gaseous core, and so this information used with the mass helps us determine the internal structure. Magnetic fields are also measurable, and most major planets in our solar system generate a magnetic field from some form of electromagnetic activity found within their atmosphere. Even if a planet no longer puts off it's own magnetic energy, a fly-by spacecraft can pick up on trace magnetic activity in surrounding atmospheric debris from years