mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-11-27 23:47:48 +01:00
Checked and fixed the tests, got them all running
This commit is contained in:
1 parent
1502d567bf
commit
5925ee74ab
7 files changed
+24
-48
No files matched your search
@@ -8,7 +8,7 @@ import matplotlib.pyplot as plt
|
||||
def test_plot_amplitude(show_plot):
|
||||
# Test with tensor
|
||||
im = t.as_tensor(scipy.datasets.ascent(),dtype=t.complex128)
|
||||
plotting.plot_amplitude(im, basis = np.array([[1,1], [1,1], [0,0]]), title = 'Test Amplitude')
|
||||
plotting.plot_amplitude(im, basis = np.array([[0,-1], [-1,0], [0,0]]), title = 'Test Amplitude')
|
||||
if show_plot:
|
||||
plt.show()
|
||||
|
||||
@@ -28,15 +28,15 @@ def test_plot_phase(show_plot):
|
||||
|
||||
# Test with numpy array
|
||||
im = initializers.gaussian([512, 512], [200,200], amplitude=100, curvature=[.1,.1]).numpy()
|
||||
plotting.plot_phase(im, title = 'Test Phase', basis = np.array([[1,1], [1,1], [0,0]]))
|
||||
plotting.plot_phase(im, title = 'Test Phase', basis = np.array([[0,-1], [-1,0], [0,0]]))
|
||||
if show_plot:
|
||||
plt.show()
|
||||
|
||||
def test_plot_colorize(show_plot):
|
||||
def test_plot_colorized(show_plot):
|
||||
# Test with tensor
|
||||
gaussian = initializers.gaussian([512, 512], [200,200], amplitude=100, curvature=[.1,.1])
|
||||
im = gaussian * t.as_tensor(scipy.datasets.ascent(), dtype=t.complex64)
|
||||
plotting.plot_colorized(im, title = 'Test Colorize', basis = np.array([[1,1], [1,1], [0,0]]))
|
||||
plotting.plot_colorized(im, title = 'Test Colorize', basis = np.array([[0,-1], [-1,0], [0,0]]))
|
||||
if show_plot:
|
||||
plt.show()
|
||||
|
||||
|
||||
Reference in new issue
Block a user