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
b5eb986d
Commit
b5eb986d
authored
Apr 14, 2024
by
Yan Zhaojun
Browse files
test
parent
26c6c9b3
Pipeline
#4031
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_mci_sim/csst_mci_sim.py
View file @
b5eb986d
...
...
@@ -211,10 +211,10 @@ def flux2ill(wave, flux):
return
E
################################################################
def
ill2flux
(
E
):
def
ill2flux
(
E
,
path
):
# use template from sky_bkg (background_spec_hst.dat)
filename
=
self
.
information
[
'dir_
path
'
]
+
'MCI_inputData/refs/background_spec_hst.dat'
filename
=
path
+
'MCI_inputData/refs/background_spec_hst.dat'
cat_spec
=
pd
.
read_csv
(
filename
,
sep
=
'\s+'
,
header
=
None
,
comment
=
'#'
)
wave0
=
cat_spec
[
0
].
values
# A
spec0
=
cat_spec
[
2
].
values
# erg/s/cm^2/A/arcsec^2
...
...
@@ -2012,7 +2012,7 @@ class MCIsimulator():
if
angle_earth
<
0
:
earth_e
=
0
earthshine_wave0
,
earthshine_flux0
=
ill2flux
(
earth_e
+
star_e
)
earthshine_wave0
,
earthshine_flux0
=
ill2flux
(
earth_e
+
star_e
,
self
.
information
[
'dir_pah'
]
)
# sample as ifs wavelength
wave_mci
=
np
.
linspace
(
2500
,
11000
,
8501
)
#np.arange(2500, 11000, 1)
...
...
@@ -2585,7 +2585,7 @@ class MCIsimulator():
if
angle_earth
<
0
:
earth_e
=
0
earthshine_wave0
,
earthshine_flux0
=
ill2flux
(
earth_e
+
star_e
)
earthshine_wave0
,
earthshine_flux0
=
ill2flux
(
earth_e
+
star_e
,
self
.
information
[
'dir_path'
]
)
# sample as ifs wavelength
wave_mci
=
np
.
linspace
(
2500
,
11000
,
8501
)
#np.arange(2500, 11000, 1)
...
...
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