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

Enable initialisation and estimation of optional spatio-temperal coupling parameters to gaussian profile #307

Open
wants to merge 230 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
63dcc2d
add spatio_temperal parameters to class GaussianLongitudinalProfile(L…
huixingjian Oct 15, 2024
6bfff8b
fix typo
huixingjian Oct 15, 2024
d90e2ca
add stc parameters sto GaussianProfile
huixingjian Oct 16, 2024
498cf62
pass the parameters to GaussianProfile
huixingjian Oct 16, 2024
ed7eb7e
fix syntax error
huixingjian Oct 16, 2024
efa4173
fix doc error
huixingjian Oct 16, 2024
4608356
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 16, 2024
4752ad1
cancel the if condition for longitudinal profile
huixingjian Oct 16, 2024
d2732b3
fix syntax error
huixingjian Oct 16, 2024
00a5c39
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 16, 2024
70d9742
Update gaussian_profile.py
huixingjian Oct 16, 2024
98c2098
Update gaussian_profile.py
huixingjian Oct 16, 2024
ef692b4
imaginary part is pure zero, debug
huixingjian Oct 17, 2024
2d8138e
Merge branch 'add_diag_util' of https://github.com/huixingjian/lasy- …
huixingjian Oct 17, 2024
44ffdf2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2024
9da2638
cancel laser_utils
huixingjian Oct 17, 2024
8e77a0b
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 17, 2024
671307a
Update gaussian_profile.py
huixingjian Oct 17, 2024
5be684c
Update laser_utils.py
huixingjian Oct 17, 2024
54ead90
add phi calculater in utils
huixingjian Oct 18, 2024
dcff203
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 18, 2024
2036c5d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
ba9700a
add debug print
huixingjian Oct 18, 2024
1cbc96a
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 18, 2024
8c247a7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
3244c55
typo
huixingjian Oct 18, 2024
6829ad7
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 18, 2024
7248e5b
cancel unreasonable if on inv_waist
huixingjian Oct 18, 2024
cb99b32
typo
huixingjian Oct 18, 2024
a267c33
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
8e7b614
upadte get_STC for zeta and beta
huixingjian Oct 18, 2024
917cd21
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 18, 2024
dd908de
cancel debug print
huixingjian Oct 18, 2024
4178f4e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
fc5c3c8
finish get_STC
huixingjian Oct 18, 2024
0c9f7cc
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 18, 2024
8b0e8d6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
b5bf126
upadte the comments of the functions
huixingjian Oct 18, 2024
1035d86
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
3bec632
update the comment
huixingjian Oct 18, 2024
fd0247c
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 18, 2024
9d7d6bf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
70dffcd
Update longitudinal_profile.py
huixingjian Oct 18, 2024
6fb52a8
fix auto-check error
huixingjian Oct 18, 2024
999c58d
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 18, 2024
9a7edc1
Update laser_utils.py
huixingjian Oct 18, 2024
ce26fdd
Update laser_utils.py
huixingjian Oct 18, 2024
633c324
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
6fb6078
Update laser_utils.py
huixingjian Oct 18, 2024
25fe152
Update laser_utils.py
huixingjian Oct 18, 2024
d595d2d
Update laser_utils.py
huixingjian Oct 18, 2024
87c0b5e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
be71e13
Update laser_utils.py
huixingjian Oct 18, 2024
10eb817
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
68cd2b3
Update gaussian_profile.py
huixingjian Oct 18, 2024
08a7060
Update gaussian_profile.py
huixingjian Oct 18, 2024
6834e36
Update gaussian_profile.py
huixingjian Oct 18, 2024
28f45a0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
95c9fa4
fix doc error
huixingjian Oct 18, 2024
35e2e0c
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 18, 2024
8969358
Update gaussian_profile.py
huixingjian Oct 18, 2024
dbd45e0
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 18, 2024
19aa383
Update gaussian_profile.py
huixingjian Oct 18, 2024
e8303e6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
1d16dd1
Update gaussian_profile.py
huixingjian Oct 18, 2024
a6625a6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
fccc205
Update gaussian_profile.py
huixingjian Oct 18, 2024
c2cb1dd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
fd75558
Update gaussian_profile.py
huixingjian Oct 18, 2024
48012b1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
b755151
Update gaussian_profile.py
huixingjian Oct 18, 2024
fdd64c9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
3ecd912
Update laser_utils.py
huixingjian Oct 18, 2024
54eefc3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
c867f45
Update laser_utils.py
huixingjian Oct 18, 2024
e220fb9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
cb19a8c
Update laser_utils.py
huixingjian Oct 18, 2024
3318dcf
Update laser_utils.py
huixingjian Oct 18, 2024
36b4ebc
Update gaussian_profile.py
huixingjian Oct 18, 2024
320c81b
Update gaussian_profile.py
huixingjian Oct 18, 2024
4d77753
Update gaussian_profile.py
huixingjian Oct 18, 2024
f745197
Update gaussian_profile.py
huixingjian Oct 18, 2024
bb206fd
Update gaussian_profile.py
huixingjian Oct 18, 2024
0c6fc28
Update gaussian_profile.py
huixingjian Oct 18, 2024
b117d33
Update gaussian_profile.py
huixingjian Oct 18, 2024
cf738f5
Update gaussian_profile.py
huixingjian Oct 18, 2024
635f9a4
Update gaussian_profile.py
huixingjian Oct 18, 2024
67be673
Update laser_utils.py
huixingjian Oct 18, 2024
3ec6d4b
Update laser_utils.py
huixingjian Oct 18, 2024
eb92ac7
Update laser_utils.py
huixingjian Oct 18, 2024
d22d379
Update laser_utils.py
huixingjian Oct 18, 2024
1a37f08
Update gaussian_profile.py
huixingjian Oct 18, 2024
9a0ba6f
Update gaussian_profile.py
huixingjian Oct 18, 2024
4e9d62f
Update laser_utils.py
huixingjian Oct 18, 2024
542b29d
change np.diff to np.gradient
huixingjian Oct 29, 2024
cd4bdf0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
d20959e
use numpy calculate weighed average
huixingjian Oct 29, 2024
b36160b
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
04a827d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
4c91d5e
fix the dimention of average calculation
huixingjian Oct 29, 2024
a79c56b
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
a8a204f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
2a96126
fix dimension again
huixingjian Oct 29, 2024
aa414d5
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
b115b38
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
4c3b620
calculate phi2
huixingjian Oct 29, 2024
2b64d4e
change all the weighted average to mnumpy
huixingjian Oct 29, 2024
750e005
add comments
huixingjian Oct 29, 2024
98b1403
transfer w0_tau calculation inside get_STC
huixingjian Oct 29, 2024
4e486d8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
9af4b3f
fix bug on 1D average
huixingjian Oct 29, 2024
f0b03db
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
9263541
debug pft issue
huixingjian Oct 29, 2024
61f0fb5
change back to original
huixingjian Oct 29, 2024
463ed36
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
df366a6
change average of nu to original
huixingjian Oct 29, 2024
38c93e2
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
31ed7bc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
e3fe00d
debug check tau and w0
huixingjian Oct 29, 2024
420674e
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
681fbbd
some debug
huixingjian Oct 29, 2024
b02591d
add document in get_w0 function
huixingjian Oct 29, 2024
8dea652
DOCUMENT syntax error
huixingjian Oct 29, 2024
7af8573
typo
huixingjian Oct 29, 2024
28c67ce
conver zeta to spectrum expression
huixingjian Oct 29, 2024
1a0a2e0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
52985ae
syntex error
huixingjian Oct 29, 2024
723b42b
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
b889ed1
DEBUG
huixingjian Oct 29, 2024
53ed71f
DEBUG
huixingjian Oct 29, 2024
027272c
fix average axis
huixingjian Oct 29, 2024
8322337
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
ea38499
dimension error
huixingjian Oct 29, 2024
eccd2e8
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
2a587bc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
c444d65
still dimension
huixingjian Oct 29, 2024
0240a8d
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
5183a4b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
951af57
debug
huixingjian Oct 29, 2024
ccb9835
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
6311881
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
7fc7cbb
FIX dimension
huixingjian Oct 29, 2024
85f479e
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
2ac2d8b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
3c8998e
fix axis of dx
huixingjian Oct 29, 2024
50b492e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
859d320
still unmatch
huixingjian Oct 29, 2024
b8f3a8e
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
79a5998
final fix
huixingjian Oct 29, 2024
98fdabd
try gain
huixingjian Oct 29, 2024
c5c114a
fixed
huixingjian Oct 29, 2024
3bb6ee3
calculate zeta
huixingjian Oct 29, 2024
24a313f
fix zeta
huixingjian Oct 29, 2024
55b9db7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
08e32a6
fix dxdw
huixingjian Oct 29, 2024
335bc9a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
750c395
print the dimensions
huixingjian Oct 29, 2024
0f47ce8
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
40aab65
TYPO
huixingjian Oct 29, 2024
ea013bc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
852f545
name confliction
huixingjian Oct 29, 2024
5ba8108
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
ee8128f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
f236de3
check y dir
huixingjian Oct 29, 2024
c7999eb
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
f4866b3
SETTLE
huixingjian Oct 29, 2024
5ee8dfe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
06975f5
update zeta calculation for rt
huixingjian Oct 29, 2024
77f84a3
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
f8b2b87
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
5657ae9
update zeta for xyt
huixingjian Oct 29, 2024
f227593
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
76a26fc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
d061713
fix bug
huixingjian Oct 29, 2024
10b1a90
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
768842a
Update laser_utils.py
huixingjian Oct 29, 2024
f39be57
clean the comments
huixingjian Oct 29, 2024
b4f9207
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
29495d1
Update laser.py
huixingjian Oct 29, 2024
7dba5cd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
8bb4c42
check the shape of phi2 and nu
huixingjian Oct 29, 2024
ff5bb80
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
e3c5e87
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
869c270
calculate phi2 distribution
huixingjian Oct 29, 2024
da2767a
phi2
huixingjian Oct 29, 2024
290f953
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
eece1ee
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
783a6e9
calculate weight phi2nu
huixingjian Oct 29, 2024
7c62af6
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
07ab813
clearn the confliction
huixingjian Oct 29, 2024
2be5430
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
a8f314d
syntx error
huixingjian Oct 29, 2024
3716454
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
1930b61
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
fbeeab2
check phi2mean
huixingjian Oct 29, 2024
ec2e079
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
6e0729e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
208d948
phi2
huixingjian Oct 29, 2024
4c0f1d5
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
2ba3382
phi2 matrix
huixingjian Oct 29, 2024
539de75
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
70260c3
add np.max
huixingjian Oct 29, 2024
e7046e2
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
10f7fb6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
56b9e1c
fix averga weight
huixingjian Oct 29, 2024
e7cf2e8
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
ff98723
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
620ebc1
screw beta, wont work
huixingjian Oct 29, 2024
fec6969
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 29, 2024
23b82f9
add CI test
huixingjian Oct 30, 2024
52e78ab
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 30, 2024
2c8a2c5
Update test_STC.py
huixingjian Oct 30, 2024
936d5b8
Update laser_utils.py
huixingjian Oct 30, 2024
d428c38
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 30, 2024
ab04fd8
Update test_STC.py
huixingjian Oct 30, 2024
9d8ac04
Update laser_utils.py
huixingjian Oct 30, 2024
0d53cc5
Update laser_utils.py
huixingjian Oct 30, 2024
77ba254
Update laser_utils.py
huixingjian Oct 30, 2024
85d5ae0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 30, 2024
7078e96
Update laser_utils.py
huixingjian Oct 30, 2024
a404f53
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 30, 2024
4f1ae2a
use temporal profile to calculate nu in rt
huixingjian Oct 30, 2024
d9ceb7b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 30, 2024
b2ed082
update zeta calculation
huixingjian Oct 30, 2024
acff2ea
Merge remote-tracking branch 'refs/remotes/huixingjian/add_diag_util'…
huixingjian Oct 30, 2024
b699d89
syntax error
huixingjian Oct 30, 2024
13972f0
brackte
huixingjian Oct 30, 2024
bf38936
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 30, 2024
6c2c045
Update test_STC.py
huixingjian Nov 5, 2024
f9a189f
Update laser_utils.py
huixingjian Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lasy/profiles/combined_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,7 @@ def evaluate(self, x, y, t):
Contains the value of the envelope at the specified points
This array has the same shape as the arrays x, y, t
"""
envelope = self.trans_profile.evaluate(x, y) * self.long_profile.evaluate(t)
envelope = self.trans_profile.evaluate(x, y) * self.long_profile.evaluate(
t, x, y
)
return envelope
55 changes: 53 additions & 2 deletions lasy/profiles/gaussian_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,34 @@ class GaussianProfile(CombinedLongitudinalTransverseProfile):
z_foc : float (in meter), optional
Position of the focal plane. (The laser pulse is initialized at `z=0`.)

beta : float (in second), optional
The angular dispersion parameterized by

.. math::

\beta = \frac{d\theta_0}{d\omega}
Here :math:`\theta_0` is the propagation angle of this component.

phi2 : float (in second^2), optional (default '0')
The group-delay dispertion parameterized by

.. math::

\phi^{(2)} = \frac{dt}{d\omega}

zeta : float (in meter * second) optional (default '0')
The spatio-chirp parameterized by

.. math::

\zeta = \frac{x_0}{d\omega}
Here :math:`x_0` is the beam center position.

stc_theta : float (in rad) optional (default '0')
Transeverse direction along which spatio-temperal field couples.
0 is along x axis.


Examples
--------
>>> import matplotlib.pyplot as plt
Expand Down Expand Up @@ -104,12 +132,35 @@ class GaussianProfile(CombinedLongitudinalTransverseProfile):
"""

def __init__(
self, wavelength, pol, laser_energy, w0, tau, t_peak, cep_phase=0, z_foc=0
self,
wavelength,
pol,
laser_energy,
w0,
tau,
t_peak,
cep_phase=0,
z_foc=0,
phi2=0,
beta=0,
zeta=0,
stc_theta=0,
):
super().__init__(
wavelength,
pol,
laser_energy,
GaussianLongitudinalProfile(wavelength, tau, t_peak, cep_phase),
GaussianLongitudinalProfile(
wavelength,
tau,
t_peak,
cep_phase,
beta=beta,
phi2=phi2,
zeta=zeta,
stc_theta=stc_theta,
w0=w0,
z_foc=z_foc,
),
GaussianTransverseProfile(w0, z_foc, wavelength),
)
106 changes: 98 additions & 8 deletions lasy/profiles/longitudinal/gaussian_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,126 @@
The time at which the laser envelope reaches its maximum amplitude,
i.e. :math:`t_{peak}` in the above formula.

cep_phase : float (in radian), optional
cep_phase : float (in radian), optional(default '0')
The Carrier Enveloppe Phase (CEP), i.e. :math:`\phi_{cep}`
in the above formula (i.e. the phase of the laser
oscillation, at the time where the laser envelope is maximum)
oscillation, at the time where the laser envelope is maximum).

