So far I have been able to do the initial part of KKT. However, now final optimization of the n(w) and k(w) need to be performed.
Let me brief you the steps we are following (probably this will help you to understand the problem):
1. From experimentally measured Transmission spectrum, estimate k(w) [use Beer-Lambert's Law]
2. From k(w), use KKT to derive n(w) (These are used as initial guess)
3. Use these n(w) and k(w) values to theoretically generate the Transmission spectrum.
4. Compare the "Experimental" and "Theoretical" spectrum. Evidently, there will be mismatch between these two. The reason is that
the experimentally measured spectrum also includes terms of reflectivity (even, multiple times)
5. Now use the current values of n(w) and k(w) as starting points and adjust their values such a way that the resultant "theoretical"
spectrum matches with "Experimental" one. If n and k were single valued or constants then simple curve-fitting would have been
sufficient. however, at present both n and k are function of frequency i.e. n = n(w) and k = k(w)
It is for this particular reason, some optimization routine / approach has to be performed. This is what I am looking for now.