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
13
Issues
13
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
cb0b29db
Commit
cb0b29db
authored
Mar 06, 2020
by
Lukas Platz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename parameters
parent
cfa2f511
Pipeline
#70375
passed with stages
in 15 minutes and 28 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
demos/getting_started_3.py
demos/getting_started_3.py
+4
-4
nifty6/library/correlated_fields.py
nifty6/library/correlated_fields.py
+20
-3
No files found.
demos/getting_started_3.py
View file @
cb0b29db
...
...
@@ -58,14 +58,14 @@ if __name__ == '__main__':
position_space
=
ift
.
RGSpace
([
128
,
128
])
cfmaker
=
ift
.
CorrelatedFieldMaker
.
make
(
offset_mean
=
0.
,
# 0.
offset_
variation_mean
=
1e-3
,
# 1e-3
offset_
variation_stddev
=
1e-6
,
# 1e-6
offset_mean
=
0.0
,
# 0.
offset_
std_mean
=
1e-3
,
# 1e-3
offset_
std_std
=
1e-6
,
# 1e-6
prefix
=
''
)
fluctuations_dict
=
{
# Amplitude of the fluctuations
'fluctuations_mean'
:
2.0
,
# 1.0
'fluctuations_mean'
:
2.0
,
# 1.0
'fluctuations_stddev'
:
1.0
,
# 1e-2
# Smooth variation speed
...
...
nifty6/library/correlated_fields.py
View file @
cb0b29db
...
...
@@ -364,16 +364,33 @@ class CorrelatedFieldMaker:
self
.
_total_N
=
total_N
@
staticmethod
def
make
(
offset_mean
,
offset_
variation_mean
,
offset_variation_stddev
,
prefix
,
def
make
(
offset_mean
,
offset_
std_mean
,
offset_std_std
,
prefix
,
total_N
=
0
,
dofdex
=
None
):
"""Returns a CorrelatedFieldMaker object.
Parameters
----------
offset_mean : float
Mean offset from zero of the correlated field to be made.
offset_std_mean : float
Mean standard deviation of the offset value.
offset_std_std : float
Standard deviation of the stddev of the offset value.
prefix : string
Prefix to the names of the domains of the cf operator to be made.
total_N : integer
?
dofdex : np.array
?
"""
if
dofdex
is
None
:
dofdex
=
np
.
full
(
total_N
,
0
)
elif
len
(
dofdex
)
!=
total_N
:
raise
ValueError
(
"length of dofdex needs to match total_N"
)
N
=
max
(
dofdex
)
+
1
if
total_N
>
0
else
0
zm
=
_LognormalMomentMatching
(
offset_
variation
_mean
,
offset_
variation_stddev
,
zm
=
_LognormalMomentMatching
(
offset_
std
_mean
,
offset_
std_std
,
prefix
+
'zeromode'
,
N
)
if
total_N
>
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