diff --git a/tests/test_BF_CTE.py b/tests/test_BF_CTE.py index 01817636d8a96347517b1900afac4685cb8f4023..35ed176de3fdbcad8fc9193a3b526c6200a21429 100644 --- a/tests/test_BF_CTE.py +++ b/tests/test_BF_CTE.py @@ -79,7 +79,8 @@ def defineFilt(chip): class detModule_coverage(unittest.TestCase): def __init__(self, methodName='runTest'): super(detModule_coverage, self).__init__(methodName) - self.dataPath = "/public/home/chengliang/CSSOSDataProductsSims/csst-simulation/tests/UNIT_TEST_DATA" ##os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_gc1') + ##self.dataPath = "/public/home/chengliang/CSSOSDataProductsSims/csst-simulation/tests/UNIT_TEST_DATA" ##os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_gc1') + self.dataPath = os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_msc') self.iccd = 1 @@ -132,11 +133,11 @@ class detModule_coverage(unittest.TestCase): rho_trap = np.array([0.6,1.6,1.4],dtype=np.float32) trap_seeds = np.array([0,100,1000],dtype=np.int32) release_seed = 500 - image = fits.getdata("UNIT_TEST_DATA/testCTE_image_before.fits").astype(np.int32) + image = fits.getdata(os.path.join(self.dataPath, "testCTE_image_before.fits")).astype(np.int32) #get_trap_map(trap_seeds,nx,ny,nmax,rho_trap,beta,c,".") #bin2fits("trap.bin",".",nsp,nx,ny,nmax) image_cti = CTI_sim(image,nx,ny,noverscan,nsp,nmax,beta,w,c,t,rho_trap,trap_seeds,release_seed) - fits.writeto("UNIT_TEST_DATA/testCTE_image_after.fits",data=image_cti,overwrite=True) + fits.writeto(os.path.join(self.dataPath, "testCTE_image_after.fits"),data=image_cti,overwrite=True) if __name__ == '__main__': diff --git a/tests/test_PSFmodule.py b/tests/test_PSFmodule.py index 1d878d4224341d0b3395fbb8bee1421e5f0cb61a..de8bf27555161fc96c6c79c9a2f7e978690d054b 100644 --- a/tests/test_PSFmodule.py +++ b/tests/test_PSFmodule.py @@ -39,8 +39,8 @@ def defineFilt(chip): class PSFInterpModule_coverage(unittest.TestCase): def __init__(self, methodName='runTest'): super(PSFInterpModule_coverage, self).__init__(methodName) - self.dataPath = "/public/home/chengliang/CSSOSDataProductsSims/csst-simulation/tests/UNIT_TEST_DATA" ##os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_gc1') - self.iccd = 1 + self.dataPath = os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_msc') + self.iccd = 8 def test_loadPSFSet(self): config_file = os.path.join(self.dataPath, 'config_test.yaml') @@ -49,7 +49,7 @@ class PSFInterpModule_coverage(unittest.TestCase): print(chip.chipID) print(chip.cen_pix_x, chip.cen_pix_y) - pathTemp = "/public/share/yangxuliu/CSSOSDataProductsSims/psfCube/set1_dynamic/" + pathTemp = self.dataPath #"/public/share/yangxuliu/CSSOSDataProductsSims/psfCube/set1_dynamic/" psfModel= PSFInterp(chip, npsf=900, PSF_data_file=pathTemp, PSF_data_prefix="", HocBuild=True, LOG_DEBUG=True) x, y = 4096, 4096 #imgPos[iobj, :] # try get the PSF at some location (1234, 1234) on the chip diff --git a/tests/test_darknoise_func.py b/tests/test_darknoise_func.py index 93d5e65742987eb60f2e2b27bac342ef223d31d7..680ce7b1879ac55f3b01a841d22dc99dfbd371ae 100644 --- a/tests/test_darknoise_func.py +++ b/tests/test_darknoise_func.py @@ -60,7 +60,7 @@ def defineFilt(chip): class detModule_coverage(unittest.TestCase): def __init__(self, methodName='runTest'): super(detModule_coverage, self).__init__(methodName) - self.dataPath = "/public/home/chengliang/CSSOSDataProductsSims/csst-simulation/tests/UNIT_TEST_DATA" ##os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_gc1') + self.dataPath = os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_msc') self.iccd = 1 def test_add_dark(self): diff --git a/tests/test_prescan_overscan_func.py b/tests/test_prescan_overscan_func.py index 9e8667bdad3677b54c4078b7becb215651fe6ca5..f3b17576c4a51573107939877a46e931476adad3 100644 --- a/tests/test_prescan_overscan_func.py +++ b/tests/test_prescan_overscan_func.py @@ -81,7 +81,7 @@ def defineFilt(chip): class detModule_coverage(unittest.TestCase): def __init__(self, methodName='runTest'): super(detModule_coverage, self).__init__(methodName) - self.dataPath = "/public/home/chengliang/CSSOSDataProductsSims/csst-simulation/tests/UNIT_TEST_DATA" ##os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_gc1') + self.dataPath = os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_msc') self.iccd = 1 def test_add_prescan_overscan(self):