2D Mie Resonances of Disk
Hi there,
I am a longtime fan of this package - I use it for my Atmospheric Radiative Transfer class at Millersville University. I was wondering if your package can reproduce the Mie Resonances vs. Radius images I have found on the Wikipedia page (link below). It's a different software package, but I'm wondering if you have a way to do this. I like the visuals and would like to reproduce them for my class.
Thank you very much!
Greg Blumberg
https://commons.wikimedia.org/wiki/File:Mie_resonances_vs_Radius.gif
@wblumberg Glad to hear you like miepython.
The visuals in the wikipedia image use a completely different approach to solving the scattering problem. I don't think it fits into the miepython package. That said, the gif for the figure includes Mathematica code. ChatGPT readily converted this to python.
I added a notebook about Mie resonances. Don't know if this will help any.
Perhaps over the winter break I will be able to find time to add more visualization support for the electric and magnetic fields.
However, your request for visualization made it clear that miepython does not directly support electric or magnetic field plots.
@scottprahl I just tried out your code for the Mie resonances. However, the code fails with "AttributeError: module 'miepython' has no attribute 'mie_coefficients'". I am using miepython 2.5.5 which is in all other aspects running really fine.
Cheers, Uli Krieger
sorry, not quite enough to go on. Are you using the released version of miepython or the current code in the repository (which unfortunately is in an indeterminate state as I add support for e-fields inside the sphere) ?
confirm you are using the released version and give me a short snippet of code to show your problem.
Thanks
Hi Scott,
to explain in more detail what I was trying to do: I am using the release version and just tried out the function "resonant_wavelengths" given in the example (https://miepython.readthedocs.io/en/latest/13_resonance.html) , using these parameters: "resonant_wavelengths(1, 5.0, (1.45+0j), (0.765, 0.782), n_env=1.0)"
Upon executing this line of the example code: a, _ = miepython.mie_coefficients(mm, x, n_pole) I get the error: " AttributeError: module 'miepython' has no attribute 'mie_coefficients'"
Thanks, Uli
Everything should be working with the new release. I was hoping to finish testing the E-fields near the sphere before releasing, but the disconnect between the documentation for the new version and the old version being installed by pip or conda was not helping anyone.
I will just release a new version when the E-field stuff is finished.