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
14
Merge Requests
14
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
c1a84f56
Commit
c1a84f56
authored
Sep 24, 2018
by
Philipp Frank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolution independent amplitude model priors
parent
6ddae70b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
demos/getting_started_3.py
demos/getting_started_3.py
+5
-3
nifty5/library/amplitude_model.py
nifty5/library/amplitude_model.py
+1
-1
nifty5/library/correlated_fields.py
nifty5/library/correlated_fields.py
+1
-2
No files found.
demos/getting_started_3.py
View file @
c1a84f56
...
...
@@ -32,7 +32,7 @@ if __name__ == '__main__':
position_space
=
ift
.
RGSpace
([
128
,
128
])
# Setting up an amplitude model
A
=
ift
.
AmplitudeModel
(
position_space
,
16
,
1
,
10
,
-
4.
,
1
,
0
.
,
1.
)
A
=
ift
.
AmplitudeModel
(
position_space
,
64
,
3
,
0.4
,
-
4.
,
1
,
1
.
,
1.
)
dummy
=
ift
.
from_random
(
'normal'
,
A
.
domain
)
# Building the model for a correlated signal
...
...
@@ -46,9 +46,11 @@ if __name__ == '__main__':
'xi'
:
harmonic_space
})))
correlated_field
=
ht
(
power_distributor
(
A
)
*
ift
.
FieldAdapter
(
domain
,
"xi"
))
vol
=
harmonic_space
.
scalar_dvol
vol
=
ift
.
ScalingOperator
(
vol
**
(
-
0.5
),
harmonic_space
)
correlated_field
=
ht
(
vol
(
power_distributor
(
A
))
*
ift
.
FieldAdapter
(
domain
,
"xi"
))
# alternatively to the block above one can do:
#
correlated_field = ift.CorrelatedField(position_space, A)
#correlated_field = ift.CorrelatedField(position_space, A)
# apply some nonlinearity
signal
=
ift
.
positive_tanh
(
correlated_field
)
...
...
nifty5/library/amplitude_model.py
View file @
c1a84f56
...
...
@@ -29,7 +29,7 @@ from ..sugar import makeOp, sqrt
def
_ceps_kernel
(
dof_space
,
k
,
a
,
k0
):
return
a
**
2
/
(
1
+
(
k
/
(
k0
*
dof_space
.
bindistances
[
0
])
)
**
2
)
**
2
return
a
**
2
/
(
1
+
(
k
/
k0
)
**
2
)
**
2
def
create_cepstrum_amplitude_field
(
domain
,
cepstrum
):
...
...
nifty5/library/correlated_fields.py
View file @
c1a84f56
...
...
@@ -44,9 +44,8 @@ def CorrelatedField(s_space, amplitude_model):
power_distributor
=
PowerDistributor
(
h_space
,
p_space
)
A
=
power_distributor
(
amplitude_model
)
vol
=
h_space
.
scalar_dvol
#vol = 1.
vol
=
ScalingOperator
(
vol
**
(
-
0.5
),
h_space
)
return
ht
(
vol
(
A
*
FieldAdapter
(
MultiDomain
.
make
({
"xi"
:
h_space
}),
"xi"
)
))
return
ht
(
vol
(
A
)
*
FieldAdapter
(
MultiDomain
.
make
({
"xi"
:
h_space
}),
"xi"
))
def
MfCorrelatedField
(
s_space_spatial
,
s_space_energy
,
amplitude_model_spatial
,
...
...
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