Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 2.12 KB

FIZ228_TakeHomeExam_03.md

File metadata and controls

69 lines (45 loc) · 2.12 KB
jupytext kernelspec
formats text_representation
ipynb,md:myst
extension format_name format_version jupytext_version
.md
myst
0.13
1.11.5
display_name language name
Python 3 (ipykernel)
python
python3

Take-Home Exam #3

FIZ228 - Numerical Analysis
Dr. Emre S. Tasci, Hacettepe University

It is strictly forbidden to contact anybody outside your group or seeking the direct answer on the internet. Every member of the group is responsible for every one of the questions.

+++

Fit the {download}Silica FTIR data<data/05_Silica_FTIR.csv> [Silica FTIR data] for the wavenumber range [900,1500] cm-1:

  1. Using 3 Gaussians
  2. Using 4 Gaussians
  3. Using 5 Gaussians
  4. Using 3 Lorentzians
  5. Using 2 Gaussians & 2 Lorentzians

Calculate the coefficient of determination ($r^2$) for each fit.

+++


Information:

A Gaussian characterized by ($A,\mu,\sigma$) is formulized as:

$$G(x;A,\mu,\sigma) = A\exp{\left[-\frac{(x-\mu)^2}{2\sigma^2}\right]}$$

whereas, a Lorentzian characterized by ($A,x_0,\gamma$) is formulized as:

$$ L(x;A,x_0,\gamma)=A\left[ { \gamma \over (x - x_0)^2 + \gamma^2 } \right]$$

+++

Hints:

  • Once you solve one of the items, it will be pretty straightforward to apply the same routing to the rest.
  • If at first you don't get any result or error from the curve_fit() or any other fit function you are using, it is most likely due to a bad starting point. Trial & error is a good approach but taking a hint from Cappeletti et al.'s graph is the best one! ;)
  • It's always a good idea to separately plot all the components to see if the components make sense (e.g., absorbance can never take negative values!)

+++

As an example for the last one, check the following fit of 5 Gaussians, with r2 = 0.998:

HW3_bad5G_sum.png

Even though it seems very good, here are its components, separately drawn:

HW3_bad5G.png

which doesn't make any sense as G3 & G5 Gaussians indicate a negative absorption!