beta : float (in second), optional
The angular dispersion parameterized by
.. math::
\beta = \frac{d\theta_0}{d\omega}
Here :math:`\theta_0` is the propagation angle of this component.

phi2 : float (in second^2), optional (default '0')
The group-delay dispertion parameterized by
.. math::
\phi^{(2)} = \frac{dt}{d\omega}

zeta : float (in meter * second) optional (defalut '0')
The spatio-chirp parameterized by
.. math::
\zeta = \frac{x_0}{d\omega}
Here :math:`x_0` is the beam center position.

stc_theta : float (in rad) optional (default '0')
Transeverse direction along which spatio-temperal field couples.
0 is along x axis.

z_foc : float (in meter), necessary if beta is not 0
Position of the focal plane. (The laser pulse is initialized at
``z=0``.)

w0 : float (in meter), necessary if beta is not 0
The waist of the laser pulse.
"""

def __init__(self, wavelength, tau, t_peak, cep_phase=0):
def __init__(
self,
wavelength,
tau,
t_peak,
cep_phase=0,
beta=0,
phi2=0,
zeta=0,
stc_theta=0,
w0=0,
z_foc=0,
):
super().__init__(wavelength)
self.tau = tau
self.t_peak = t_peak
self.cep_phase = cep_phase
self.beta = beta
self.phi2 = phi2
self.zeta = zeta
self.w0 = w0
self.stc_theta = stc_theta

def evaluate(self, t):
if z_foc == 0:
self.z_foc_over_zr = 0
else:
assert (
wavelength is not None
), "You need to pass the wavelength, when `z_foc` is non-zero."
self.z_foc_over_zr = z_foc * wavelength / (np.pi * w0**2)

def evaluate(self, t, x, y):
Fixed Show fixed Hide fixed
"""
Return the longitudinal envelope.

