question: How are the composition of stars and other planets atmosphere's determined?
comment: One way that this is achieved is called spectroscopy. I'll do my best to explain like you're five. Then I'll go into a bit more detail after. First for the 5 year old explanation Every material in the universe emits certain colors of light when heated up. These colors are unique for each material, so they form a sort of fingerprint which we can use to identify materials. When we point telescopes at stars, we figure out what colors of light they are emitting, and we figure out which fingerprints these colors come from. We might observe a star emitting some of the hydrogen fingerprint and some of the helium fingerprint, so we know that the star is made up of hydrogen and helium. That's the 5 year of version. Now for a slightly more technical explanation. This fingerprint is technically called an emission spectrum because it is the subset of the electromagnetic spectrum that a specific element can emit. Elements also have absorption spectra, where they absorb specific wavelengths of light. I'm going to focus on emission spectra, but absorption spectra are also useful and work in much the same way. This phenomenon is related to the concept of blackbody radiation, which is historically important because it is a major piece of evidence in support of the particle model of light. When you zoom in to an atom, it is made up of a positively charged nucleus surrounded by negatively charged electrons. The positive and negative charges attract, so a force is pulling the electrons towards the central nucleus. Moving the electrons further away from nucleus absorbs energy and pulling them closer emits energy in the form of a photon. So when we heat up a gas, the electrons in its atoms can gain energy and they can move out away from the nucleus. This means that the electrons have absorbed energy. Later, that electron will fall back towards the nucleus, and the energy will be re-emitted as a photon. The wavelength of the emitted photon depends on the energy that the electrons loses as it falls back to the nucleus. Higher energy corresponds to higher frequency light. Based on the classical understanding of electrons and energy, we would expect every element to emit all colors of light. All emission spectra would look the same. But this is not what we observe. As mentioned above, each element has it's own emission spectrum. This phenomenon has been explained by the quantum-mechanical theory that energy comes in discrete packets called quanta. In other words, the electrons surrounding a nucleus can only have certain amounts of energy, and as it jumps between these specific energy levels, it emits photons of specific energy. Each element has different allowable energy levels for it's electrons, so each element has different colors associated with it's emission spectrum. This emission spectrum is then observed through a telescope and compared to the known emission spectra for all elements. By seeing which ones match, we can identify the elements that make up the star.
passages: Section::::Evidence and research.:Model atmosphere.
  
  A numerical model of a star's atmosphere will calculate pressures and temperatures at different depths, and can predict the spectrum for different elemental concentrations.
  
  Section::::Application.
   Section::::Atmospheric composition.
  
  Notes: the concentration of CO and CH vary by season and location. The mean molecular mass of air is 28.97 g/mol. Ozone (O) is not included due to its high variability.
  
  Section::::History.
  
  The ancient Greeks regarded air as one of the four elements. The first scientific studies of atmospheric composition began in the 18th century, as chemists such as Joseph Priestley, Antoine Lavoisier and Henry Cavendish made the first measurements of the composition of the atmosphere.
   The study of Earth's atmosphere and its processes is called atmospheric science (aerology). Early pioneers in the field include Léon Teisserenc de Bort and Richard Assmann.
  
  Section::::Composition.
   Magma in the Earth is produced by partial melting of a source rock, ultimately in the mantle. The melt extracts a large portion of the "incompatible elements" from its source that are not stable in the major minerals. When magma rises above a certain depth the dissolved minerals start to crystallize at particular pressures and temperatures. The resulting solids remove various elements from the melt, and melt is thus depleted of those elements. Study of trace elements in igneous rocks thus gives us information about what source melted by how much to produce a magma, and which minerals have been lost from the melt.
   BULLET::::- How were the chemical elements for life created in massive stars and supernovae?
  
  BULLET::::- How do stars and planetary systems form from dust grains in molecular clouds?
  
  BULLET::::- What is the composition of planetary atmospheres and comets in our Solar System (and beyond)?
  
  Some specific programs include the following:
   Section::::Methodology.:Modeling.
   The more challenging case involves sensors, primarily satellite-mounted, such as radiometers, optical sensors, radar, lidar and ceilometer as well as sodar since these cannot measure the quantity of interest, such as temperature, pressure, humidity etc., directly. By understanding emission and absorption processes, we can figure out what the instrument is looking at between the layers of atmosphere.
   Section::::Differentiation and mixing.:Fractionation.
  
  A major source of differentiation is fractionation, an unequal distribution of elements and isotopes. This can be the result of chemical reactions, phase changes, kinetic effects, or radioactivity.
   Section::::Abundance of elements.
  
  Section::::Abundance of elements.:Solar System.
   In general, the gases found on modern Mars are depleted in lighter stable isotopes, indicating the Martian atmosphere has changed by some mass-selected processes over its history. Scientists often rely on these measurements of isotope composition to reconstruct the conditions of the Martian atmosphere in the past.
   Section::::Planets, asteroids, and comets.:Planets.
  
  The reflected light of a planet contains absorption bands due to minerals in the rocks present for rocky bodies, or due to the elements and molecules present in the atmosphere. To date over 3,500 exoplanets have been discovered. These include so-called Hot Jupiters, as well as Earth-like planets. Using spectroscopy, compounds such as alkali metals, water vapor, carbon monoxide, carbon dioxide, and methane have all been discovered.
  
  Section::::Planets, asteroids, and comets.:Asteroids.
   Section::::Methodology.:Laboratory studies.
   Planets, asteroids, and comets all reflect light from their parent stars and emit their own light. For cooler objects, including solar-system planets and asteroids, most of the emission is at infrared wavelengths we cannot see, but that are routinely measured with spectrometers. For objects surrounded by gas, such as comets and planets with atmospheres, further emission and absorption happens at specific wavelengths in the gas, imprinting the spectrum of the gas on that of the solid object. In the case of worlds with thick atmospheres or complete cloud cover (such as the gas giants, Venus, and Saturn's satellite Titan (moon)), the spectrum is mostly or completely due to the atmosphere alone.
   NRLMSISE-00 is a newer model of the Earth's atmosphere from ground to space, developed by the US Naval Research Laboratory taking actual satellite drag data into account. A primary use of this model is to aid predictions of satellite orbital decay due to atmospheric drag. The COSPAR International Reference Atmosphere (CIRA) 2012 and the ISO 14222 Earth Atmosphere Density standard both recommend NRLMSISE-00 for composition uses.
   Due to the effects of stellar evolution, neither the initial composition nor the present day bulk composition of the Sun is the same as its present-day surface composition.
  
  Section::::Common methods of calculation.:Chemical abundance ratios.
   The composition of meteorites was investigated and compared to terrestrial rocks as early as 1850. In 1901, Oliver C. Farrington hypothesised that, although there were differences, the relative abundances should still be the same. This was the beginnings of the field of cosmochemistry and has contributed much of what we know about the formation of the Earth and the Solar System.
   From the perspective of a planetary geologist, the atmosphere acts to shape a planetary surface. Wind picks up dust and other particles which, when they collide with the terrain, erode the relief and leave deposits (eolian processes). Frost and precipitations, which depend on the atmospheric composition, also influence the relief. Climate changes can influence a planet's geological history. Conversely, studying the surface of the Earth leads to an understanding of the atmosphere and climate of other planets.
  
  For a meteorologist, the composition of the Earth's atmosphere is a factor affecting the climate and its variations.
   Section::::Modern astronomy.
  
  In the 19th century it was discovered that (by Joseph von Fraunhofer), when sunlight was dispersed, a multitude of spectral lines were observed (regions where there was less or no light). Experiments with hot gases showed that the same lines could be observed in the spectra of gases, specific lines corresponding to unique elements. It was proved that the chemical elements found in the Sun (chiefly hydrogen and helium) were also found on Earth.
   The various modifications of surface minerals, or space weathering, is used to evaluate meteorite and asteroid types and ages. Rocks and metals shielded by atmospheres (particularly thick ones), or other minerals, experience less weathering and fewer implantation chemistries and cosmic ray tracks. Asteroids are currently graded by their spectra, indicating surface properties and mineralogies. Some asteroids appear to have less space weathering, by various processes including a relatively recent formation date or a "freshening" event. As Earth's minerals are well shielded, space weathering is studied via extraterrestrial bodies, and preferably multiple examples.
   Planetary science frequently makes use of the method of comparison to give a greater understanding of the object of study. This can involve comparing the dense atmospheres of Earth and Saturn's moon Titan, the evolution of outer Solar System objects at different distances from the Sun, or the geomorphology of the surfaces of the terrestrial planets, to give only a few examples.
   Direct information on Mars, Venus and Mercury largely comes from spacecraft missions. Using gamma-ray spectrometers, the composition of the crust of Mars has been measured by the Mars Odyssey orbiter, the crust of Venus by some of the Venera missions to Venus, and the crust of Mercury by the "MESSENGER" spacecraft. Additional information on Mars comes from meteorites that have landed on Earth (the Shergottites, Nakhlites, and Chassignites, collectively known as SNC meteorites). Abundances are also constrained by the masses of the planets, while the internal distribution of elements is constrained by their moments of inertia.
   Volcanoes result primarily from the melting of subducted crust material. Crust material that is forced into the asthenosphere melts, and some portion of the melted material becomes light enough to rise to the surface—giving birth to volcanoes.
  
  Section::::Earth's atmosphere.
   The study of chemicals found in space, including their formation, interaction and destruction, is called astrochemistry. These substances are usually found in molecular clouds, although they may also appear in low temperature stars, brown dwarfs and planets. Cosmochemistry is the study of the chemicals found within the Solar System, including the origins of the elements and variations in the isotope ratios. Both of these fields represent an overlap of the disciplines of astronomy and chemistry. As "forensic astronomy", finally, methods from astronomy have been used to solve problems of law and history.
  
  Section::::Amateur astronomy.
   where formula_11 is the sum of the fluxes from oxygen emission lines measured at the rest frame λ = (3727, 4959 and 5007) Å wavelengths, divided by the flux from the H emission line at the rest frame λ = 4861 Å wavelength. This ratio is well defined through models and observational studies, but caution should be taken, as the ratio is often degenerate, providing both a low and high metallicity solution, which can be broken with additional line measurements. Similarly, other strong forbidden line ratios can be used, e.g. for sulfur, where
   Astronomers use several different methods to describe and approximate metal abundances, depending on the available tools and the object of interest. Some methods include determining the fraction of mass that is attributed to gas versus metals, or measuring the ratios of the number of atoms of two different elements as compared to the ratios found in the Sun.
  
  Section::::Common methods of calculation.:Mass fraction.
  