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_mci_sim
Commits
32f40c2a
Commit
32f40c2a
authored
Jan 20, 2025
by
Yan Zhaojun
Browse files
Upload New File
parent
381a8618
Pipeline
#7811
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_mci_sim/help/demo_mci.py
0 → 100644
View file @
32f40c2a
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This is an example for mci simulation.
@author: yan
"""
import
os
from
csst_mci_sim
import
csst_mci_sim
# Set the parent path where the MCI_inputdata folder is stored.
dir_path
=
'home/yan/'
# Set the path to the called config file.
configfile
=
os
.
path
.
join
(
dir_path
,
'MCI_inputData/configData/mci_C10.config'
)
# Set the path to the simulation data storage file.
result_path
=
os
.
path
.
join
(
dir_path
,
'mci_sim_result'
)
sourcein
=
'STAR'
# or EXDF or FLAT or DARK or BIAS
# Specifies whether the debug mode is used. If debug=True,
# 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.
debug
=
False
# set the simulaiton number. With modifications, parallel simulations
# can be executed.
iLoop
=
1
# run the main function
# When the last parameter is yes and sourcein is LAMP,
# the Hole simulation is executed.
csst_mci_sim
.
runMCIsim
(
sourcein
,
configfile
,
dir_path
,
result_path
,
debug
,
iLoop
)
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