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
10
Issues
10
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
89144295
Commit
89144295
authored
Jun 27, 2020
by
Philipp Arras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplifications
parent
4cce75f4
Pipeline
#77383
passed with stages
in 13 minutes and 20 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
src/library/correlated_fields_simple.py
src/library/correlated_fields_simple.py
+9
-11
No files found.
src/library/correlated_fields_simple.py
View file @
89144295
...
...
@@ -105,33 +105,31 @@ class SimpleCorrelatedField(Operator):
vflex
=
np
.
zeros
(
dom
.
shape
)
vasp
=
np
.
zeros
(
dom
.
shape
,
dtype
=
np
.
float64
)
shift
=
np
.
ones
(
dom
.
shape
,
dtype
=
np
.
float64
)
vol0
=
np
.
zeros
(
tgt
.
shape
,
dtype
=
np
.
float64
)
vol1
=
np
.
zeros
(
tgt
.
shape
,
dtype
=
np
.
float64
)
vflex
[
0
]
=
vflex
[
1
]
=
np
.
sqrt
(
_log_vol
(
tgt
))
vasp
[
0
]
=
1
shift
[
0
]
=
_log_vol
(
tgt
)
**
2
/
12.
vol1
[
1
:]
=
vol0
[
0
]
=
target
.
total_volume
vflex
=
makeOp
(
makeField
(
dom
,
vflex
))
vasp
=
makeOp
(
makeField
(
dom
,
vasp
))
shift
=
makeOp
(
makeField
(
dom
,
shift
))
vol0
=
makeField
(
tgt
,
vol0
)
vol1
=
makeOp
(
makeField
(
tgt
,
vol1
))
shift
=
makeField
(
dom
,
shift
)
vslope
=
makeOp
(
makeField
(
tgt
,
_relative_log_k_lengths
(
tgt
)))
shift
=
shift
(
full
(
shift
.
domain
,
1
))
azm_expander
=
ContractionOperator
(
tgt
,
0
).
adjoint
expander
=
ContractionOperator
(
twolog
.
domain
,
0
).
adjoint
ps_expander
=
ContractionOperator
(
t
wolog
.
targe
t
,
0
).
adjoint
ps_expander
=
ContractionOperator
(
t
g
t
,
0
).
adjoint
h_expander
=
ContractionOperator
(
harmonic_partner
,
0
).
adjoint
slope
=
vslope
@
ps_expander
@
avgsl
sig_flex
=
vflex
@
expander
@
flex
sig_asp
=
vasp
@
expander
@
asp
sig_fluc
=
vol1
@
ps_expander
@
fluct
xi
=
ducktape
(
dom
,
None
,
prefix
+
'spectrum'
)
smooth
=
xi
*
sig_flex
*
(
Adder
(
shift
)
@
sig_asp
).
ptw
(
"sqrt"
)
smooth
=
_SlopeRemover
(
tgt
,
0
)
@
twolog
@
smooth
op
=
_Normalization
(
tgt
,
0
)
@
(
slope
+
smooth
)
amp
=
Adder
(
vol0
)
@
(
sig_fluc
*
(
azm_expander
@
zm
.
ptw
(
"reciprocal"
))
*
op
)
vol0
=
np
.
zeros
(
tgt
.
shape
,
dtype
=
np
.
float64
)
vol1
=
np
.
zeros
(
tgt
.
shape
,
dtype
=
np
.
float64
)
vol1
[
1
:]
=
vol0
[
0
]
=
target
.
total_volume
vol
=
Adder
(
makeField
(
tgt
,
vol0
))
@
makeOp
(
makeField
(
tgt
,
vol1
))
amp
=
vol
@
((
ps_expander
@
(
zm
.
ptw
(
"reciprocal"
)
*
fluct
))
*
op
)
self
.
_a
=
amp
ht
=
HarmonicTransformOperator
(
harmonic_partner
,
target
)
...
...
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