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):
result_list[0].domain_axes[power_space_index])
if pindex.distribution_strategy is not local_distribution_strategy:
self.logger.warn(
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,
distribution_strategy=distribution_strategy)
fp = Field(power_domain, val=power_spectrum, dtype=dtype,
distribution_strategy=distribution_strategy)
f = fp.power_synthesize(mean=1, std=0, real_signal=False)
distribution_strategy='not')
f = fp.power_synthesize(mean=1, std=0, real_signal=False,
distribution_strategy=distribution_strategy)
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