Source: http://perso.ens-lyon.fr/manon.leconte/pedago/fichiers/spectro/TD.pdf