Commit 1b7e9fb4 by Martin Reinecke

### merge cleanups from dobj_experiments

parent c7beff09
Pipeline #21556 passed with stage
in 4 minutes and 50 seconds
 ... @@ -59,7 +59,7 @@ if __name__ == "__main__": ... @@ -59,7 +59,7 @@ if __name__ == "__main__": S = ift.create_power_operator(h_space, power_spectrum=p_spec) S = ift.create_power_operator(h_space, power_spectrum=p_spec) # Draw a sample sh from the prior distribution in harmonic space # Draw a sample sh from the prior distribution in harmonic space sp = ift.Field(p_space, val=p_spec(p_space.k_lengths)) sp = ift.PS_field(p_space, p_spec) sh = ift.power_synthesize(sp, real_signal=True) sh = ift.power_synthesize(sp, real_signal=True) # Choose the measurement instrument # Choose the measurement instrument ... @@ -106,7 +106,9 @@ if __name__ == "__main__": ... @@ -106,7 +106,9 @@ if __name__ == "__main__": def ps0(k): def ps0(k): return (1./(1.+k)**2) return (1./(1.+k)**2) t0 = ift.Field(p_space, val=np.log(1./(1+p_space.k_lengths)**2)) t0 = ift.Field(p_space, val=ift.dobj.from_global_data(np.log(1./(1+p_space.k_lengths)**2))) for i in range(500): for i in range(500): S0 = ift.create_power_operator(h_space, power_spectrum=ps0) S0 = ift.create_power_operator(h_space, power_spectrum=ps0) ... @@ -138,6 +140,6 @@ if __name__ == "__main__": ... @@ -138,6 +140,6 @@ if __name__ == "__main__": t0 = power_energy.position.real t0 = power_energy.position.real # Plot current estimate # Plot current estimate print(i) ift.dobj.mprint(i) if i % 5 == 0: if i % 5 == 0: plot_parameters(m0, t0, ift.log(sp), data_power) plot_parameters(m0, t0, ift.log(sp), data_power)