Skip to content
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

Complete Redesign #9

Open
roflmaostc opened this issue Nov 19, 2021 · 1 comment
Open

Complete Redesign #9

roflmaostc opened this issue Nov 19, 2021 · 1 comment

Comments

@roflmaostc
Copy link
Member

This projects definitely needs a redesign. It should be CUDA compatible and also differentiable by automatic differentiation!

First, I want to focus (:zany_face:) on scalar optics.

I think it might make sense to introduce types like:

struct ScalarField{T, N, A <: Union{Array{T, N}, CuArray{T, N}}}
           # wavelength
           λ :: T
           # length of eletrical field
           L :: T 
           # Array, CuArray, ... of 
           field :: A
       end

Those are the trivial parameters we need to describe a field. Scalar Fourier optics is possible with such a type.

@roflmaostc
Copy link
Member Author

roflmaostc commented Nov 23, 2021

I guess we should introduce L1 and L2 to handle non-quadratic fields (different scaled fields) as well?

struct ScalarField{T, N, A <: Union{Array{T, N}, CuArray{T, N}}}
           # wavelength
           λ :: T
           # length of eletrical field in each of the dimensions
           L1  :: T 
           L2 :: T 
           # Array, CuArray, ... of 
           field :: A
       end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant