The sun generates energy through nuclear fusion in its core. This energy radiates outward through different layers of the sun and is finally emitted from the photosphere as electromagnetic radiation. About half of the solar energy that reaches the top of Earth's atmosphere reaches the surface, with the remaining energy being reflected or absorbed by gases, aerosols and clouds in the atmosphere. Instruments such as pyranometers and pyrheliometers are used to measure different components of solar radiation, including global, diffuse and direct radiation.