Commit c399b303 authored by Philipp Arras's avatar Philipp Arras

Generalize the probing of the diagonal of an operator to MultiFields

parent e50e65f4
......@@ -15,9 +15,9 @@
#
# 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
from .sugar import from_random
class StatCalculator(object):
......@@ -131,7 +131,6 @@ def probe_diagonal(op, nprobes, random_type="pm1"):
'''
sc = StatCalculator()
for i in range(nprobes):
input = Field.from_random(random_type, op.domain)
output = op(input)
sc.add(output.conjugate()*input)
x = from_random(random_type, op.domain)
sc.add(op(x).conjugate()*x)
return sc.mean
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