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

Update definition of Flattened Gaussian to include both NF and FF #363

Open
wants to merge 39 commits into
base: development
Choose a base branch
from

Conversation

rob-shalloo
Copy link
Member

@rob-shalloo rob-shalloo commented Feb 20, 2025

Updating Alberto's recent addition of a flattened Gaussian beam to include the case where the beam is defined in the nearfield, compared to only defining in the far field.

Addresses #354

@rob-shalloo rob-shalloo changed the title [WIP] update definition of Flattened Gaussian to include both NF and Farfield [WIP] update definition of Flattened Gaussian to include both NF and FF Feb 20, 2025
rob-shalloo and others added 26 commits February 21, 2025 21:52
@rob-shalloo rob-shalloo changed the title [WIP] update definition of Flattened Gaussian to include both NF and FF Update definition of Flattened Gaussian to include both NF and FF Feb 25, 2025
Copy link
Contributor

@MaxThevenet MaxThevenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! See comments below.

of or has been directly propagated from the focus. In this case there
can be a large defocus in the spatial phase.

w : float (in meter)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to change the name w0?

Comment on lines +71 to +74
Options: 'nearfield', when the beam is defined far from focus and
has been collimated, or 'farfield', when the beam is in the vicinity
of or has been directly propagated from the focus. In this case there
can be a large defocus in the spatial phase.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this slightly misleading, just tried to help clarify, let me know what you think.

Suggested change
Options: 'nearfield', when the beam is defined far from focus and
has been collimated, or 'farfield', when the beam is in the vicinity
of or has been directly propagated from the focus. In this case there
can be a large defocus in the spatial phase.
Options: 'nearfield', when the beam is defined far from focus (e.g., right before the focusing optics), or 'farfield', when the beam is in the vicinity of the focus.

Comment on lines 94 to +102
Warnings
--------
In order to initialize the pulse out of focus, you can either:

- Use a non-zero ``z_foc``
- Use ``z_foc=0`` (i.e. initialize the pulse at focus) and then call
``laser.propagate(-z_foc)``
In order to initialize the pulse in the far field but out of focus, you
must select ``field_type == 'farfield'`` and then you can either:

- Use a non-zero ``z_foc``.
- Use ``z_foc=0`` (i.e., initialize the pulse at focus) and then call
``laser.propagate(-z_foc)``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This profile is independent of the propagator, I think this whole warning should be dropped. It says something true, but not required here. I understand this was not introduced in this PR.

Comment on lines 50 to 52
E(x,y,z=\infty) \propto
\exp\left(-\frac{(N+1)r^2}{w(z)^2}\right)
\sum_{n=0}^N \frac{1}{n!}\left(\frac{(N+1)\,r^2}{w(z)^2}\right)^n
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this expression with w(z) confusing, as we're talking about a collimated beam. I would call it R or W or something, and drop the (z) as well as the definition of w(z) below, as I do not think it is used when defined in the near field. This would require more changes in the inputs description below.

Comment on lines +60 to +63
- Note that a beam defined using the near field definition would be
equivalent to a beam defined with the corresponding parameters in
the far field, but without the parabolic phase arising from being
defined far from the focus.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to have this note here indeed!

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

Successfully merging this pull request may close these issues.

2 participants