Commit 189a4e76 authored by Philipp Arras's avatar Philipp Arras
Browse files

Start adding docs to probing

parent 3996cb92
......@@ -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):
op : EndomorphicOperator
post_op : Operator
nprobes : int
Number of samples which shall be drawn.
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
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"):
sc = StatCalculator()
for i in range(nprobes):
input = Field.from_random(random_type, op.domain)
Supports Markdown
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