Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
29d1e69a
Commit
29d1e69a
authored
Jan 08, 2019
by
Martin Reinecke
Browse files
start documenting
parent
f701e9a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/sugar.py
View file @
29d1e69a
...
...
@@ -41,6 +41,18 @@ __all__ = ['PS_field', 'power_analyze', 'create_power_operator',
def
PS_field
(
pspace
,
func
):
"""Convenience function sampling a power spectrum
Parameters
----------
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
Returns
-------
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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment