From 822836072c5f61e77a685dce9bdb7c57aa6d18af Mon Sep 17 00:00:00 2001 From: "zhaojunyan@shao.ac.cn" Date: Sun, 14 Apr 2024 20:04:48 +0800 Subject: [PATCH] test --- csst_mci_sim/csst_mci_sim.py | 12 +++++++++--- tests/test_mci_sim.py | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/csst_mci_sim/csst_mci_sim.py b/csst_mci_sim/csst_mci_sim.py index 3c5b2bc..cb825d7 100644 --- a/csst_mci_sim/csst_mci_sim.py +++ b/csst_mci_sim/csst_mci_sim.py @@ -2250,8 +2250,14 @@ class MCIsimulator(): stamp_img = galsim.Image(conv, copy=True) stamp_img.setOrigin(0,0) - stamp_img.scale=0.025 - self.log.info('load star catlog 999999999') + stamp_img.scale=0.025 + + self.log.info('begining galsim.PhotonArray.makeFromImage') + + self.log.info('stamp_img.array.max()= %i' % (stamp_img.array.max())) + + print('stamp_img.array.max(): ', stamp_img.array.max() ) + ################################################# photons=galsim.PhotonArray.makeFromImage(stamp_img, max_flux=min(1.0, stamp_img.array.max()/10000.0)) @@ -2259,7 +2265,7 @@ class MCIsimulator(): cx0,cy0=centroid(stamp_img.array) - self.log.info('load star catlog 99999999999998') + self.log.info('galsim.PhotonArray.makeFromImage') if self.appFatt : diff --git a/tests/test_mci_sim.py b/tests/test_mci_sim.py index b03b1a8..81afe25 100644 --- a/tests/test_mci_sim.py +++ b/tests/test_mci_sim.py @@ -15,6 +15,9 @@ from csst_mci_sim import csst_mci_sim import sys + +import faulthandler + class TestDemoFunction(unittest.TestCase): def test_mci_sim_1(self): @@ -32,6 +35,8 @@ class TestDemoFunction(unittest.TestCase): The demo function returns the length of the input argument list. This case aims to test whether the demo function returns `1` if input is `None`. """ + faulthandler.enable() + # demo function test dir_path = os.path.join(os.environ['UNIT_TEST_DATA_ROOT'],'mci_sim/') print(dir_path) -- GitLab