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

spatial resolution of the source plane #6

Open
hfdihfd opened this issue Oct 23, 2023 · 6 comments
Open

spatial resolution of the source plane #6

hfdihfd opened this issue Oct 23, 2023 · 6 comments

Comments

@hfdihfd
Copy link

hfdihfd commented Oct 23, 2023

Thank you so much. It is a great job and has inspired me a lot. But I would like to ask why the spatial resolution of the source plane has a big impact on the spectral density of the image plane? How should I choose the right resolution for a particular problem?

@tiagoecmagalhaes
Copy link
Owner

Thank you! This is one of the biggest issue of PyWolf and it is something that I will try to improve in the next version. The simulation is based on the Fast Fourier Transform algorithm, which means that the spatial resolution in the observation plane is determined by the spatial resolution of the source plane (and also the distance, frequency and matrix size). This equation is in the paper of PyWolf (Eq. 40 of the open-access paper). To choose the right resolution, you need to go "the other way around" and see if you can "adjust" the frequency, source spatial resolution, matrix size, distance or frequency so that you get your desired spatial resolution in the observation plane.

What I am planning to do in the next version is to "remove" this dependence so that one can specify the spatial resolution in both planes without any impact between them.

Paper [Eq. (40)]:
https://doi.org/10.1016/j.cpc.2022.108336

@hfdihfd
Copy link
Author

hfdihfd commented Oct 23, 2023

Thank you very much for your reply.
I still have a question, why is the coherence degree of the source obtained when calculating the annular coherent source all 0?
I'm learning the coherent stuff of coherent optics and I don't understand why it's not a ring?

@tiagoecmagalhaes
Copy link
Owner

It depends. If it's coherent, the spectral degree of coherence should be approximately one.
Example:
image
image
image
Note that to see the source spectral degree of coherence (SDC) you need to update your point on top (e.g., x_1,y_1 = 107)

In this case, since the source is coherent, the image is just the Fourier transform of the source (a Bessel-like function), which is the Fourier optics case (I think this example is also on the paper). And the degree of coherence is 1. Note that the value on the y-axis for the SDC (2D & 1D) can be misleading (e.g. 0.6 x1E-7 +1 is approximately 1). See images below:

prop_image
prop_sdc_2d
prop_sdc

@hfdihfd
Copy link
Author

hfdihfd commented Oct 23, 2023

image
It turns out that I didn't know before that I still need to update x_1 and y_1 at the top. But there may be a problem with my python, and the update will not make any changes.

@tiagoecmagalhaes
Copy link
Owner

The number "107" depends on the matrix size. Mine is 200, so the center of the ring is 100. Since the inner radius is 7 pixels, I added 100+7. Example: If you are using N=64, you can select 64/2 + 7.

I forgot to mention the following. The spatial resolution may play a key role. In my case, the spatial resolution of the observation plane is about 5 micrometers, while the source spatial resolution is 1 mm. This means that if we do get a ring-like result, we should take into account what would be its dimensions, otherwise we will be "inside it" or too far away.

Furthermore, if we want to simulate coherent beams to see, for example, if they spread or not, we should use models like the Gaussian Schell-model beam and turn off the far-field approximation. Otherwise, we will just be using the classical wave optics approach.

@hfdihfd
Copy link
Author

hfdihfd commented Oct 23, 2023

Thank you very much for your answer. I feel I gained a lot.

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

2 participants