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
9
Merge Requests
9
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
e973ddf2
Commit
e973ddf2
authored
Dec 04, 2019
by
Philipp Haim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unneeded self._spaces
parent
f0c89521
Pipeline
#64927
failed with stages
in 8 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
nifty6/library/correlated_fields.py
nifty6/library/correlated_fields.py
+7
-10
No files found.
nifty6/library/correlated_fields.py
View file @
e973ddf2
...
...
@@ -341,7 +341,6 @@ class CorrelatedFieldMaker:
def
__init__
(
self
,
amplitude_offset
,
prefix
,
total_N
):
assert
isinstance
(
amplitude_offset
,
Operator
)
self
.
_a
=
[]
self
.
_spaces
=
[]
self
.
_position_spaces
=
[]
self
.
_azm
=
amplitude_offset
...
...
@@ -421,11 +420,9 @@ class CorrelatedFieldMaker:
if
index
is
not
None
:
self
.
_a
.
insert
(
index
,
amp
)
self
.
_position_spaces
.
insert
(
index
,
position_space
)
self
.
_spaces
.
insert
(
index
,
space
)
else
:
self
.
_a
.
append
(
amp
)
self
.
_position_spaces
.
append
(
position_space
)
self
.
_spaces
.
append
(
space
)
def
_finalize_from_op
(
self
):
n_amplitudes
=
len
(
self
.
_a
)
...
...
@@ -433,29 +430,29 @@ class CorrelatedFieldMaker:
hspace
=
makeDomain
([
UnstructuredDomain
(
self
.
_total_N
)]
+
[
dd
.
target
[
-
1
].
harmonic_partner
for
dd
in
self
.
_a
])
spaces
=
list
(
1
+
np
.
arange
(
n_amplitudes
))
spaces
=
tuple
(
range
(
1
,
n_amplitudes
+
1
))
amp_space
=
1
else
:
hspace
=
makeDomain
(
[
dd
.
target
[
0
].
harmonic_partner
for
dd
in
self
.
_a
])
spaces
=
tuple
(
range
(
n_amplitudes
))
spaces
=
list
(
np
.
arange
(
n_amplitudes
))
amp_space
=
0
expander
=
ContractionOperator
(
hspace
,
spaces
=
spaces
).
adjoint
azm
=
expander
@
self
.
_azm
# spaces = np.array(range(n_amplitudes)) + 1 - 1//self._total_N
ht
=
HarmonicTransformOperator
(
hspace
,
self
.
_position_spaces
[
0
][
self
.
_spaces
[
0
]
],
self
.
_position_spaces
[
0
][
amp_space
],
space
=
spaces
[
0
])
for
i
in
range
(
1
,
n_amplitudes
):
ht
=
(
HarmonicTransformOperator
(
ht
.
target
,
self
.
_position_spaces
[
i
][
self
.
_spaces
[
i
]
],
self
.
_position_spaces
[
i
][
amp_space
],
space
=
spaces
[
i
])
@
ht
)
pd
=
PowerDistributor
(
hspace
,
self
.
_a
[
0
].
target
[
self
.
_spaces
[
0
]],
self
.
_spaces
[
0
]
)
pd
=
PowerDistributor
(
hspace
,
self
.
_a
[
0
].
target
[
amp_space
],
amp_space
)
for
i
in
range
(
1
,
n_amplitudes
):
pd
=
(
pd
@
PowerDistributor
(
pd
.
domain
,
self
.
_a
[
i
].
target
[
self
.
_spaces
[
i
]
],
self
.
_a
[
i
].
target
[
amp_space
],
space
=
spaces
[
i
]))
a
=
ContractionOperator
(
pd
.
domain
,
spaces
[
1
:]).
adjoint
@
self
.
_a
[
0
]
...
...
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