Commit 7fb09a73 authored by Jakob Knollmueller's avatar Jakob Knollmueller

polishing

parent f4fb46b8
...@@ -41,3 +41,12 @@ if __name__ == '__main__': ...@@ -41,3 +41,12 @@ if __name__ == '__main__':
#plotting on logarithmic scale #plotting on logarithmic scale
plt.imsave('diffuse_component.png', Starblade.s.val, vmin=vmin, vmax=vmax) plt.imsave('diffuse_component.png', Starblade.s.val, vmin=vmin, vmax=vmax)
plt.imsave('pointlike_component.png', Starblade.u.val, vmin=vmin, vmax=vmax) plt.imsave('pointlike_component.png', Starblade.u.val, vmin=vmin, vmax=vmax)
plt.figure()
k_lenghts = Starblade.power_spectrum.domain[0].k_lengths
plt.plot(k_lenghts, Starblade.power_spectrum.val)
plt.title('power spectrum')
plt.yscale('log')
plt.xscale('log')
plt.ylabel('power')
plt.xscale('harmonic mode')
plt.savefig('power_spectrum.png')
...@@ -29,9 +29,7 @@ if __name__ == '__main__': ...@@ -29,9 +29,7 @@ if __name__ == '__main__':
data = data.astype(float) data = data.astype(float)
data = data.clip(0.0001) data = data.clip(0.0001)
alpha = 1.3 alpha = 1.3
MultiStarblade = sb.build_multi_starblade(data, alpha, newton_iterations=1) MultiStarblade = sb.build_multi_starblade(data, alpha=alpha)
# power = MultiStarblade[0].power_spectrum / np.arange(len(MultiStarblade[0].power_spectrum.val))**0
# MultiStarblade = sb.build_multi_starblade(data,alpha,newton_iterations=1, manual_power_spectrum=power)
for i in range(50): for i in range(50):
MultiStarblade = sb.multi_starblade_iteration(MultiStarblade, processes=1) MultiStarblade = sb.multi_starblade_iteration(MultiStarblade, processes=1)
...@@ -46,10 +44,4 @@ if __name__ == '__main__': ...@@ -46,10 +44,4 @@ if __name__ == '__main__':
plt.imsave('rgb_diffuse.jpg',diffuse/255.) plt.imsave('rgb_diffuse.jpg',diffuse/255.)
plt.imsave('rgb_point.jpg',point/255.) plt.imsave('rgb_point.jpg',point/255.)
plt.figure()
plt.plot(MultiStarblade[0].power_spectrum.val)
plt.yscale('log')
plt.xscale('log')
plt.savefig('power.jpg')
plt.close()
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