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
a1485b1c
Commit
a1485b1c
authored
Jun 27, 2018
by
Philipp Arras
Browse files
Merge branch 'revert_casting' into 'NIFTy_5'
Revert change in amplitude model See merge request ift/nifty-dev!13
parents
4a893224
00e5367f
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/library/amplitude_model.py
View file @
a1485b1c
...
...
@@ -33,6 +33,8 @@ def make_amplitude_model(s_space, Npixdof, ceps_a, ceps_k, sm, sv, im, iv,
'''
from
..operators
import
(
ExpTransform
,
QHTOperator
,
SlopeOperator
,
SymmetrizingOperator
)
from
..models
import
Variable
,
Constant
,
PointwiseExponential
h_space
=
s_space
.
get_default_codomain
()
p_space
=
PowerSpace
(
h_space
)
exp_transform
=
ExpTransform
(
p_space
,
Npixdof
)
...
...
@@ -59,12 +61,10 @@ def make_amplitude_model(s_space, Npixdof, ceps_a, ceps_k, sm, sv, im, iv,
ceps
=
makeOp
(
sqrt
(
cepstrum
))
smooth_op
=
sym
*
qht
*
ceps
from
..models
import
Variable
smooth_spec
=
smooth_op
(
Variable
(
position
)[
keys
[
0
]])
phi
=
Variable
(
position
)[
keys
[
1
]]
+
norm_phi_mean
phi
=
Variable
(
position
)[
keys
[
1
]]
+
Constant
(
position
,
norm_phi_mean
)
linear_spec
=
slope
(
phi
)
loglog_spec
=
smooth_spec
+
linear_spec
from
..models
import
PointwiseExponential
xlog_ampl
=
PointwiseExponential
(
0.5
*
loglog_spec
)
internals
=
{
'loglog_spec'
:
loglog_spec
,
...
...
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