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
75b79bbf
Commit
75b79bbf
authored
Nov 20, 2019
by
Philipp Frank
Browse files
Fixup
parent
5ef3c652
Pipeline
#64012
passed with stages
in 9 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/library/correlated_fields.py
View file @
75b79bbf
...
...
@@ -194,7 +194,7 @@ class _SpecialSum(EndomorphicOperator):
class
_Amplitude
(
Operator
):
def
__init__
(
self
,
target
,
fluctuations
,
flexibility
,
asperity
,
loglogavgslope
,
key
):
loglogavgslope
,
totvol
,
key
):
"""
fluctuations > 0
flexibility > 0
...
...
@@ -212,7 +212,6 @@ class _Amplitude(Operator):
twolog
=
_TwoLogIntegrations
(
target
)
dom
=
twolog
.
domain
shp
=
dom
.
shape
totvol
=
target
[
0
].
harmonic_partner
.
get_default_codomain
().
total_volume
# Prepare constant fields
foo
=
np
.
zeros
(
shp
)
...
...
@@ -288,6 +287,9 @@ class CorrelatedFieldMaker:
harmonic_partner
=
None
):
if
harmonic_partner
is
None
:
harmonic_partner
=
position_space
.
get_default_codomain
()
else
:
position_space
.
check_codomain
(
harmonic_partner
)
harmonic_partner
.
check_codomain
(
position_space
)
fluctuations_mean
=
float
(
fluctuations_mean
)
fluctuations_stddev
=
float
(
fluctuations_stddev
)
flexibility_mean
=
float
(
flexibility_mean
)
...
...
@@ -316,7 +318,8 @@ class CorrelatedFieldMaker:
avgsl
=
_normal
(
loglogavgslope_mean
,
loglogavgslope_stddev
,
prefix
+
'loglogavgslope'
)
amp
=
_Amplitude
(
PowerSpace
(
harmonic_partner
),
fluct
,
flex
,
asp
,
avgsl
,
prefix
+
'spectrum'
)
fluct
,
flex
,
asp
,
avgsl
,
position_space
.
total_volume
,
prefix
+
'spectrum'
)
if
index
is
not
None
:
self
.
_a
.
insert
(
index
,
amp
)
self
.
_position_spaces
.
insert
(
index
,
position_space
)
...
...
@@ -326,7 +329,7 @@ class CorrelatedFieldMaker:
def
finalize_from_op
(
self
,
zeromode
,
prefix
=
''
):
assert
isinstance
(
zeromode
,
Operator
)
hspace
=
makeDomain
([
dd
.
target
[
0
]
for
dd
in
self
.
_a
])
hspace
=
makeDomain
([
dd
.
target
[
0
]
.
harmonic_partner
for
dd
in
self
.
_a
])
foo
=
np
.
ones
(
hspace
.
shape
)
zeroind
=
len
(
hspace
.
shape
)
*
(
0
,)
foo
[
zeroind
]
=
0
...
...
Write
Preview
Supports
Markdown
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