Commit 54e9bb64 authored by Philipp Arras's avatar Philipp Arras
Browse files

Equal color bars

parent 4e16fbe1
Pipeline #62570 passed with stages
in 6 minutes and 53 seconds
...@@ -21,24 +21,35 @@ corfld = ift.CorrelatedField(sspace, A) ...@@ -21,24 +21,35 @@ corfld = ift.CorrelatedField(sspace, A)
corfld = ift.CorrelatedFieldNormAmplitude(sspace, A, 0, 1) corfld = ift.CorrelatedFieldNormAmplitude(sspace, A, 0, 1)
corfldfixA = ift.CorrelatedFieldNormAmplitude(sspace, avgA, 0, 1) corfldfixA = ift.CorrelatedFieldNormAmplitude(sspace, avgA, 0, 1)
cstpos = ift.from_random('normal', corfld.domain) cstpos = ift.from_random('normal', corfld.domain)
p, p1, p2 = [ift.Plot() for _ in range(3)] p, p1, p2 = [ift.Plot() for _ in range(3)]
lst, lst1 = [avgA**2], [] lst, lst1 = [avgA**2], []
skys, skys1, skys2 = [], [], []
for _ in range(8): for _ in range(8):
pos = ift.from_random('normal', corfld.domain) pos = ift.from_random('normal', corfld.domain)
skyfixA = corfldfixA.force(pos) skyfixA = corfldfixA.force(pos)
p.add(skyfixA) skys.append(skyfixA)
ft = ift.HartleyOperator(hspace, sspace).scale(hspace.scalar_dvol**-0.5) ft = ift.HartleyOperator(hspace, sspace).scale(hspace.scalar_dvol**-0.5)
lst.append(ift.power_analyze(ft.inverse(skyfixA))) lst.append(ift.power_analyze(ft.inverse(skyfixA)))
foo = ift.MultiField.union([cstpos, pos.extract(A.domain)]) foo = ift.MultiField.union([cstpos, pos.extract(A.domain)])
p2.add(corfld(foo)) skys2.append(corfld(foo))
sky = corfld(pos) sky = corfld(pos)
p1.add(sky) skys1.append(sky)
lst1.append(A.force(pos)) 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) p.add(lst)
p1.add(lst1) p1.add(lst1)
p2.add(lst1) p2.add(lst1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment