Skip to content

Conversation

steindev
Copy link
Member

PR adds analytic formulas, which are the basis of the implementation of the GaussianPulse and DispersivePulse, to the docs.

I see this as a first version. Feedback is welcome!

@steindev steindev added this to the 0.9.0 / next stable milestone Jun 24, 2025
@steindev steindev added documentation regarding documentation or wiki discussions CI:no-compile CI is skipping compile/runtime tests but runs PICMI tests labels Jun 24, 2025
@steindev steindev force-pushed the 2025-06_add-laser-doc branch from cff45ec to 5f2592c Compare June 25, 2025 08:50
Copy link
Contributor

@chillenzer chillenzer left a comment

Choose a reason for hiding this comment

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

Minor typos.

.. math::
\varphi |_{z=0} = \varphi(x,\Omega) |_{z=0} = k_x(\Omega) \cdot x\,,

where :math:`k_x = \tfrac{\Omega}{c} \vec{\mathrm e}_\Omega \cdot \vec{\mathrm e}_x = -\tfrac{\Omega}{c}\sin\theta` with :math:`\theta=\theta(\Omega)` being the angle enclosed by the propagation directions of frequency :math:`\Omega` and the central laser frequency :math:`\Omega_0`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have loved to see the symmetry $\vec{\mathrm e}\Omega \cdot \vec{\mathrm e}{\Omega_0}$ exposed here but I agree that for the rest of the text choosing that direction to be $x$ upfront probably eases notation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, and it is also the way PIConGPU internally implements the lasers. They propagate along x and the internal system is rotated according to the users choice of PropagationDirection in params.

Comment on lines +140 to +160
Result
^^^^^^
According to the definitions above

.. math::
\hat E(x,y,z,\Omega) = \hat E_x \cdot \hat E_y\,.

Copy link
Contributor

Choose a reason for hiding this comment

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

This currently provides very little additional value as a separate section. I'd either drop the section heading or expand on this further by, e.g., providing the full formula plugged in with the various terms.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well you probably find it obvious since it is written this explicitly. But I am afraid it wouldn't be that obvious when removing the section title. It is only this high in document hierarchy because of its importance.

Copy link
Contributor

@chillenzer chillenzer left a comment

Choose a reason for hiding this comment

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

Sorry, wrong button. But it's very quick fixes.

@PrometheusPi
Copy link
Member

@steindev what is the status of this PR?

chillenzer
chillenzer previously approved these changes Aug 12, 2025
Copy link
Member

@PrometheusPi PrometheusPi left a comment

Choose a reason for hiding this comment

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

minor questions

.. math::
\hat{\vec E}(\vec r, \Omega) = \hat E_\mathrm{A}(\vec r, \Omega) e^{-\imath \varphi(\vec r, \Omega)}\vec{\mathrm e}_x\,,

where :math:`\Omega=2\pi\nu` is the angular frequency and :math:`\vec r` the position considered, :math:`\hat E_\mathrm{A}` is the spectral amplitude and
Copy link
Member

Choose a reason for hiding this comment

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

you never defined $\nu$

:math:`\varphi=\tfrac{\Omega}{c} \vec{\mathrm e}_\Omega \cdot \vec r`
the spectral phase of the pulse,
with :math:`\vec{\mathrm e}_\Omega` being the propagation direction of frequency :math:`\Omega`.
Dispersions are assumed to occur only in the plane spanned by the direction of pulse propagation :math:`\vec{\mathrm e}_z`, being equal to the direction of propagation of the central frequency :math:`\Omega_0`, and polarization :math:`\vec{\mathrm e}_x`, i.e. :math:`\vec{\mathrm e}_\Omega \cdot \vec{\mathrm e}_y = 0`.
Copy link
Member

@PrometheusPi PrometheusPi Aug 13, 2025

Choose a reason for hiding this comment

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

Is this generally true or only for the central frequency?

Suggested change
Dispersions are assumed to occur only in the plane spanned by the direction of pulse propagation :math:`\vec{\mathrm e}_z`, being equal to the direction of propagation of the central frequency :math:`\Omega_0`, and polarization :math:`\vec{\mathrm e}_x`, i.e. :math:`\vec{\mathrm e}_\Omega \cdot \vec{\mathrm e}_y = 0`.
Dispersions are assumed to occur only in the plane spanned by the direction of pulse propagation :math:`\vec{\mathrm e}_z`, being equal to the direction of propagation of the central frequency :math:`\Omega_0`, and polarization :math:`\vec{\mathrm e}_x`, i.e. :math:`\vec{\mathrm e}_{\Omega_0} \cdot \vec{\mathrm e}_y = 0`.

Copy link
Member

Choose a reason for hiding this comment

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

Could you answer this question?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I think you never saw this question - even if it from August. 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed

Copy link
Member Author

Choose a reason for hiding this comment

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

But what is the question? The sentence is incomplete

This last exponential simply contributes a term to :math:`\gamma_4`, which is located between eqs. (13) and (14) in [Steiniger2024]_, in the form of

.. math::
\gamma_4\; +\negthickspace= -\frac{y^2 R_y^{-1}(z)}{2c}\frac{1}{\tau_0}\,.
Copy link
Member

