Closed MatthiasGi closed 3 years ago
Most of our work on HoloPy has focused on implementing scattering models for microscopic objects. HoloPy isn't (yet) well suited for objects much larger than the wavelength. For your example, diffraction theory would be a much faster approach than Mie theory to calculate the hologram, and a reasonably accurate one at these length scales. There isn't a straightforward way to do this in HoloPy, but you might be able to hack something together using the propagation
module. Alternatively you could implement the field calculation as a new theory module (instructions). If you follow the second approach, we would certainly welcome a pull request.
The documentation for HoloPy should probably be updated to reflect the limitations on the various scattering theories. Please let us know where you think it would be most helpful to note the limitations.
Thanks a lot for your reply! I think I'm almost certain in trying the second approach. This way I could benefit from your other work implemented in the library (e.g. display for data or the data-infrastructure). I'm sure to let you know, if I make any progress. If I can imagine (and implement) any other "upgrades" for the library, I'll let you know as well.
I leave the issue open to reflect that there is still documentation missing. In my personal opinion the limits of the library could be written on the main page of the documentation. Maybe as a paragraph above the history (HoloPy started as a project in the…). This could also be reflected in the Readme of the repository. Or—if this is to prominent for your taste—maybe a section below concepts? There you could also comment on solutions to overcome this limitations (e.g. as you described to me above).
Hello there! I’m currently trying to use HoloPy as a starting point for my projects which happen to work on different orders of magnitude as the ones described in your publications or examples. To get to know the library better I tried to rebuild an experiment from the real world. The setup consists of spheres that are separated two millimeters each. A screen is placed 30cm away from the object. We use a red laser beam to achieve the hologram on the screen. The spheres itself are virtual and do not have a defined refractive index. They could be assumed as rock solid.
Unfortunately this doesn’t work:
The produced error is
holopy.scattering.errors.InvalidScatterer: Invalid scatterer of type Sphere. radius too large, field calculation would take forever
. Which is understandable ask_medium * particle_radius ≤ 1e3
withk_medium = 2π/lambda_0 * n_medium
seems to be the given limit in the implementation of Mie-Theory. Even reducing the particle size to e.g. 1µm doesn’t solve the problem, as now the separation is too large.This seems to be a limitation in the theory used to calculate the given problem. I already tried to submerge myself in DDA – but: there too seem to be limitations as the calculation takes so long that it will be cancelled by my operating system. Before now investigating more: Is there maybe already another theory implemented which handles these cases? Can you maybe point me in the right direction?
Apart from that: Could it be helpful to clearly document the (current) limits of HoloPy?
Thanks in advance for your kind help or any tips!