chromatix-team / chromatix

Differentiable wave optics using JAX! Documentation can be found at https://chromatix.readthedocs.io
MIT License
77 stars 13 forks source link

Adding the Scalable Angular Spectrum Method #106

Closed roflmaostc closed 5 months ago

roflmaostc commented 12 months ago

Hi!

I was wondering if a PR would be appreciated to include the Scalable Angular Spectrum Method?

It's very similar to a single step Fresnel method, having magnification properties but without paraxial approximation. It's just 3 FFTs and some phase factors. And zero padding, extraction. Do you have methods for the latter ones already?

Thanks :)

Felix

GJBoth commented 12 months ago

Hi Felix, that PR would be very much appreciated! There's some functions for padding and cropping fields here - is that sufficient for what you need?

roflmaostc commented 12 months ago

That's great.

Is there anything else which I have to consider? Is it fine if I dump the existing code and adapt it to jax?

diptodip commented 12 months ago

Take a look at https://github.com/chromatix-team/chromatix/blob/main/src/chromatix/functional/propagation.py

It would be great if you could follow that same style for the arguments (should be pretty similar to what you have already, except the spectrum information comes from our Field objects).

Thanks!

GJBoth commented 5 months ago

Closed by #121