Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenQlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Automate
Agent sessions
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
las-nq
OpenQlab
Commits
149a05c1
Commit
149a05c1
authored
Oct 1, 2019
by
Jan Petermann
Browse files
Options
Downloads
Patches
Plain Diff
update gaussian beam parameter analysis
parent
083ed3b1
No related branches found
No related tags found
No related merge requests found
Pipeline
#4427
failed
Oct 1, 2019
Stage: test
Stage: build
Stage: test-build
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/openqlab/analysis/gaussian_beam.py
+13
-5
13 additions, 5 deletions
src/openqlab/analysis/gaussian_beam.py
with
13 additions
and
5 deletions
src/openqlab/analysis/gaussian_beam.py
+
13
−
5
View file @
149a05c1
...
@@ -84,13 +84,13 @@ def fit_beam_data(data,
...
@@ -84,13 +84,13 @@ def fit_beam_data(data,
return
results
return
results
class
GaussianBeam
()
:
class
GaussianBeam
:
"""
"""
Represents a complex gaussian beam parameter
Represents a complex gaussian beam parameter
"""
"""
def
__init__
(
self
,
q
=
0
+
1j
,
wavelength
=
1.064e-6
):
def
__init__
(
self
,
q
=
0
+
1j
,
wavelength
=
1.064e-6
):
self
.
_
lambda
=
wavelength
self
.
_
wavelength
=
wavelength
self
.
_q
=
q
self
.
_q
=
q
@classmethod
@classmethod
...
@@ -101,7 +101,7 @@ class GaussianBeam():
...
@@ -101,7 +101,7 @@ class GaussianBeam():
"""
"""
Returns the beam parameter after free-space propagation of d
Returns the beam parameter after free-space propagation of d
"""
"""
return
GaussianBeam
(
self
.
_q
+
d
)
return
GaussianBeam
(
self
.
_q
+
d
,
self
.
_wavelength
)
def
get_profile
(
self
,
zpoints
):
def
get_profile
(
self
,
zpoints
):
"""
"""
...
@@ -110,9 +110,17 @@ class GaussianBeam():
...
@@ -110,9 +110,17 @@ class GaussianBeam():
quotient
=
(
self
.
_q
.
real
+
zpoints
)
/
self
.
_q
.
imag
quotient
=
(
self
.
_q
.
real
+
zpoints
)
/
self
.
_q
.
imag
return
self
.
w0
*
np
.
sqrt
(
1
+
quotient
**
2
)
return
self
.
w0
*
np
.
sqrt
(
1
+
quotient
**
2
)
@property
def
wavelength
(
self
):
return
self
.
_wavelength
@property
def
q
(
self
):
return
self
.
_q
@property
@property
def
w0
(
self
):
def
w0
(
self
):
return
np
.
sqrt
(
self
.
_q
.
imag
*
self
.
_
lambda
/
np
.
pi
)
return
np
.
sqrt
(
self
.
_q
.
imag
*
self
.
_
wavelength
/
np
.
pi
)
@property
@property
def
z0
(
self
):
def
z0
(
self
):
...
@@ -138,7 +146,7 @@ class GaussianBeam():
...
@@ -138,7 +146,7 @@ class GaussianBeam():
"""
"""
Calculate beam divergence (in radian).
Calculate beam divergence (in radian).
"""
"""
return
np
.
arctan
(
self
.
_
lambda
/
np
.
pi
/
self
.
w0
)
return
np
.
arctan
(
self
.
_
wavelength
/
np
.
pi
/
self
.
w0
)
def
__repr__
(
self
):
def
__repr__
(
self
):
return
"
w0={w0} @ z0={z0}
"
.
format
(
return
"
w0={w0} @ z0={z0}
"
.
format
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment