diff --git a/csst_ifs_gehong/config.py b/csst_ifs_gehong/config.py index a0ab871e61e87edd169cda477015baad68d0d595..bedef18cb1e4c3b9ec8c921ac3bdcddaac712a15 100644 --- a/csst_ifs_gehong/config.py +++ b/csst_ifs_gehong/config.py @@ -33,4 +33,4 @@ class config(): self.ny = ny self.dpix = dpix self.fov_x = nx * dpix - self.fov_y = ny * dpix \ No newline at end of file + self.fov_y = ny * dpix diff --git a/csst_ifs_gehong/spec1d.py b/csst_ifs_gehong/spec1d.py index a50bf9941bbe238cb4298712bb45014048dddd34..c91ae5bb4f0bc9eba4ad9c5bdc559facfa90546e 100644 --- a/csst_ifs_gehong/spec1d.py +++ b/csst_ifs_gehong/spec1d.py @@ -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): """ diff --git a/tests/test_map2d.py b/tests/test_map2d.py index 2581686706db8761110a024514112fed411aed3a..6e19be30f3080f5c8f177d2717f6e05e6b142e05 100644 --- a/tests/test_map2d.py +++ b/tests/test_map2d.py @@ -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): diff --git a/tests/test_spec1d.py b/tests/test_spec1d.py index 08bdb67c78696bd2d610fc60dae2ee74806c460b..75def916ee08ec63e626159bda71923280033dfe 100644 --- a/tests/test_spec1d.py +++ b/tests/test_spec1d.py @@ -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!")