Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
8466e7fc
Commit
8466e7fc
authored
Jul 08, 2018
by
Martin Reinecke
Browse files
cosmetics
parent
e69914c0
Changes
3
Show whitespace changes
Inline
Side-by-side
demos/getting_started_3.py
View file @
8466e7fc
...
...
@@ -22,9 +22,8 @@ if __name__ == '__main__':
ht
=
ift
.
HarmonicTransformOperator
(
harmonic_space
,
position_space
)
power_space
=
A
.
value
.
domain
[
0
]
power_distributor
=
ift
.
PowerDistributor
(
harmonic_space
,
power_space
)
position
=
{}
position
[
'xi'
]
=
ift
.
Field
.
from_random
(
'normal'
,
harmonic_space
)
position
=
ift
.
MultiField
.
from_dict
(
position
)
position
=
ift
.
MultiField
.
from_dict
(
{
'xi'
:
ift
.
Field
.
from_random
(
'normal'
,
harmonic_space
)})
xi
=
ift
.
Variable
(
position
)[
'xi'
]
Amp
=
power_distributor
(
A
)
...
...
@@ -35,6 +34,7 @@ if __name__ == '__main__':
# apply some nonlinearity
signal
=
ift
.
PointwisePositiveTanh
(
correlated_field
)
# Building the Line of Sight response
LOS_starts
,
LOS_ends
=
get_random_LOS
(
100
)
R
=
ift
.
LOSResponse
(
position_space
,
starts
=
LOS_starts
,
...
...
nifty5/models/linear_model.py
View file @
8466e7fc
...
...
@@ -44,6 +44,7 @@ class LinearModel(Model):
self
.
_lin_op
=
lin_op
self
.
_inp
=
inp
# MR FIXME: what does this do?
if
isinstance
(
self
.
_lin_op
,
SelectionOperator
):
self
.
_lin_op
=
SelectionOperator
(
self
.
_inp
.
value
.
domain
,
self
.
_lin_op
.
_key
)
...
...
nifty5/multi/multi_domain.py
View file @
8466e7fc
...
...
@@ -63,3 +63,9 @@ class MultiDomain(object):
def
__ne__
(
self
,
x
):
return
not
self
.
__eq__
(
x
)
def
__str__
(
self
):
res
=
"MultiDomain:
\n
"
for
key
,
dom
in
zip
(
self
.
_keys
,
self
.
_domains
):
res
+=
key
+
": "
+
str
(
dom
)
+
"
\n
"
return
res
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