Choose a reason for hiding this comment

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

This renders as $+=$ - what is this suppose to mean in this mathematical context?

@chillenzer
Copy link
Contributor

Updates?

@PrometheusPi
Copy link
Member

@steindev what is the status of this PR?

@steindev
Copy link
Member Author

Work in progress. Might come back to it this or next week.

@chillenzer
Copy link
Contributor

Poke

steindev and others added 7 commits October 2, 2025 11:10
Co-authored-by: chillenzer <107195608+chillenzer@users.noreply.github.com>
Co-authored-by: chillenzer <107195608+chillenzer@users.noreply.github.com>
Co-authored-by: chillenzer <107195608+chillenzer@users.noreply.github.com>
@steindev steindev force-pushed the 2025-06_add-laser-doc branch from 72f7b11 to 4caaf07 Compare October 2, 2025 11:32
@steindev
Copy link
Member Author

steindev commented Oct 2, 2025

@PrometheusPi @chillenzer @BeyondEspresso @finnolec Ready for review!

PrometheusPi
PrometheusPi previously approved these changes Oct 7, 2025
Copy link
Member

@PrometheusPi PrometheusPi left a comment

Choose a reason for hiding this comment

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

Only minor suggestions - rendered doc page looks good.

The profile assumes a gaussian shape for the laser's spectrum.
The respective in-focus values of these dispersions can be provided as parameters.
However, the electric field values in time domain are computed from the field's values in frequency domain by a discrete Fourier transform.
Therefore, it is possible to use any other shape of the laser's spectrum by modifying the profile's source code.
Copy link
Member

Choose a reason for hiding this comment

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

Could you link to the lines in the source code here?

:math:`\varphi=\tfrac{\Omega}{c} \vec{\mathrm e}_\Omega \cdot \vec r`
the spectral phase of the pulse,
with :math:`\vec{\mathrm e}_\Omega` being the propagation direction of frequency :math:`\Omega`.
Dispersions are assumed to occur only in the plane spanned by the direction of pulse propagation :math:`\vec{\mathrm e}_z`, being equal to the direction of propagation of the central frequency :math:`\Omega_0`, and polarization :math:`\vec{\mathrm e}_x`, i.e. :math:`\vec{\mathrm e}_\Omega \cdot \vec{\mathrm e}_y = 0`.
Copy link
Member

Choose a reason for hiding this comment

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

Could you answer this question?

the spectral phase of the pulse,
with :math:`\vec{\mathrm e}_\Omega` being the propagation direction of frequency :math:`\Omega`.
Dispersions are assumed to occur only in the plane spanned by the direction of pulse propagation :math:`\vec{\mathrm e}_z`, being equal to the direction of propagation of the central frequency :math:`\Omega_0`, and polarization :math:`\vec{\mathrm e}_x`, i.e. :math:`\vec{\mathrm e}_\Omega \cdot \vec{\mathrm e}_y = 0`.
This implies, that the spectral phase does not vary along the :math:`y`-direction in focus, i.e.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This implies, that the spectral phase does not vary along the :math:`y`-direction in focus, i.e.
This implies that the spectral phase does not vary along the :math:`y`-direction in focus, i.e.

Copy link
Member

Choose a reason for hiding this comment

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

I do not understand what you mean with "y-direction in focus" (knowing that y is the common laser propagation direction)

Furthermore, above you say:

direction of pulse propagation :math:\vec{\mathrm e}_z,

This seems to contrast the new propagation direction y here and might lead to confusion.

Copy link
Member

Choose a reason for hiding this comment

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

Okay -it's clear now: y-direction here is orthogonal to laser polarization in x and propagation in z.
Fine.

Derivation
^^^^^^^^^^
[Steiniger2024]_ computed the 2D :math:`\hat E_x(x,z,\Omega)` part of eq. :math:`\bigstar`, i.e. computed :math:`\clubsuit` and thereby omitted the last integral in :math:`\bigstar`.
The result of this last integral can be read off from the known solution for the 2D part, being provided in eq. (6) of [Steiniger2024]_.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The result of this last integral can be read off from the known solution for the 2D part, being provided in eq. (6) of [Steiniger2024]_.
The result of this last integral can be read from the known solution for the 2D part, being provided in eq. (6) of [Steiniger2024]_.

Copy link
Member

Choose a reason for hiding this comment

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

Just a suggestion

\mathrm e^{\imath\frac{1}{2}\arctan\frac{z}{z_{\mathrm R,y}}}
\mathrm e^{-\imath \frac{y^2 R_y^{-1}(z)}{2c}\frac{1}{\tau_0}\Omega^\prime}

only the last exponential depends on frequency :math:`\Omega^\prime` and needs to be taken into account in the Fourier transform.
Copy link
Member

Choose a reason for hiding this comment

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

is "exponential" here correct or "exponent"

Co-authored-by: Richard Pausch <r.pausch@hzdr.de>
@chillenzer
Copy link
Contributor

What's the status here? Occasional green reviews and then updates again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:no-compile CI is skipping compile/runtime tests but runs PICMI tests documentation regarding documentation or wiki discussions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants