Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
empyre
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dieter Weber
empyre
Commits
f6abe2ad
Commit
f6abe2ad
authored
7 years ago
by
Fengshan Zheng
Browse files
Options
Downloads
Patches
Plain Diff
kernel update
parent
d4b47c42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
demos/.ipynb_checkpoints/Pyramid Notebook Example-checkpoint.ipynb
+1611
-0
1611 additions, 0 deletions
...ynb_checkpoints/Pyramid Notebook Example-checkpoint.ipynb
pyramid/kernel.py
+2
-3
2 additions, 3 deletions
pyramid/kernel.py
with
1613 additions
and
3 deletions
demos/.ipynb_checkpoints/Pyramid Notebook Example-checkpoint.ipynb
0 → 100644
+
1611
−
0
View file @
f6abe2ad
This diff is collapsed.
Click to expand it.
pyramid/kernel.py
+
2
−
3
View file @
f6abe2ad
...
...
@@ -246,12 +246,12 @@ class KernelCharge(object):
v
=
np
.
linspace
(
-
(
v_dim
-
1
),
v_dim
-
1
,
num
=
2
*
v_dim
-
1
)
uu
,
vv
=
np
.
meshgrid
(
u
,
v
)
self
.
kc
=
np
.
empty
(
self
.
dim_kern
,
dtype
=
dtype
)
self
.
kc
[...]
=
coeff
*
self
.
_get_elementary_phase
(
electrode_vec
,
uu
,
vv
,
a
)
self
.
kc
[...]
=
a
*
coeff
*
self
.
_get_elementary_phase
(
electrode_vec
,
uu
,
vv
,
a
)
# Include perturbed reference wave:
if
prw_vec
is
not
None
:
uu
+=
prw_vec
[
1
]
vv
+=
prw_vec
[
0
]
self
.
kc
[...]
-=
coeff
*
self
.
_get_elementary_phase
(
electrode_vec
,
uu
,
vv
,
a
)
self
.
kc
[...]
-=
a
*
coeff
*
self
.
_get_elementary_phase
(
electrode_vec
,
uu
,
vv
,
a
)
# Calculate Fourier transform of kernel:
self
.
kc_fft
=
fft
.
rfftn
(
self
.
kc
,
self
.
dim_pad
)
self
.
_log
.
debug
(
'
Created
'
+
str
(
self
))
...
...
@@ -276,7 +276,6 @@ class KernelCharge(object):
r1
=
np
.
sqrt
(
n
**
2
+
m
**
2
)
r2
=
np
.
sqrt
((
n
-
u_img
)
**
2
+
(
m
-
v_img
)
**
2
)
# The square height when the path come across the sphere
# TODO: The radius of the sphere is 1 pixel, since everywhere calculation is done in pixel, here R=1.
R
=
1.
/
2
# the radius of the pixel
h1
=
R
**
2
-
r1
**
2
h2
=
R
**
2
-
r2
**
2
...
...
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