Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-sims
csst_ifs_sim
Commits
62bb13ae
Commit
62bb13ae
authored
Apr 16, 2024
by
Yan Zhaojun
Browse files
debug
parent
4716160c
Pipeline
#4103
passed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_ifs_sim/csst_ifs_sim.py
View file @
62bb13ae
...
...
@@ -5355,11 +5355,7 @@ class IFSsimulator():
self
.
simnumber
=
simnumber
self
.
configure
(
simnumber
)
# print the configfile name and path;
if
self
.
information
[
'debug'
]
==
'yes'
:
self
.
debug
=
True
else
:
self
.
debug
=
False
self
.
debug
=
self
.
information
[
'debug'
]
self
.
dt
=
datetime
.
utcnow
()
...
...
@@ -5617,7 +5613,7 @@ class IFSsimulator():
############################################################################
def
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
iLoop
,
applyhole
=
'no'
):
def
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
iLoop
,
debug
,
applyhole
=
'no'
):
"""
...
...
@@ -5650,6 +5646,8 @@ def runIFSsim(sourcein, configfile, dir_path, iLoop, applyhole='no'):
### dir_path = os.path.join(os.environ['UNIT_TEST_DATA_ROOT'], 'ifs_sim/')
simulate
[
iLoop
].
information
[
'dir_path'
]
=
dir_path
simulate
[
iLoop
].
information
[
'debug'
]
=
debug
simulate
[
iLoop
].
simulate
(
sourcein
,
iLoop
)
return
1
...
...
tests/test_ifs_sim.py
View file @
62bb13ae
...
...
@@ -42,7 +42,8 @@ class TestDemoFunction(unittest.TestCase):
sourcein
=
'SCI'
print
(
configfile
)
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
'no'
)
debug
=
True
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
debug
,
'no'
)
self
.
assertEqual
(
1
,
1
,
"case 1: SCI sim passes."
,
...
...
@@ -75,7 +76,9 @@ class TestDemoFunction(unittest.TestCase):
sourcein
=
'BIAS'
print
(
configfile
)
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
'no'
)
debug
=
True
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
debug
,
'no'
)
self
.
assertEqual
(
1
,
1
,
"case 2: sim passes."
,
...
...
@@ -108,7 +111,9 @@ class TestDemoFunction(unittest.TestCase):
sourcein
=
'DARK'
print
(
configfile
)
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
'no'
)
debug
=
True
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
debug
,
'no'
)
self
.
assertEqual
(
1
,
1
,
"case 3: sim passes."
,
...
...
@@ -141,7 +146,8 @@ class TestDemoFunction(unittest.TestCase):
sourcein
=
'LAMP'
print
(
configfile
)
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
'no'
)
debug
=
True
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
debug
,
'no'
)
self
.
assertEqual
(
1
,
1
,
"case 4: sim passes."
,
...
...
@@ -174,7 +180,8 @@ class TestDemoFunction(unittest.TestCase):
sourcein
=
'LAMP'
print
(
configfile
)
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
'yes'
)
debug
=
True
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
debug
,
'no'
)
self
.
assertEqual
(
1
,
1
,
"case 5: sim passes."
,
...
...
@@ -207,7 +214,8 @@ class TestDemoFunction(unittest.TestCase):
sourcein
=
'FLAT'
print
(
configfile
)
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
'no'
)
debug
=
True
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
1
,
debug
,
'no'
)
self
.
assertEqual
(
1
,
1
,
"case 6: sim passes."
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment