PyEllips / pyElli

An open source ellipsometry analysis tool for reproducible and comprehensible building of optical models.
https://pyelli.readthedocs.io
GNU General Public License v3.0
17 stars 6 forks source link

Transmission Fitting #185

Open ChihYuLee opened 1 month ago

ChihYuLee commented 1 month ago

Hi,

Thanks for providing this great software. We are wondering how to to deal with transmission data fitting with your code given transmission has different components for its psi and delta (raw data), what is the main thing we have to be aware of? Or is there any example for this type of fitting?

domna commented 1 month ago

Hello @ChihYuLee,

yes it's possible. You can just get the transmission from the Results object after an evaluation. See here for a reference. Please note that there is an error in the documentation and it should read $(T{ss} + T{pp})/2$.

It would look something like this:

structure.evaluate(lbda, ANGLE, solver=elli.Solver2x2).T

You can use this value to fit this to your experimental data. Unfortunately, we don't support this with the jupyter fitting widget, but you can simply use scipy's curve_fit. If you need additional help I think I have some example code somewhere which I could provide you.

ChihYuLee commented 1 month ago

Hi PyEllips/pyElli,

Thank you, we will try to get to the first step and keep you posted. In the meantime, it would be so helpful if you could support us with some example codes, so we can follow well.

Best regards, Chih-Yu

On Thu, Jul 18, 2024 at 1:56 PM Florian Dobener @.***> wrote:

Hello @ChihYuLee https://github.com/ChihYuLee,

yes it's possible. You can just get the transmission from the Results object after an evaluation. See here https://pyelli.readthedocs.io/en/stable/result.html#elli.result.Result.T for a reference. Please note that there is an error in the documentation and it should read $(T{ss} + T{pp})/2$.

You can use this value to fit this to your experimental data. Unfortunately, we don't support this with the jupyter fitting widget, but you can simply use scipy's curve_fit https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html. If you need additional help I think I have some example code somewhere which I could provide you.

— Reply to this email directly, view it on GitHub https://github.com/PyEllips/pyElli/issues/185#issuecomment-2237171694, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY6ROQBJSOFQEOWB4AJ2BUTZM76TZAVCNFSM6AAAAABLC7KUKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXGE3TCNRZGQ . You are receiving this because you were mentioned.Message ID: @.***>

--

Chih-Yu Lee Ph.D. Student Department of Materials Science and Engineering University of Maryland, MD 20742, USA

@. @.

MarJMue commented 1 month ago

Hi Chih-Yu,

I have uploaded a basic example for custom fitting code, where I used it to fit multiple incidence angles at once.

As @domna mentioned, you could adapt it to any optical output pyelli can calculate in the fit function.

ChihYuLee commented 1 month ago

Hi Marius,

Thank you so much! We will look into that!

Best, CY

On Fri, Jul 19, 2024 at 6:47 PM Marius Müller @.***> wrote:

Hi Chih-Yu,

I have uploaded a basic example for custom fitting code https://github.com/PyEllips/pyElli/blob/881a4c6e6c43a922fa025018990bab712a8f4e85/examples/Custom%20fitting/Custom%20fitting%20example.ipynb .

As @domna https://github.com/domna mentioned, you could adapt it to any optical output pyelli can calculate in the fit function.

— Reply to this email directly, view it on GitHub https://github.com/PyEllips/pyElli/issues/185#issuecomment-2240491275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY6ROQAG7WCNPDK5DCBMRS3ZNGJQNAVCNFSM6AAAAABLC7KUKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBQGQ4TCMRXGU . You are receiving this because you were mentioned.Message ID: @.***>

--

Chih-Yu Lee Ph.D. Student Department of Materials Science and Engineering University of Maryland, MD 20742, USA

@. @.