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
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
54e9bb64
Commit
54e9bb64
authored
Oct 28, 2019
by
Philipp Arras
Browse files
Equal color bars
parent
4e16fbe1
Pipeline
#62570
passed with stages
in 6 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
demos/newamplitudes/easyinterface.py
View file @
54e9bb64
...
...
@@ -21,24 +21,35 @@ corfld = ift.CorrelatedField(sspace, A)
corfld
=
ift
.
CorrelatedFieldNormAmplitude
(
sspace
,
A
,
0
,
1
)
corfldfixA
=
ift
.
CorrelatedFieldNormAmplitude
(
sspace
,
avgA
,
0
,
1
)
cstpos
=
ift
.
from_random
(
'normal'
,
corfld
.
domain
)
p
,
p1
,
p2
=
[
ift
.
Plot
()
for
_
in
range
(
3
)]
lst
,
lst1
=
[
avgA
**
2
],
[]
skys
,
skys1
,
skys2
=
[],
[],
[]
for
_
in
range
(
8
):
pos
=
ift
.
from_random
(
'normal'
,
corfld
.
domain
)
skyfixA
=
corfldfixA
.
force
(
pos
)
p
.
ad
d
(
skyfixA
)
skys
.
appen
d
(
skyfixA
)
ft
=
ift
.
HartleyOperator
(
hspace
,
sspace
).
scale
(
hspace
.
scalar_dvol
**-
0.5
)
lst
.
append
(
ift
.
power_analyze
(
ft
.
inverse
(
skyfixA
)))
foo
=
ift
.
MultiField
.
union
([
cstpos
,
pos
.
extract
(
A
.
domain
)])
p2
.
ad
d
(
corfld
(
foo
))
skys2
.
appen
d
(
corfld
(
foo
))
sky
=
corfld
(
pos
)
p1
.
ad
d
(
sky
)
skys1
.
appen
d
(
sky
)
lst1
.
append
(
A
.
force
(
pos
))
for
pp
,
ll
in
[(
p
,
skys
),
(
p1
,
skys1
),
(
p2
,
skys2
)]:
mi
,
ma
=
None
,
None
if
True
:
mi
,
ma
=
np
.
inf
,
-
np
.
inf
for
ss
in
ll
:
mi
=
min
([
mi
,
np
.
amin
(
ss
.
val
)])
ma
=
max
([
ma
,
np
.
amax
(
ss
.
val
)])
for
ss
in
ll
:
pp
.
add
(
ss
,
zmin
=
mi
,
zmax
=
ma
)
p
.
add
(
lst
)
p1
.
add
(
lst1
)
p2
.
add
(
lst1
)
...
...
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