Creating and manipulating spectra