Commit 1b46ab5f authored by Theo Steininger's avatar Theo Steininger

Fixed inconsistencies in distribution_strategy checks in power_synthesize and create_power_operator

parent b8bd4934
Pipeline #15425 passed with stages
in 13 minutes and 31 seconds
......@@ -668,7 +668,7 @@ class Field(Loggable, Versionable, object):
if pindex.distribution_strategy is not local_distribution_strategy:
raise AttributeError(
"The distribution_strategy of pindex does not fit the "
"slice_local distribution strategy of the synthesized field.")
......@@ -58,8 +58,9 @@ def create_power_operator(domain, power_spectrum, dtype=None,
fp = Field(power_domain, val=power_spectrum, dtype=dtype,
f = fp.power_synthesize(mean=1, std=0, real_signal=False,
f = fp.power_synthesize(mean=1, std=0, real_signal=False)
f **= 2
return DiagonalOperator(domain, diagonal=f, bare=True)
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