Commit 222f8620 authored by Jakob Knollmueller's avatar Jakob Knollmueller

making it run again

parent ca88c041
......@@ -67,8 +67,7 @@ if __name__ == "__main__":
distribution_strategy=distribution_strategy, nbin=500)
# Choosing the prior correlation structure and defining correlation operator
pow_spec = (lambda k: (.05 / (k + 1) ** 2))
p_spec = lambda z: pow_spec(z) ** (1. / 2)
p_spec = (lambda k: (.05 / (k + 1) ** 2))
S = create_power_operator(h_space, power_spectrum=p_spec,
distribution_strategy=distribution_strategy)
......
......@@ -42,7 +42,7 @@ if __name__ == "__main__":
distribution_strategy = 'not'
# Set up position space
s_space = RGSpace([1024,1024])
s_space = RGSpace([512,512])
# s_space = HPSpace(32)
# Define harmonic transformation and associated harmonic space
......@@ -53,13 +53,13 @@ if __name__ == "__main__":
p_space = PowerSpace(h_space, distribution_strategy=distribution_strategy)
# Choosing the prior correlation structure and defining correlation operator
pow_spec = (lambda k: (42 / (k + 1) ** 3))
sqr_pow_spec = lambda z: pow_spec(z) ** (1. / 2)
S = create_power_operator(h_space, power_spectrum=sqr_pow_spec,
p_spec = (lambda k: (42 / (k + 1) ** 3))
S = create_power_operator(h_space, power_spectrum=p_spec,
distribution_strategy=distribution_strategy)
# Drawing a sample sh from the prior distribution in harmonic space
sp = Field(p_space, val=lambda z: pow_spec(z)**(1./2),
sp = Field(p_space, val=p_spec,
distribution_strategy=distribution_strategy)
sh = sp.power_synthesize(real_signal=True)
ss = fft.adjoint_times(sh)
......
......@@ -63,7 +63,7 @@ def create_power_operator(domain, power_spectrum, dtype=None,
fp = Field(power_domain, val=power_spectrum, dtype=dtype,
distribution_strategy=distribution_strategy)
f = fp.power_synthesize(mean=1, std=0, real_signal=False)
f **= 2
return DiagonalOperator(domain, diagonal=f, bare=True)
def generate_posterior_sample(mean, covariance):
......
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