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

Update tests/test_cube3d.py

parent 7b5d51ed
Loading
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -65,12 +65,15 @@ class test_cube3d(unittest.TestCase):

        u.savefits('result.fits')

        plt.figure(figsize=(16,4))
        plt.plot(u.wave,np.log10(u.flux[50,50,:]),color='blue',label=r'$v=%4.2f$'%(velmap.map[50,50]))
        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')
        if np.sum(u.flux[50,50,:]) != np.sum(u.flux[5,95,:]):
            print("No Problem!")

        #plt.figure(figsize=(16,4))
        #plt.plot(u.wave,np.log10(u.flux[50,50,:]),color='blue',label=r'$v=%4.2f$'%(velmap.map[50,50]))
        #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(">>> Unit test for **Spec Cube** Modelling has been passed!")