test sinc remove
This commit is contained in:
parent
b8a7880527
commit
ed67e6f7f5
@ -61,24 +61,24 @@ def rotate(x, y, angle):
|
|||||||
|
|
||||||
|
|
||||||
def test_square():
|
def test_square():
|
||||||
LEN = 40
|
LEN = 10
|
||||||
# lat = SCC_Lattice(LEN, LEN)
|
lat = SCC_Lattice(LEN, LEN)
|
||||||
lat = VO2_Lattice(LEN, LEN)
|
# lat = VO2_Lattice(LEN, LEN)
|
||||||
plot = Plotter(lat)
|
plot = Plotter(lat)
|
||||||
pos_x, pos_y = lat.get_from_mask(np.zeros((40, 40)))
|
pos_x, pos_y = lat.get_from_mask(np.zeros((40, 40)))
|
||||||
# pos_x, pos_y = rotate(pos_x, pos_y, 30)
|
# pos_x, pos_y = rotate(pos_x, pos_y, 30)
|
||||||
si = SpinImage(pos_x, pos_y)
|
si = SpinImage(pos_x, pos_y)
|
||||||
fig, axs = plt.subplots(2, 2)
|
fig, axs = plt.subplots(2, 2)
|
||||||
si.pad_it_square(10)
|
si.plot(axs[0, 0],1)
|
||||||
si.plot(axs[0, 0], 2)
|
|
||||||
# si.gaussian(LEN)
|
# si.gaussian(LEN)
|
||||||
# si.blur(3)
|
# 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)
|
plt.pause(0.1)
|
||||||
fx, fy, intens = si.fft()
|
fx, fy, intens = si.fft()
|
||||||
plot.plot(fx, fy, intens, axs[1, 0], axs[1, 1])
|
plot.plot(fx, fy, intens, axs[1, 0], axs[1, 1])
|
||||||
plt.savefig("test.png")
|
plt.savefig("test.pdf")
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
|
||||||
@ -305,13 +305,13 @@ def ising(seed):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# test_square()
|
test_square()
|
||||||
#test_mixed()
|
#test_mixed()
|
||||||
#plt.show()
|
|
||||||
# random()
|
|
||||||
np.random.seed(1234)
|
|
||||||
for i in np.random.randint(0, 10000, 1):
|
|
||||||
random(i)
|
|
||||||
ising(i)
|
|
||||||
|
|
||||||
plt.show()
|
plt.show()
|
||||||
|
# random()
|
||||||
|
# np.random.seed(1234)
|
||||||
|
# for i in np.random.randint(0, 10000, 1):
|
||||||
|
# random(i)
|
||||||
|
# ising(i)
|
||||||
|
|
||||||
|
# plt.show()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import scipy.fftpack as sfft
|
|
||||||
import scipy
|
import scipy
|
||||||
|
import scipy.fftpack as sfft
|
||||||
|
import scipy.signal
|
||||||
|
|
||||||
class SpinImage:
|
class SpinImage:
|
||||||
resolution = 0.1
|
resolution = 0.1
|
||||||
|
Loading…
Reference in New Issue
Block a user