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
f5cdf137
Commit
f5cdf137
authored
Nov 06, 2019
by
Philipp Frank
Browse files
slope now works as intended but jacobian fails with linearizations
parent
87834184
Pipeline
#63041
failed with stages
in 4 minutes and 21 seconds
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
demos/newamplitudes.py
View file @
f5cdf137
...
...
@@ -6,7 +6,7 @@ sspace = ift.RGSpace((128,))
hspace
=
sspace
.
get_default_codomain
()
target0
=
ift
.
PowerSpace
(
hspace
)
fa
=
ift
.
FinalAmplitude
()
fa
=
ift
.
CorrelatedFieldMaker
()
fa
.
add_fluctuations
(
target0
,
10
,
2
,
1
,
1e-6
,
2
,
1e-6
,
-
2
,
1e-6
,
'spatial'
)
op
=
fa
.
finalize
(
10
,
0.1
,
''
)
A
=
fa
.
amplitudes
[
0
]
...
...
nifty5/library/correlated_fields.py
View file @
f5cdf137
...
...
@@ -61,10 +61,10 @@ class _SlopeOperator(Operator):
loglogavgslope
.
domain
)
logkl
=
_log_k_lengths
(
self
.
_target
[
0
])
assert
logkl
.
shape
[
0
]
==
self
.
_target
[
0
].
shape
[
0
]
-
1
logkl
-=
logkl
[
0
]
logkl
=
np
.
insert
(
logkl
,
0
,
0
)
self
.
_t
=
VdotOperator
(
from_global_data
(
self
.
_target
,
logkl
)).
adjoint
self
.
_T
=
float
(
logkl
[
-
1
])
self
.
_T
=
float
(
logkl
[
-
1
]
-
logkl
[
1
]
)
ind
=
(
smooth
.
target
.
shape
[
0
]
-
1
,)
self
.
_extr_op
=
ValueInserter
(
smooth
.
target
,
ind
).
adjoint
...
...
@@ -245,7 +245,7 @@ class CorrelatedFieldMaker:
prefix
+
'flexibility'
)
asp
=
_lognormal_moment_matching
(
asperity_mean
,
asperity_stddev
,
prefix
+
'asperity'
)
avgsl
=
_normal
(
loglogavgslope_mean
,
loglogavgslope_
mean
,
avgsl
=
_normal
(
loglogavgslope_mean
,
loglogavgslope_
stddev
,
prefix
+
'loglogavgslope'
)
self
.
add_fluctuations_from_ops
(
target
,
fluct
,
flex
,
asp
,
avgsl
,
prefix
+
'spectrum'
)
...
...
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