Commit 87388df4 authored by Feng Shuai's avatar Feng Shuai 💬
Browse files

Update tests/test_cube3d.py

parent 7b5d51ed
Pipeline #4100 failed with stage
in 0 seconds
...@@ -65,12 +65,15 @@ class test_cube3d(unittest.TestCase): ...@@ -65,12 +65,15 @@ class test_cube3d(unittest.TestCase):
u.savefits('result.fits') u.savefits('result.fits')
plt.figure(figsize=(16,4)) if np.sum(u.flux[50,50,:]) != np.sum(u.flux[5,95,:]):
plt.plot(u.wave,np.log10(u.flux[50,50,:]),color='blue',label=r'$v=%4.2f$'%(velmap.map[50,50])) print("No Problem!")
plt.plot(u.wave,np.log10(u.flux[5,95,:]),color='red',label=r'$v=%4.2f$'%(velmap.map[5,95]))
plt.xlim(3500,9500) #plt.figure(figsize=(16,4))
plt.legend(frameon=False) #plt.plot(u.wave,np.log10(u.flux[50,50,:]),color='blue',label=r'$v=%4.2f$'%(velmap.map[50,50]))
plt.savefig('./image/test_cube3d_spec.png') #plt.plot(u.wave,np.log10(u.flux[5,95,:]),color='red',label=r'$v=%4.2f$'%(velmap.map[5,95]))
#plt.xlim(3500,9500)
#plt.legend(frameon=False)
#plt.savefig('./image/test_cube3d_spec.png')
print("-----------------------------------------------------------------") print("-----------------------------------------------------------------")
print(">>> Unit test for **Spec Cube** Modelling has been passed!") print(">>> Unit test for **Spec Cube** Modelling has been passed!")
......
Supports Markdown
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