Optimization & Simulation functions

Fitting spectra

Error calculation

Simulating spectra