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
ce79980c
Commit
ce79980c
authored
Nov 07, 2019
by
Philipp Arras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add checks
parent
b39f819c
Pipeline
#63190
failed with stages
in 4 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
nifty5/library/correlated_fields.py
nifty5/library/correlated_fields.py
+11
-5
No files found.
nifty5/library/correlated_fields.py
View file @
ce79980c
...
...
@@ -53,11 +53,16 @@ def _normal(mean, sig, key):
sig
*
ducktape
(
DomainTuple
.
scalar_domain
(),
None
,
key
))
def
_log_k_lengths
(
pspace
):
return
np
.
log
(
pspace
.
k_lengths
[
1
:])
class
_SlopeRemover
(
EndomorphicOperator
):
def
__init__
(
self
,
domain
,
logkl
):
self
.
_domain
=
makeDomain
(
domain
)
assert
len
(
self
.
_domain
)
==
1
assert
isinstance
(
self
.
_domain
[
0
],
PowerSpace
)
self
.
_sc
=
logkl
/
float
(
logkl
[
-
1
])
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
def
apply
(
self
,
x
,
mode
):
...
...
@@ -72,13 +77,11 @@ class _SlopeRemover(EndomorphicOperator):
return
from_global_data
(
self
.
_tgt
(
mode
),
res
)
def
_log_k_lengths
(
pspace
):
return
np
.
log
(
pspace
.
k_lengths
[
1
:])
class
_TwoLogIntegrations
(
LinearOperator
):
def
__init__
(
self
,
target
):
self
.
_target
=
makeDomain
(
target
)
assert
len
(
self
.
_target
)
==
1
assert
isinstance
(
self
.
_target
[
0
],
PowerSpace
)
self
.
_domain
=
makeDomain
(
UnstructuredDomain
((
2
,
self
.
target
.
shape
[
0
]
-
2
)))
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
...
...
@@ -112,6 +115,8 @@ class _TwoLogIntegrations(LinearOperator):
class
_Normalization
(
Operator
):
def
__init__
(
self
,
domain
):
self
.
_domain
=
self
.
_target
=
makeDomain
(
domain
)
assert
len
(
self
.
_domain
)
==
1
assert
isinstance
(
domain
[
0
],
PowerSpace
)
hspace
=
self
.
_domain
[
0
].
harmonic_partner
pd
=
PowerDistributor
(
hspace
,
power_space
=
self
.
_domain
[
0
])
cst
=
pd
.
adjoint
(
full
(
pd
.
target
,
1.
)).
to_global_data_rw
()
...
...
@@ -131,6 +136,7 @@ class _Normalization(Operator):
class
_SpecialSum
(
EndomorphicOperator
):
def
__init__
(
self
,
domain
):
self
.
_domain
=
makeDomain
(
domain
)
assert
len
(
self
.
_domain
)
==
1
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
def
apply
(
self
,
x
,
mode
):
...
...
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