Skip to content
GitLab
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
e9621aa7
Commit
e9621aa7
authored
Jun 10, 2020
by
Gordian Edenhofer
Browse files
correlated_field.py: add_fluctuations input checks
parent
2e872c5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/library/correlated_fields.py
View file @
e9621aa7
...
...
@@ -470,12 +470,22 @@ class CorrelatedFieldMaker:
prefix
=
str
(
prefix
)
# assert isinstance(target_subdomain[space], (RGSpace, HPSpace, GLSpace)
fluct
=
LognormalTransform
(
fluctuations_mean
,
fluctuations_stddev
,
self
.
_prefix
+
prefix
+
'fluctuations'
,
N
)
flex
=
LognormalTransform
(
flexibility_mean
,
flexibility_stddev
,
self
.
_prefix
+
prefix
+
'flexibility'
,
N
)
asp
=
LognormalTransform
(
asperity_mean
,
asperity_stddev
,
self
.
_prefix
+
prefix
+
'asperity'
,
N
)
ve
=
"{0}_mean and {0}_stddev must be strictly positive"
if
fluctuations_mean
>
0.
and
fluctuations_stddev
>
0.
:
fluct
=
LognormalTransform
(
fluctuations_mean
,
fluctuations_stddev
,
self
.
_prefix
+
prefix
+
'fluctuations'
,
N
)
else
:
raise
ValueError
(
ve
.
format
(
"fluctuations"
))
if
flexibility_mean
>
0.
and
flexibility_stddev
>
0.
:
flex
=
LognormalTransform
(
flexibility_mean
,
flexibility_stddev
,
self
.
_prefix
+
prefix
+
'flexibility'
,
N
)
else
:
raise
ValueError
(
ve
.
format
(
"flexibility"
))
if
asperity_mean
>
0.
and
asperity_stddev
>
0.
:
asp
=
LognormalTransform
(
asperity_mean
,
asperity_stddev
,
self
.
_prefix
+
prefix
+
'asperity'
,
N
)
else
:
raise
ValueError
(
ve
.
format
(
"asperity"
))
avgsl
=
NormalTransform
(
loglogavgslope_mean
,
loglogavgslope_stddev
,
self
.
_prefix
+
prefix
+
'loglogavgslope'
,
N
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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