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
Compare revisions
master to 6f56004e3f6f9f8630c6fb3bdfb0fed7479a6590
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
weber/empyre
Select target project
No results found
6f56004e3f6f9f8630c6fb3bdfb0fed7479a6590
Select Git revision
Swap
Target
empyre/empyre
Select target project
empyre/empyre
weber/empyre
wessels/empyre
bryan/empyre
4 results
master
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
Fixed xy ordering error in plot_holo (np.gradient)
· 6f56004e
Jan Caron
authored
5 years ago
6f56004e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pyramid/phasemap.py
+4
-3
4 additions, 3 deletions
pyramid/phasemap.py
pyramid/version.py
+1
-1
1 addition, 1 deletion
pyramid/version.py
src/empyre/version.py
+4
-0
4 additions, 0 deletions
src/empyre/version.py
with
9 additions
and
4 deletions
pyramid/phasemap.py
View file @
6f56004e
...
...
@@ -770,8 +770,9 @@ class PhaseMap(object):
holo
/=
2
# Rescale to [0, 1]
# Calculate the phase gradients:
# B = rot(A) --> B_x = grad_y(A_z), B_y = -grad_x(A_z); phi_m ~ -int(A_z)
# sign switch --> B_x = -grad_y(phi_m), B_y = grad_x(phi_m)
grad_x
,
grad_y
=
np
.
gradient
(
self
.
phase
,
self
.
a
,
self
.
a
)
# for projection along +z: sign switch --> B_x = -grad_y(phi_m), B_y = grad_x(phi_m)
# for projection along -z: NO sign switch --> B_x = grad_y(phi_m), B_y = -grad_x(phi_m)
grad_y
,
grad_x
=
np
.
gradient
(
self
.
phase
,
self
.
a
,
self
.
a
)
# Clip outliers:
outlier_x
=
np
.
abs
(
grad_x
-
np
.
mean
(
grad_x
))
<
sigma_clip
*
np
.
std
(
grad_x
)
grad_x_sigma
=
np
.
where
(
outlier_x
,
grad_x
,
np
.
nan
)
...
...
@@ -784,7 +785,7 @@ class PhaseMap(object):
# Calculate colors:
if
cmap
is
None
:
cmap
=
colors
.
CMAP_CIRCULAR_DEFAULT
vector
=
np
.
asarray
((
grad_
x
,
-
grad_
y
,
np
.
zeros_like
(
grad_x
)))
vector
=
np
.
asarray
((
grad_
y
,
-
grad_
x
,
np
.
zeros_like
(
grad_x
)))
rgb
=
cmap
.
rgb_from_vector
(
vector
)
rgb
=
(
holo
.
T
*
rgb
.
T
).
T
.
astype
(
np
.
uint8
)
holo_image
=
Image
.
fromarray
(
rgb
)
...
...
This diff is collapsed.
Click to expand it.
pyramid/version.py
View file @
6f56004e
# -*- coding: utf-8 -*-
""""
This file was automatically generated by `setup.py`
"""
version
=
"
0.1.0.dev0
"
git_revision
=
"
a
9c22581a4bfd12bfadd9001ccf893f77fc1a6de
"
git_revision
=
"
a
44d6c228b1c4dbf867bc2982f28d1cfd9a0c249
"
This diff is collapsed.
Click to expand it.
src/empyre/version.py
0 → 100644
View file @
6f56004e
# -*- coding: utf-8 -*-
""""
This file was automatically generated by `setup.py`
"""
version
=
"
0.0.0
"
git_revision
=
"
ec897efbbcdfe4a72ae8f70f82072e03b521bb26
"
This diff is collapsed.
Click to expand it.