Commit 8a09eadd authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cleanup

parent 17cd7e4c
Pipeline #24224 passed with stage
in 5 minutes and 22 seconds
......@@ -18,7 +18,7 @@
from __future__ import division
from builtins import object
from ..sugar import create_composed_fft_operator
from ..sugar import create_composed_ht_operator
class DiagonalProberMixin(object):
......@@ -36,8 +36,8 @@ class DiagonalProberMixin(object):
def finish_probe(self, probe, pre_result):
if self.__evaluate_probe_in_signal_space:
fft = create_composed_fft_operator(self._domain, all_to='position')
result = fft(probe[1]).conjugate()*fft(pre_result)
ht = create_composed_ht_operator(self._domain)
result = ht(probe[1]).conjugate()*ht(pre_result)
else:
result = probe[1].conjugate()*pre_result
self.__sum_of_probings += result
......
......@@ -18,7 +18,7 @@
from __future__ import division
from builtins import object
from ..sugar import create_composed_fft_operator
from ..sugar import create_composed_ht_operator
class TraceProberMixin(object):
......@@ -36,8 +36,8 @@ class TraceProberMixin(object):
def finish_probe(self, probe, pre_result):
if self.__evaluate_probe_in_signal_space:
fft = create_composed_fft_operator(self._domain, all_to='position')
result = fft(probe[1]).vdot(fft(pre_result))
ht = create_composed_ht_operator(self._domain)
result = ht(probe[1]).vdot(ht(pre_result))
else:
result = probe[1].vdot(pre_result)
......
......@@ -22,7 +22,6 @@ from .spaces.power_space import PowerSpace
from .field import Field, sqrt
from .operators.diagonal_operator import DiagonalOperator
from .operators.power_projection_operator import PowerProjectionOperator
from .operators.fft_operator import FFTOperator
from .operators.harmonic_transform_operator import HarmonicTransformOperator
from .domain_tuple import DomainTuple
from . import dobj, utilities
......@@ -34,7 +33,6 @@ __all__ = ['PS_field',
'create_power_field',
'create_power_operator',
'create_composed_ht_operator',
'create_composed_fft_operator',
'create_harmonic_smoothing_operator']
......@@ -257,24 +255,6 @@ def create_composed_ht_operator(domain, codomain=None):
return res
def create_composed_fft_operator(domain, codomain=None, all_to='other'):
if codomain is None:
codomain = [None]*len(domain)
res = None
for i, space in enumerate(domain):
if not isinstance(space, Space):
continue
if (all_to == 'other' or
(all_to == 'position' and space.harmonic) or
(all_to == 'harmonic' and not space.harmonic)):
tdom = domain if res is None else res.target
op = FFTOperator(domain=tdom, target=codomain[i], space=i)
res = op if res is None else op*res
if res is None:
raise ValueError("empty operator")
return res
def create_harmonic_smoothing_operator(domain, space, sigma):
kfunc = domain[space].get_fft_smoothing_kernel_function(sigma)
return DiagonalOperator(kfunc(domain[space].get_k_length_array()), 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