Commit 29d1e69a authored by Martin Reinecke's avatar Martin Reinecke
Browse files

start documenting

parent f701e9a9
......@@ -41,6 +41,18 @@ __all__ = ['PS_field', 'power_analyze', 'create_power_operator',
def PS_field(pspace, func):
"""Convenience function sampling a power spectrum
pspace : PowerSpace
space at whose `k_lengths` the power spectrum function is evaluated
func : function taking and returning a numpy.ndarray(float)
the power spectrum function
Field : a field living on (pspace,) containing the computed function values
if not isinstance(pspace, PowerSpace):
raise TypeError
data = dobj.from_global_data(func(pspace.k_lengths))
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