-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: complex refractive index of medium #19
Comments
Hi Melowa! Unfortunately, the case of a surrounding medium with absorption is currently not implemented. This is why the code complains when you try to define a complex refractive index. According to @lpattelli You can tweak the code to run also with a complex refractive index of the surrounding medium by commenting lines 122 and 123 of the file As @lpattelli has further pointed out, the MSTM code by Daniel Mackowski has a setting for |
Maybe we should leave it open such that people who obtain the same error can see this. |
Thanks, this is very helpful! I was simulating particles in water. For my wavelength of interest the imaginary part of the medium refractive index is anyway small, so I will neglect it. In principle I am only interested in a finite region of space (without far field). |
Running the example file CELES_MAIN.m with a non-zero imaginary part of 'mediumRefractiveIndex' causes the execution to terminate with an error right after it says
"compute scattered field plane wave pattern:"
The error is:
"Error using celes_planeWavePattern/validatePropertiesImpl (line 123) invalid k value: Expected input to be real."
the refractive index I used was 1.2 + 0.01i and the light wavelength 500. Also, output.initialFieldPower is complex, with large imaginary part, in my case 3.7e6 + 3.1e4i.
Does anyone else have this issue?
The text was updated successfully, but these errors were encountered: