Basic principles of spectroscopy