Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dolfin_dic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ALVAREZ BARRIENTOS Felipe
dolfin_dic
Commits
bb409aed
Commit
bb409aed
authored
6 years ago
by
Martin Genet
Browse files
Options
Downloads
Patches
Plain Diff
Phase shift to get magnitude and signed normalized images to match
parent
9ffb3bb2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generate_images.py
+26
-26
26 additions, 26 deletions
generate_images.py
with
26 additions
and
26 deletions
generate_images.py
+
26
−
26
View file @
bb409aed
...
@@ -317,59 +317,59 @@ class Image():
...
@@ -317,59 +317,59 @@ class Image():
g
[
2
]
*=
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
2
]
/
self
.
s
)
/
3
g
[
2
]
*=
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
2
]
/
self
.
s
)
/
3
def
I0_texture_tagging_signed_normalized_X
(
self
,
X
,
i
,
g
=
None
):
def
I0_texture_tagging_signed_normalized_X
(
self
,
X
,
i
,
g
=
None
):
i
[
0
]
*=
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
))
/
2
i
[
0
]
*=
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
if
(
g
is
not
None
):
if
(
g
is
not
None
):
g
[
0
]
*=
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
0
]
/
self
.
s
)
/
2
g
[
0
]
*=
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
0
]
/
self
.
s
-
math
.
pi
/
2
)
/
2
g
[
1
]
*=
0
g
[
1
]
*=
0
g
[
2
]
*=
0
g
[
2
]
*=
0
def
I0_texture_tagging_signed_normalized_Y
(
self
,
X
,
i
,
g
=
None
):
def
I0_texture_tagging_signed_normalized_Y
(
self
,
X
,
i
,
g
=
None
):
i
[
0
]
*=
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
))
/
2
i
[
0
]
*=
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
if
(
g
is
not
None
):
if
(
g
is
not
None
):
g
[
0
]
*=
0
g
[
0
]
*=
0
g
[
1
]
*=
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
1
]
/
self
.
s
)
/
2
g
[
1
]
*=
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
1
]
/
self
.
s
-
math
.
pi
/
2
)
/
2
g
[
2
]
*=
0
g
[
2
]
*=
0
def
I0_texture_tagging_signed_normalized_Z
(
self
,
X
,
i
,
g
=
None
):
def
I0_texture_tagging_signed_normalized_Z
(
self
,
X
,
i
,
g
=
None
):
i
[
0
]
*=
(
1
+
math
.
sin
(
math
.
pi
*
X
[
2
]
/
self
.
s
))
/
2
i
[
0
]
*=
(
1
+
math
.
sin
(
math
.
pi
*
X
[
2
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
if
(
g
is
not
None
):
if
(
g
is
not
None
):
g
[
0
]
*=
0
g
[
0
]
*=
0
g
[
1
]
*=
0
g
[
1
]
*=
0
g
[
2
]
*=
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
2
]
/
self
.
s
)
/
2
g
[
2
]
*=
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
2
]
/
self
.
s
-
math
.
pi
/
2
)
/
2
def
I0_texture_tagging_signed_normalized_XY
(
self
,
X
,
i
,
g
=
None
):
def
I0_texture_tagging_signed_normalized_XY
(
self
,
X
,
i
,
g
=
None
):
i
[
0
]
*=
(
1
+
3
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
))
/
2
i
[
0
]
*=
(
1
+
3
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
))
/
2
)
**
(
1.
/
2
)
-
1
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
)
**
(
1.
/
2
)
-
1
if
(
g
is
not
None
):
if
(
g
is
not
None
):
g
[
0
]
*=
3
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
0
]
/
self
.
s
)
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
))
/
2
/
2
/
(
i
[
0
]
+
1
)
g
[
0
]
*=
3
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
0
]
/
self
.
s
-
math
.
pi
/
2
)
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
/
2
/
(
i
[
0
]
+
1
)
g
[
1
]
*=
3
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
))
/
2
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
1
]
/
self
.
s
)
/
2
/
2
/
(
i
[
0
]
+
1
)
g
[
1
]
*=
3
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
1
]
/
self
.
s
-
math
.
pi
/
2
)
/
2
/
2
/
(
i
[
0
]
+
1
)
g
[
2
]
*=
0
g
[
2
]
*=
0
#def I0_texture_tagging_signed_normalized_XY(self, X, i, g=None):
#def I0_texture_tagging_signed_normalized_XY(self, X, i, g=None):
#i[0] *= ((1+math.sin(math.pi*X[0]/self.s))/2
#i[0] *= ((1+math.sin(math.pi*X[0]/self.s
-math.pi/2
))/2
#+ (1+math.sin(math.pi*X[1]/self.s))/2)/2
#+ (1+math.sin(math.pi*X[1]/self.s
-math.pi/2
))/2)/2
#if (g is not None):
#if (g is not None):
#g[0] *= (math.pi/self.s)*math.cos(math.pi*X[0]/self.s)/2 / 2
#g[0] *= (math.pi/self.s)*math.cos(math.pi*X[0]/self.s
-math.pi/2
)/2 / 2
#g[1] *= (math.pi/self.s)*math.cos(math.pi*X[1]/self.s)/2 / 2
#g[1] *= (math.pi/self.s)*math.cos(math.pi*X[1]/self.s
-math.pi/2
)/2 / 2
#g[2] *= 0.
#g[2] *= 0.
def
I0_texture_tagging_signed_normalized_XYZ
(
self
,
X
,
i
,
g
=
None
):
def
I0_texture_tagging_signed_normalized_XYZ
(
self
,
X
,
i
,
g
=
None
):
i
[
0
]
*=
(
1
+
7
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
))
/
2
i
[
0
]
*=
(
1
+
7
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
))
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
2
]
/
self
.
s
))
/
2
)
**
(
1.
/
3
)
-
1
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
2
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
)
**
(
1.
/
3
)
-
1
if
(
g
is
not
None
):
if
(
g
is
not
None
):
g
[
0
]
*=
7
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
0
]
/
self
.
s
)
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
))
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
2
]
/
self
.
s
))
/
2
/
3
/
(
i
[
0
]
+
1
)
g
[
0
]
*=
7
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
0
]
/
self
.
s
-
math
.
pi
/
2
)
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
2
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
/
3
/
(
i
[
0
]
+
1
)
g
[
1
]
*=
7
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
))
/
2
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
1
]
/
self
.
s
)
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
2
]
/
self
.
s
))
/
2
/
3
/
(
i
[
0
]
+
1
)
g
[
1
]
*=
7
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
1
]
/
self
.
s
-
math
.
pi
/
2
)
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
2
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
/
3
/
(
i
[
0
]
+
1
)
g
[
2
]
*=
7
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
))
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
))
/
2
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
2
]
/
self
.
s
)
/
2
/
3
/
(
i
[
0
]
+
1
)
g
[
2
]
*=
7
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
0
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
*
(
1
+
math
.
sin
(
math
.
pi
*
X
[
1
]
/
self
.
s
-
math
.
pi
/
2
))
/
2
*
(
math
.
pi
/
self
.
s
)
*
math
.
cos
(
math
.
pi
*
X
[
2
]
/
self
.
s
-
math
.
pi
/
2
)
/
2
/
3
/
(
i
[
0
]
+
1
)
#def I0_texture_tagging_signed_normalized_XYZ(self, X, i, g=None):
#def I0_texture_tagging_signed_normalized_XYZ(self, X, i, g=None):
#i[0] *= ((1+math.sin(math.pi*X[0]/self.s))/2
#i[0] *= ((1+math.sin(math.pi*X[0]/self.s
-math.pi/2
))/2
#+ (1+math.sin(math.pi*X[1]/self.s))/2
#+ (1+math.sin(math.pi*X[1]/self.s
-math.pi/2
))/2
#+ (1+math.sin(math.pi*X[2]/self.s))/2)/3
#+ (1+math.sin(math.pi*X[2]/self.s
-math.pi/2
))/2)/3
#if (g is not None):
#if (g is not None):
#g[0] *= (math.pi/self.s)*math.cos(math.pi*X[0]/self.s)/2 / 3
#g[0] *= (math.pi/self.s)*math.cos(math.pi*X[0]/self.s
-math.pi/2
)/2 / 3
#g[1] *= (math.pi/self.s)*math.cos(math.pi*X[1]/self.s)/2 / 3
#g[1] *= (math.pi/self.s)*math.cos(math.pi*X[1]/self.s
-math.pi/2
)/2 / 3
#g[2] *= (math.pi/self.s)*math.cos(math.pi*X[2]/self.s)/2 / 3
#g[2] *= (math.pi/self.s)*math.cos(math.pi*X[2]/self.s
-math.pi/2
)/2 / 3
def
I0_noise_no
(
self
,
i
,
g
=
None
):
def
I0_noise_no
(
self
,
i
,
g
=
None
):
pass
pass
...
...
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