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
15
Merge Requests
15
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
7d0004fd
Commit
7d0004fd
authored
May 21, 2020
by
Lukas Platz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mention notebook in demo 3
parent
1738cad9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
demos/getting_started_3.py
demos/getting_started_3.py
+15
-12
No files found.
demos/getting_started_3.py
View file @
7d0004fd
...
...
@@ -55,6 +55,10 @@ if __name__ == '__main__':
position_space
=
ift
.
RGSpace
([
128
,
128
])
# For a detailed showcase of the effects the parameters
# of the CorrelatedField model have on the generated fields,
# see 'getting_started_CorrelatedFields.ipynb'.
cfmaker
=
ift
.
CorrelatedFieldMaker
.
make
(
offset_mean
=
0.0
,
# 0.
offset_std_mean
=
1e-3
,
# 1e-3
...
...
@@ -62,22 +66,21 @@ if __name__ == '__main__':
prefix
=
''
)
fluctuations_dict
=
{
# Amplitude of
the
fluctuations
# Amplitude of
field
fluctuations
'fluctuations_mean'
:
2.0
,
# 1.0
'fluctuations_stddev'
:
1.0
,
# 1e-2
# Smooth variation speed
# Exponent of power law power spectrum component
'loglogavgslope_mean'
:
-
2.0
,
# -3.0
'loglogavgslope_stddev'
:
0.5
,
# 0.5
# Amplitude of integrated Wiener process power spectrum component
'flexibility_mean'
:
2.5
,
# 1.0
'flexibility_stddev'
:
1.0
,
# 0.5
# How strong the ragged component of the spectrum is
# (Ratio of Wiener process and integrated Wiener process ?)
# How ragged the integrated Wiener process component is
'asperity_mean'
:
0.5
,
# 0.1
'asperity_stddev'
:
0.5
,
# 0.5
# Slope of linear spectrum component
'loglogavgslope_mean'
:
-
2.0
,
# -3.0
'loglogavgslope_stddev'
:
0.5
# 0.5
'asperity_stddev'
:
0.5
# 0.5
}
cfmaker
.
add_fluctuations
(
position_space
,
**
fluctuations_dict
)
...
...
@@ -135,7 +138,7 @@ if __name__ == '__main__':
# Plot current reconstruction
plot
=
ift
.
Plot
()
plot
.
add
(
signal
(
KL
.
position
),
title
=
"reconstruction"
)
plot
.
add
([
A
.
force
(
KL
.
position
),
A
.
force
(
mock_
position
)],
title
=
"power"
)
plot
.
add
([
A
.
force
(
mock_position
),
A
.
force
(
KL
.
position
)],
title
=
"power"
)
plot
.
output
(
ny
=
1
,
ysize
=
6
,
xsize
=
16
,
name
=
filename
.
format
(
"loop_{:02d}"
.
format
(
i
)))
...
...
@@ -153,8 +156,8 @@ if __name__ == '__main__':
powers
=
[
A
.
force
(
s
+
KL
.
position
)
for
s
in
KL
.
samples
]
plot
.
add
(
powers
+
[
A
.
force
(
KL
.
position
),
A
.
force
(
mock_
position
)],
powers
+
[
A
.
force
(
mock_
position
),
A
.
force
(
KL
.
position
)],
title
=
"Sampled Posterior Power Spectrum"
,
linewidth
=
[
1.
]
*
len
(
powers
)
+
[
3.
,
3.
])
plot
.
output
(
ny
=
1
,
nx
=
3
,
xsize
=
24
,
ysize
=
6
,
name
=
filename_res
)
...
...
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