Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
72899421
Commit
72899421
authored
Feb 27, 2019
by
Lukas Platz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix demo function `convtest`: use test_signal instead of signal
parent
a65cc4fa
Pipeline
#44308
passed with stages
in 9 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
demos/misc/convolution.py
demos/misc/convolution.py
+6
-7
No files found.
demos/misc/convolution.py
View file @
72899421
...
...
@@ -5,16 +5,15 @@ import nifty5 as ift
def
convtest
(
test_signal
,
delta
,
func
):
domain
=
test_signal
.
domain
codom
=
domain
[
0
].
get_default_codomain
()
# Create Convolution Operator
conv_op
=
ift
.
FuncConvolutionOperator
(
domain
,
func
)
# Convolve, Adjoint-Convolve
conv_signal
=
conv_op
(
signal
)
conv_signal
=
conv_op
(
test_
signal
)
cac_signal
=
conv_op
.
adjoint_times
(
conv_signal
)
print
(
signal
.
integrate
(),
conv_signal
.
integrate
(),
cac_signal
.
integrate
())
print
(
test_signal
.
integrate
(),
conv_signal
.
integrate
(),
cac_signal
.
integrate
())
# generate kernel image
conv_delta
=
conv_op
(
delta
)
...
...
@@ -37,7 +36,7 @@ domain = ift.HPSpace(nside)
# Define test signal (some point sources)
signal_vals
=
np
.
zeros
(
npix
,
dtype
=
np
.
float64
)
for
i
in
range
(
0
,
npix
,
npix
//
12
+
27
):
signal_vals
[
i
]
=
1
.
signal_vals
[
i
]
=
500
.
signal
=
ift
.
from_global_data
(
domain
,
signal_vals
)
...
...
@@ -57,8 +56,8 @@ convtest(signal, delta, func)
domain
=
ift
.
RGSpace
((
100
,
100
))
# Define test signal (some point sources)
signal_vals
=
np
.
zeros
(
domain
.
shape
,
dtype
=
np
.
float64
)
signal_vals
[
35
,
70
]
=
1
signal_vals
[
45
,
8
]
=
1
signal_vals
[
35
,
70
]
=
5000.
signal_vals
[
45
,
8
]
=
5000.
signal
=
ift
.
from_global_data
(
domain
,
signal_vals
)
# Define delta signal, generate kernel image
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment