Synchrotron and undulator radiations and their applications in spectroscopy