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
Pipeline #4096 failed with stage
in 0 seconds
...@@ -8,7 +8,7 @@ from astropy.io import fits ...@@ -8,7 +8,7 @@ from astropy.io import fits
from scipy.stats import norm from scipy.stats import norm
from scipy.interpolate import interp1d from scipy.interpolate import interp1d
data_path = '.' data_path = os.getcwd()
def readcol(filename, **kwargs): def readcol(filename, **kwargs):
""" """
......
...@@ -52,14 +52,14 @@ class test_map2d(unittest.TestCase): ...@@ -52,14 +52,14 @@ class test_map2d(unittest.TestCase):
if np.sum(sbmap1.map) != np.sum(sbmap0.map): if np.sum(sbmap1.map) != np.sum(sbmap0.map):
print("No Problem!") print("No Problem!")
plt.figure(figsize=(6,5)) #plt.figure(figsize=(6,5))
plt.imshow(sbmap0.map, origin='lower', cmap='gray_r') #plt.imshow(sbmap0.map, origin='lower', cmap='gray_r')
plt.xticks([]) #plt.xticks([])
plt.yticks([]) #plt.yticks([])
plt.title('Surface Brightness Modelling') #plt.title('Surface Brightness Modelling')
plt.colorbar(label='mag') #plt.colorbar(label='mag')
plt.tight_layout() #plt.tight_layout()
plt.savefig('./image/test_map2d_SBmap.png') #plt.savefig('./image/test_map2d_SBmap.png')
def test_velmap(self): def test_velmap(self):
...@@ -93,14 +93,14 @@ class test_map2d(unittest.TestCase): ...@@ -93,14 +93,14 @@ class test_map2d(unittest.TestCase):
if np.sum(velmap1.map) != np.sum(velmap0.map): if np.sum(velmap1.map) != np.sum(velmap0.map):
print("No Problem!") print("No Problem!")
plt.figure(figsize=(6,5)) #plt.figure(figsize=(6,5))
plt.imshow(velmap0.map, origin='lower', cmap='RdBu_r') #plt.imshow(velmap0.map, origin='lower', cmap='RdBu_r')
plt.xticks([]) #plt.xticks([])
plt.yticks([]) #plt.yticks([])
plt.title('Velocity Map Modelling') #plt.title('Velocity Map Modelling')
plt.colorbar(label='km/s') #plt.colorbar(label='km/s')
plt.tight_layout() #plt.tight_layout()
plt.savefig('./image/test_map2d_velmap.png') #plt.savefig('./image/test_map2d_velmap.png')
def test_gremap(self): def test_gremap(self):
...@@ -140,14 +140,14 @@ class test_map2d(unittest.TestCase): ...@@ -140,14 +140,14 @@ class test_map2d(unittest.TestCase):
if np.sum(velmap1.map) != np.sum(velmap0.map): if np.sum(velmap1.map) != np.sum(velmap0.map):
print("No Problem!") print("No Problem!")
plt.figure(figsize=(6,5)) #plt.figure(figsize=(6,5))
plt.imshow(velmap0.map, origin='lower', cmap='RdBu_r') #plt.imshow(velmap0.map, origin='lower', cmap='RdBu_r')
plt.xticks([]) #plt.xticks([])
plt.yticks([]) #plt.yticks([])
plt.title('Gredient Map Modelling') #plt.title('Gredient Map Modelling')
plt.colorbar(label='') #plt.colorbar(label='')
plt.tight_layout() #plt.tight_layout()
plt.savefig('./image/test_map2d_gredmap.png') #plt.savefig('./image/test_map2d_gredmap.png')
def test_input_image(self): def test_input_image(self):
......
...@@ -108,7 +108,7 @@ class test_spec1d(unittest.TestCase): ...@@ -108,7 +108,7 @@ class test_spec1d(unittest.TestCase):
plt.xlim(3900, 6200) plt.xlim(3900, 6200)
plt.tight_layout() plt.tight_layout()
plt.savefig('./image/test_spec1d_stellarpopulation.png') #plt.savefig('./image/test_spec1d_stellarpopulation.png')
def test_Star(self): def test_Star(self):
...@@ -177,7 +177,7 @@ class test_spec1d(unittest.TestCase): ...@@ -177,7 +177,7 @@ class test_spec1d(unittest.TestCase):
plt.xlim(3900, 6200) plt.xlim(3900, 6200)
plt.tight_layout() plt.tight_layout()
plt.savefig('./image/test_spec1d_singlestar.png') #plt.savefig('./image/test_spec1d_singlestar.png')
print("-----------------------------------------------------------------") print("-----------------------------------------------------------------")
print(">>> Unit test for **Single Stellar** Modelling has been passed!") print(">>> Unit test for **Single Stellar** Modelling has been passed!")
...@@ -267,7 +267,7 @@ class test_spec1d(unittest.TestCase): ...@@ -267,7 +267,7 @@ class test_spec1d(unittest.TestCase):
plt.xlim(3900, 6200) plt.xlim(3900, 6200)
plt.tight_layout() plt.tight_layout()
plt.savefig('./image/test_spec1d_ionizedgas.png') #plt.savefig('./image/test_spec1d_ionizedgas.png')
print("-----------------------------------------------------------------") print("-----------------------------------------------------------------")
print(">>> Unit test for **Ionized Gas** Modelling has been passed!") print(">>> Unit test for **Ionized Gas** Modelling has been passed!")
...@@ -359,7 +359,7 @@ class test_spec1d(unittest.TestCase): ...@@ -359,7 +359,7 @@ class test_spec1d(unittest.TestCase):
plt.xlim(3900, 6200) plt.xlim(3900, 6200)
plt.tight_layout() plt.tight_layout()
plt.savefig('./image/test_spec1d_agn.png') #plt.savefig('./image/test_spec1d_agn.png')
print("-----------------------------------------------------------------") print("-----------------------------------------------------------------")
print(">>> Unit test for **AGN** Modelling has been passed!") print(">>> Unit test for **AGN** 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