The series of events required for an organism to receive a stimulus relating to a magnetic field, convert it to a molecular signal, and recognize and characterize the signal. Stimuli may be chemical, mechanical or electrical and interpreting these stimuli allows an organism to determine the orientation of a magnetic field. Magnetoreception also involves the perception of light; birds cannot orient without the presence of short wavelength (blue/green) light.