Commit 857111d8 authored by Feng Shuai's avatar Feng Shuai 💬
Browse files

Update csst_ifs_gehong/config.py, tests/test_map2d.py, tests/test_spec1d.py,...

Update csst_ifs_gehong/config.py, tests/test_map2d.py, tests/test_spec1d.py, csst_ifs_gehong/spec1d.py
parent 911146e1
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ from astropy.io import fits
from scipy.stats import norm
from scipy.interpolate import interp1d

data_path = '.'
data_path = os.getcwd()

def readcol(filename, **kwargs):
    """
+24 −24
Original line number Diff line number Diff line
@@ -52,14 +52,14 @@ class test_map2d(unittest.TestCase):
        if np.sum(sbmap1.map) != np.sum(sbmap0.map):
            print("No Problem!")

        plt.figure(figsize=(6,5))
        plt.imshow(sbmap0.map, origin='lower', cmap='gray_r')
        plt.xticks([])
        plt.yticks([])
        plt.title('Surface Brightness Modelling')
        plt.colorbar(label='mag')
        plt.tight_layout()
        plt.savefig('./image/test_map2d_SBmap.png')
        #plt.figure(figsize=(6,5))
        #plt.imshow(sbmap0.map, origin='lower', cmap='gray_r')
        #plt.xticks([])
        #plt.yticks([])
        #plt.title('Surface Brightness Modelling')
        #plt.colorbar(label='mag')
        #plt.tight_layout()
        #plt.savefig('./image/test_map2d_SBmap.png')

    def test_velmap(self):

@@ -93,14 +93,14 @@ class test_map2d(unittest.TestCase):
        if np.sum(velmap1.map) != np.sum(velmap0.map):
            print("No Problem!")

        plt.figure(figsize=(6,5))
        plt.imshow(velmap0.map, origin='lower', cmap='RdBu_r')
        plt.xticks([])
        plt.yticks([])
        plt.title('Velocity Map Modelling')
        plt.colorbar(label='km/s')
        plt.tight_layout()
        plt.savefig('./image/test_map2d_velmap.png')
        #plt.figure(figsize=(6,5))
        #plt.imshow(velmap0.map, origin='lower', cmap='RdBu_r')
        #plt.xticks([])
        #plt.yticks([])
        #plt.title('Velocity Map Modelling')
        #plt.colorbar(label='km/s')
        #plt.tight_layout()
        #plt.savefig('./image/test_map2d_velmap.png')

    def test_gremap(self):

@@ -140,14 +140,14 @@ class test_map2d(unittest.TestCase):
        if np.sum(velmap1.map) != np.sum(velmap0.map):
            print("No Problem!")

        plt.figure(figsize=(6,5))
        plt.imshow(velmap0.map, origin='lower', cmap='RdBu_r')
        plt.xticks([])
        plt.yticks([])
        plt.title('Gredient Map Modelling')
        plt.colorbar(label='')
        plt.tight_layout()
        plt.savefig('./image/test_map2d_gredmap.png')
        #plt.figure(figsize=(6,5))
        #plt.imshow(velmap0.map, origin='lower', cmap='RdBu_r')
        #plt.xticks([])
        #plt.yticks([])
        #plt.title('Gredient Map Modelling')
        #plt.colorbar(label='')
        #plt.tight_layout()
        #plt.savefig('./image/test_map2d_gredmap.png')

    def test_input_image(self):

+4 −4
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ class test_spec1d(unittest.TestCase):
            plt.xlim(3900, 6200)

        plt.tight_layout()
        plt.savefig('./image/test_spec1d_stellarpopulation.png')
        #plt.savefig('./image/test_spec1d_stellarpopulation.png')
        
    def test_Star(self):

@@ -177,7 +177,7 @@ class test_spec1d(unittest.TestCase):
            plt.xlim(3900, 6200)
        
        plt.tight_layout()
        plt.savefig('./image/test_spec1d_singlestar.png')
        #plt.savefig('./image/test_spec1d_singlestar.png')

        print("-----------------------------------------------------------------")
        print(">>> Unit test for **Single Stellar** Modelling has been passed!")
@@ -267,7 +267,7 @@ class test_spec1d(unittest.TestCase):
            plt.xlim(3900, 6200)

        plt.tight_layout()
        plt.savefig('./image/test_spec1d_ionizedgas.png')
        #plt.savefig('./image/test_spec1d_ionizedgas.png')

        print("-----------------------------------------------------------------")
        print(">>> Unit test for **Ionized Gas** Modelling has been passed!")
@@ -359,7 +359,7 @@ class test_spec1d(unittest.TestCase):
            plt.xlim(3900, 6200)

        plt.tight_layout()
        plt.savefig('./image/test_spec1d_agn.png')
        #plt.savefig('./image/test_spec1d_agn.png')

        print("-----------------------------------------------------------------")
        print(">>> Unit test for **AGN** Modelling has been passed!")
+1 −1

File changed.

Contains only whitespace changes.