Commit 300da90d authored by Philipp Arras's avatar Philipp Arras
Browse files


parent 0327ffdc
......@@ -56,6 +56,10 @@ def CorrelatedField(target, amplitude_operator, name='xi'):
power_distributor = PowerDistributor(h_space, p_space)
A = power_distributor(amplitude_operator)
vol = h_space.scalar_dvol**-0.5
# When doubling the resolution of `tgt` the value of the highest k-mode
# will scale with a square root. `vol` cancels this effect such that the
# same power spectrum can be used for the spaces with the same volume,
# different resolutions and the same object in them.
return ht(vol*A*ducktape(h_space, None, name))
......@@ -103,5 +107,6 @@ def MfCorrelatedField(target, amplitudes, name='xi'):
a = [dd @ amplitudes[ii] for ii, dd in enumerate(d)]
a = reduce(lambda x, y: x*y, a)
A = pd @ a
# For `vol` see comment in `CorrelatedField`
vol = reduce(lambda x, y: x*y, [sp.scalar_dvol**-0.5 for sp in hsp])
return ht(vol*A*ducktape(hsp, None, name))
Supports Markdown
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