Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Steinlechner
pykat
Commits
888d777e
Commit
888d777e
authored
May 26, 2015
by
Sean Leavey
Browse files
Options
Downloads
Patches
Plain Diff
More tweaks. Code needs tested.
parent
84dd10c3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/fft/scale_propagation.py
+14
-9
14 additions, 9 deletions
examples/fft/scale_propagation.py
with
14 additions
and
9 deletions
examples/fft/scale_propagation.py
+
14
−
9
View file @
888d777e
...
@@ -14,12 +14,14 @@ May 2015
...
@@ -14,12 +14,14 @@ May 2015
import
pykat.oscar
as
oscar
import
pykat.oscar
as
oscar
import
pylab
as
pl
import
pylab
as
pl
import
numpy
as
np
import
numpy
as
np
#from mpl_toolkits.axes_grid1 import ImageGrid
import
matplotlib
as
mpl
import
matplotlib
as
mpl
def
main
():
def
main
():
### parameters
### parameters
# grid size
gridSize
=
(
512
,
512
)
# width, height
# power at laser [W]
# power at laser [W]
power
=
1
power
=
1
...
@@ -27,28 +29,31 @@ def main():
...
@@ -27,28 +29,31 @@ def main():
mode
=
'
HG 0 0
'
mode
=
'
HG 0 0
'
# waist size of beam at start [m]
# waist size of beam at start [m]
waist
=
2e-3
waist
=
1e-3
# radius of curvature [m]
roc
=
8
# unscaled physical grid size [m]
# unscaled physical grid size [m]
w0
=
10e-3
initialPhysicalSize
=
(
10e-3
,
10e-3
)
# scaled physical grid size [m]
# scaled physical grid size [m]
w1
=
5
e-3
scaledPhysicalSize
=
(
3e-3
,
3
e-3
)
# propagation distance [m]
# propagation distance [m]
distance
=
10
distance
=
2.5
# grid scale factor
# grid scale factor
scale
=
w1
/
w0
scale
=
0.3
### propagation
### propagation
# create different grids to demonstrate scaled propagation
# create different grids to demonstrate scaled propagation
grid1
=
oscar
.
grid
(
512
,
512
,
w0
,
w0
)
grid1
=
oscar
.
grid
(
gridSize
[
0
],
gridSize
[
1
],
initialPhysicalSize
[
0
],
initialPhysicalSize
[
1
]
)
grid2
=
oscar
.
grid
(
512
,
512
,
w1
,
w1
)
grid2
=
oscar
.
grid
(
gridSize
[
0
],
gridSize
[
1
],
scaledPhysicalSize
[
0
],
scaledPhysicalSize
[
1
]
)
# create input field
# create input field
laser
=
oscar
.
field
(
grid1
,
w
=
waist
,
power
=
power
,
mode
=
mode
)
laser
=
oscar
.
field
(
grid1
,
w
=
waist
,
Rc
=
roc
,
power
=
power
,
mode
=
mode
)
# create three identical fields
# create three identical fields
field0
=
laser
.
copy
()
field0
=
laser
.
copy
()
...
...
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
register
or
sign in
to comment