Commit e1f8b0a9 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

tweaks

parent 3e11c5fb
...@@ -101,7 +101,7 @@ if __name__ == "__main__": ...@@ -101,7 +101,7 @@ if __name__ == "__main__":
# Probing the variance # Probing the variance
class Proby(ift.DiagonalProberMixin, ift.Prober): pass class Proby(ift.DiagonalProberMixin, ift.Prober): pass
proby = Proby((signal_space_1, signal_space_2), probe_count=2,ncpu=2) proby = Proby((signal_space_1, signal_space_2), probe_count=2,ncpu=1)
proby(lambda z: fft(wiener_curvature.inverse_times(fft.inverse_times(z)))) proby(lambda z: fft(wiener_curvature.inverse_times(fft.inverse_times(z))))
# sm = SmoothingOperator(signal_space, sigma=0.02) # sm = SmoothingOperator(signal_space, sigma=0.02)
# variance = sm(proby.diagonal.weight(-1)) # variance = sm(proby.diagonal.weight(-1))
......
...@@ -52,7 +52,7 @@ if __name__ == "__main__": ...@@ -52,7 +52,7 @@ if __name__ == "__main__":
# Probing the uncertainty |\label{code:wf_uncertainty_probing}| # Probing the uncertainty |\label{code:wf_uncertainty_probing}|
class Proby(ift.DiagonalProberMixin, ift.Prober): pass class Proby(ift.DiagonalProberMixin, ift.Prober): pass
proby = Proby(signal_space, probe_count=800,ncpu=1) proby = Proby(signal_space, probe_count=1,ncpu=1)
proby(lambda z: fft(wiener_curvature.inverse_times(fft.inverse_times(z)))) #|\label{code:wf_variance_fft_wrap}| proby(lambda z: fft(wiener_curvature.inverse_times(fft.inverse_times(z)))) #|\label{code:wf_variance_fft_wrap}|
sm = ift.FFTSmoothingOperator(signal_space, sigma=0.03) sm = ift.FFTSmoothingOperator(signal_space, sigma=0.03)
...@@ -62,3 +62,5 @@ if __name__ == "__main__": ...@@ -62,3 +62,5 @@ if __name__ == "__main__":
ift.plotting.plot(variance,name="uncertainty.pdf",xlabel='Pixel index', ylabel='Pixel index') ift.plotting.plot(variance,name="uncertainty.pdf",xlabel='Pixel index', ylabel='Pixel index')
ift.plotting.plot(mock_signal,name="mock_signal.pdf",xlabel='Pixel index', ylabel='Pixel index') ift.plotting.plot(mock_signal,name="mock_signal.pdf",xlabel='Pixel index', ylabel='Pixel index')
ift.plotting.plot(ift.Field(signal_space, val=data.val),name="data.pdf",xlabel='Pixel index', ylabel='Pixel index') ift.plotting.plot(ift.Field(signal_space, val=data.val),name="data.pdf",xlabel='Pixel index', ylabel='Pixel index')
ift.plotting.plot(m,name="map.pdf",xlabel='Pixel index', ylabel='Pixel index')
...@@ -107,7 +107,7 @@ class Prober(object): ...@@ -107,7 +107,7 @@ class Prober(object):
""" a random-probe generator """ """ a random-probe generator """
f = Field.from_random(random_type=self.random_type, f = Field.from_random(random_type=self.random_type,
domain=self.domain, domain=self.domain,
dtype=self.probe_dtype) dtype=self.probe_dtype.type)
uid = self._uid_counter uid = self._uid_counter
self._uid_counter += 1 self._uid_counter += 1
return (uid, f) return (uid, f)
......
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