Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
7bc7f7ba
Commit
7bc7f7ba
authored
Jan 14, 2019
by
Philipp Arras
Browse files
fixup! Add docu
parent
626bbc0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/slope_operator.py
View file @
7bc7f7ba
...
...
@@ -41,10 +41,14 @@ class SlopeOperator(LinearOperator):
"""
def
__init__
(
self
,
target
):
if
not
isinstance
(
target
,
LogRGSpace
)
or
not
len
(
target
.
shape
)
!=
1
:
raise
TypeError
(
"Slope Operator only works for ndim == 1"
)
self
.
_domain
=
DomainTuple
.
make
(
UnstructuredDomain
((
2
,)))
self
.
_target
=
DomainTuple
.
make
(
target
)
if
len
(
self
.
_target
)
>
1
:
raise
TypeError
if
len
(
self
.
_target
[
0
].
shape
)
>
1
:
raise
TypeError
if
not
isinstance
(
self
.
_target
[
0
],
LogRGSpace
):
raise
TypeError
self
.
_domain
=
DomainTuple
.
make
(
UnstructuredDomain
((
2
,)))
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
pos
=
self
.
target
[
0
].
get_k_array
()
-
self
.
target
[
0
].
t_0
[
0
]
self
.
_pos
=
pos
[
0
,
1
:]
...
...
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