From ed67e6f7f58cd77c3bf75b428198a19967fe1d9c Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 9 Mar 2023 13:10:10 +0100 Subject: [PATCH] test sinc remove --- 2d_fourie/main.py | 30 +++++++++++++++--------------- 2d_fourie/spin_image.py | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/2d_fourie/main.py b/2d_fourie/main.py index 430087c..462980a 100644 --- a/2d_fourie/main.py +++ b/2d_fourie/main.py @@ -61,24 +61,24 @@ def rotate(x, y, angle): def test_square(): - LEN = 40 - # lat = SCC_Lattice(LEN, LEN) - lat = VO2_Lattice(LEN, LEN) + LEN = 10 + lat = SCC_Lattice(LEN, LEN) + # lat = VO2_Lattice(LEN, LEN) plot = Plotter(lat) pos_x, pos_y = lat.get_from_mask(np.zeros((40, 40))) # pos_x, pos_y = rotate(pos_x, pos_y, 30) si = SpinImage(pos_x, pos_y) fig, axs = plt.subplots(2, 2) - si.pad_it_square(10) - si.plot(axs[0, 0], 2) + si.plot(axs[0, 0],1) # si.gaussian(LEN) # si.blur(3) - si.plot(axs[0, 1], 2) + si.pad_it_square(int((5./2.)/0.1)) + si.plot(axs[0, 1],1) plt.pause(0.1) fx, fy, intens = si.fft() plot.plot(fx, fy, intens, axs[1, 0], axs[1, 1]) - plt.savefig("test.png") + plt.savefig("test.pdf") plt.show() @@ -305,13 +305,13 @@ def ising(seed): if __name__ == "__main__": - # test_square() + test_square() #test_mixed() - #plt.show() - # random() - np.random.seed(1234) - for i in np.random.randint(0, 10000, 1): - random(i) - ising(i) - plt.show() + # random() + # np.random.seed(1234) + # for i in np.random.randint(0, 10000, 1): + # random(i) + # ising(i) + + # plt.show() diff --git a/2d_fourie/spin_image.py b/2d_fourie/spin_image.py index e7ecbef..72866c5 100644 --- a/2d_fourie/spin_image.py +++ b/2d_fourie/spin_image.py @@ -1,7 +1,7 @@ import numpy as np -import scipy.fftpack as sfft import scipy - +import scipy.fftpack as sfft +import scipy.signal class SpinImage: resolution = 0.1