Commit 872bd200 authored by Philipp Arras's avatar Philipp Arras
Browse files

Merge branch 'more_docs_pa' into 'NIFTy_5'

Probing docs

See merge request ift/nifty-dev!180
parents 3996cb92 189a4e76
......@@ -16,6 +16,8 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
from .field import Field
from .operators.endomorphic_operator import EndomorphicOperator
from .operators.operator import Operator
class StatCalculator(object):
......@@ -69,6 +71,29 @@ class StatCalculator(object):
def probe_with_posterior_samples(op, post_op, nprobes):
'''FIXME
Parameters
----------
op : EndomorphicOperator
FIXME
post_op : Operator
FIXME
nprobes : int
Number of samples which shall be drawn.
Returns
-------
List of Field
List of two fields: the mean and the variance.
'''
if not isinstance(op, EndomorphicOperator):
raise TypeError
if post_op is not None:
if not isinstance(post_op, Operator):
raise TypeError
if post_op.domain is not op.target:
raise ValueError
sc = StatCalculator()
for i in range(nprobes):
if post_op is None:
......@@ -82,6 +107,9 @@ def probe_with_posterior_samples(op, post_op, nprobes):
def probe_diagonal(op, nprobes, random_type="pm1"):
'''
FIXME
'''
sc = StatCalculator()
for i in range(nprobes):
input = Field.from_random(random_type, op.domain)
......
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