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
e9d3bdc9
Commit
e9d3bdc9
authored
Jan 19, 2025
by
Yan Zhaojun
Browse files
Replace demo.py
parent
b942cfc7
Pipeline
#7804
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_ifs_sim/help/demo.py
View file @
e9d3bdc9
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
"""
This is an example for csst_ifs_sim running.
This is a example for csst_ifs_sim running.
"""
"""
from
csst_ifs_sim
import
csst_ifs_sim
from
csst_ifs_sim
import
csst_ifs_sim
import
os
import
os
# Set the parent path where the IFS_inputdata folder is stored.
# Set the parent path where the IFS_inputdata folder is stored.
dir_path
=
'/home/yan/ifs_sim'
)
dir_path
=
'/home/yan/ifs_sim'
)
# Set the path to the called config file.
# Set the path to the called config file.
configfile
=
'./csst_ifs_sim/ifs_data/IFS_sim_C10.config'
configfile
=
'./csst_ifs_sim/ifs_data/IFS_sim_C10.config'
# Set the path to the simulation data storage file.
# Set the path to the simulation data storage file.
result_path
=
os
.
path
.
join
(
dir_path
,
'ifs_sim_result'
)
result_path
=
os
.
path
.
join
(
dir_path
,
'ifs_sim_result'
)
# Set the type of emulation, SCI, or DARK, or FLAT, or LAMP.
# Set the type of emulation, SCI, or DARK, or FLAT, or LAMP.
sourcein
=
'SCI'
sourcein
=
'SCI'
# Specifies whether the debug mode is used. If debug=True,
# Specifies whether the debug mode is used. If debug=True,
# this mode is used and the program will only simulate a few wavelength slices
# this mode is used and the program will only simulate a few wavelength slices
# to save time. If debug=False, the full simulation will be run.
# to save time. If debug=False, the full simulation will be run.
debug
=
True
debug
=
True
# set the simulaiton number. With modifications, parallel simulations
# set the simulaiton number. With modifications, parallel simulations
# can be executed.
# can be executed.
iLoop
=
1
iLoop
=
1
...
@@ -35,6 +26,3 @@ iLoop=1
...
@@ -35,6 +26,3 @@ iLoop=1
# the Hole simulation is executed.
# the Hole simulation is executed.
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
csst_ifs_sim
.
runIFSsim
(
sourcein
,
configfile
,
dir_path
,
result_path
,
iLoop
,
debug
,
'no'
)
dir_path
,
result_path
,
iLoop
,
debug
,
'no'
)
\ No newline at end of file
\ No newline at end of file
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