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): ...@@ -668,7 +668,7 @@ class Field(Loggable, Versionable, object):
result_list[0].domain_axes[power_space_index]) result_list[0].domain_axes[power_space_index])
if pindex.distribution_strategy is not local_distribution_strategy: if pindex.distribution_strategy is not local_distribution_strategy:
self.logger.warn( raise AttributeError(
"The distribution_strategy of pindex does not fit the " "The distribution_strategy of pindex does not fit the "
"slice_local distribution strategy of the synthesized field.") "slice_local distribution strategy of the synthesized field.")
......
...@@ -58,8 +58,9 @@ def create_power_operator(domain, power_spectrum, dtype=None, ...@@ -58,8 +58,9 @@ def create_power_operator(domain, power_spectrum, dtype=None,
distribution_strategy=distribution_strategy) distribution_strategy=distribution_strategy)
fp = Field(power_domain, val=power_spectrum, dtype=dtype, fp = Field(power_domain, val=power_spectrum, dtype=dtype,
distribution_strategy=distribution_strategy) distribution_strategy='not')
f = fp.power_synthesize(mean=1, std=0, real_signal=False) f = fp.power_synthesize(mean=1, std=0, real_signal=False,
distribution_strategy=distribution_strategy)
f **= 2 f **= 2
return DiagonalOperator(domain, diagonal=f, bare=True) 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