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
a2343b55
Commit
a2343b55
authored
Nov 18, 2019
by
Philipp Haim
Browse files
Fixes
parent
030321eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/library/correlated_fields.py
View file @
a2343b55
...
...
@@ -97,7 +97,7 @@ def _log_vol(power_space):
def
_total_fluctuation_realized
(
samples
,
space
=
0
):
res
=
0.
for
s
in
samples
:
res
=
res
+
(
s
-
s
.
mean
(
space
,
keepdims
=
True
))
**
2
res
=
res
+
(
s
-
s
.
mean
())
**
2
return
np
.
sqrt
((
res
/
len
(
samples
)).
mean
(
space
))
...
...
@@ -327,8 +327,6 @@ class _Amplitude(Operator):
target
,
space
)
for
aa
in
(
foo
,
bar
)]
#Prepare fields for Adder
#NOTE alternative would be adjoint contraction_operator acting
#on every space except the specified on
shift
,
vol0
=
[
op
(
full
(
op
.
domain
,
1
))
for
op
in
(
shift
,
vol0
)]
# End prepare constant fields
...
...
@@ -371,10 +369,6 @@ class CorrelatedFieldMaker:
@
staticmethod
def
make
(
offset_amplitude_mean
,
offset_amplitude_stddev
,
prefix
,
total_N
=
0
):
offset_amplitude_stddev
=
float
(
offset_amplitude_stddev
)
offset_amplitude_mean
=
float
(
offset_amplitude_mean
)
assert
offset_amplitude_stddev
>
0
assert
offset_amplitude_mean
>
0
zm
=
_LognormalMomentMatching
(
offset_amplitude_mean
,
offset_amplitude_stddev
,
prefix
+
'zeromode'
,
...
...
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