Parameters
----------
t : ndarrays of floats
Define points on which to evaluate the envelope
Define longitudinal points on which to evaluate the envelope

x,y : ndarrays of floats, necessray if spatio-temperal coulping exists
Define transverse points on which to evaluate the envelope

Returns
-------
envelope : ndarray of complex numbers
Contains the value of the longitudinal envelope at the
specified points. This array has the same shape as the array t.
"""
inv_tau2 = self.tau ** (-2)
assert (
x is not None and y is not None
), "transverse points should be specified if spatio-temperal coupling exits"
inv_complex_waist_2 = (
1.0
/ (self.w0**2 * (1.0 + 2.0j * self.z_foc_over_zr / (self.k0 * self.w0**2)))
if self.beta
else 0
)
stretch_factor = (
1
+ 4.0
* (self.zeta + self.beta * self.z_foc_over_zr * inv_tau2)
* (self.zeta + self.beta * self.z_foc_over_zr * inv_complex_waist_2)
+ 2.0j
* (self.phi2 - self.beta**2 * self.k0 * self.z_foc_over_zr)
* inv_tau2
)
stc_exponent = (
1.0
/ stretch_factor
* inv_tau2
* (
t
- self.t_peak
- self.beta
* self.k0
* (x * np.cos(self.stc_theta) + y * np.sin(self.stc_theta))
- 2.0j
* (x * np.cos(self.stc_theta) + y * np.sin(self.stc_theta))
* (self.zeta - self.beta * self.z_foc_over_zr)
* inv_complex_waist_2
)
** 2
)
envelope = np.exp(
-((t - self.t_peak) ** 2) / self.tau**2
+ 1.0j * (self.cep_phase + self.omega0 * self.t_peak)
-stc_exponent + 1.0j * (self.cep_phase + self.omega0 * self.t_peak)
)

return envelope
1 change: 1 addition & 0 deletions lasy/profiles/longitudinal/longitudinal_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
def __init__(self, wavelength):
self.lambda0 = wavelength
self.omega0 = 2 * pi * c / self.lambda0
self.k0 = 2.0 * pi / wavelength

def evaluate(self, t):

Check notice

Code scanning / CodeQL

Mismatch between signature and use of an overridden method Note

Overridden method signature does not match
call
, where it is passed too many arguments. Overriding method
method GaussianLongitudinalProfile.evaluate
matches the call.
"""
Return the longitudinal envelope.

Expand Down
Loading