diff --git a/nifty/sugar.py b/nifty/sugar.py index 676278beb2578cb96d06ce46cd31d62a879c1402..20b68da0065e4e1a76e2c5d223de1bbd0fca8486 100644 --- a/nifty/sugar.py +++ b/nifty/sugar.py @@ -26,30 +26,30 @@ __all__ = ['create_power_operator'] def create_power_operator(domain, power_spectrum, dtype=None, distribution_strategy='not'): - """Creates a diagonal operator with a certain power spectrum. - Constructs a diagonal operator that lives over the specified domain, or - its harmonic domain in case it is not harmonic. - Parameters - ---------- - domain : DomainObject - Domain over which the power operator shall live. If this is not a - harmonic domain, it will return an operator for its harmonic domain - instead. - power_spectrum : {array-like, method} - An array-like object, or a method that implements the square root - of a power spectrum as a function of k. - dtype : type, *optional* - dtype that the field holding the power spectrum shall use - {default : None} - if dtype == None: passes this on to constructor of Field - distribution_strategy : string, *optional* - Distributed strategy to be used by the underlying d2o objects. - {default : 'not'} - Returns - ------- - DiagonalOperator : An operator that lives that implements the given power - spectrum. - """ + """ Creates a diagonal operator with a certain power spectrum. + Constructs a diagonal operator that lives over the specified domain, or + its harmonic domain in case it is not harmonic. + Parameters + ---------- + domain : DomainObject + Domain over which the power operator shall live. If this is not a + harmonic domain, it will return an operator for its harmonic domain + instead. + power_spectrum : {array-like, method} + An array-like object, or a method that implements the square root + of a power spectrum as a function of k. + dtype : type, *optional* + dtype that the field holding the power spectrum shall use + {default : None} + if dtype == None: passes this on to constructor of Field + distribution_strategy : string, *optional* + Distributed strategy to be used by the underlying d2o objects. + {default : 'not'} + Returns + ------- + DiagonalOperator : An operator that lives that implements the given power + spectrum. + """ if not domain.harmonic: fft = FFTOperator(domain) domain = fft.target[0]