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
bca4aeef
Commit
bca4aeef
authored
Apr 14, 2024
by
Yan Zhaojun
Browse files
test
parent
b9bc3f10
Pipeline
#4059
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_mci_sim/support/sed.py
View file @
bca4aeef
...
...
@@ -89,7 +89,7 @@ def flux_to_mag(wave, flux, path, band='GAIA_bp'):
return
-
2.5
*
np
.
log10
(
Tflux
)
def
calibrate
(
wave
,
flux
,
mag
,
band
=
'GAIA_bp'
):
def
calibrate
(
wave
,
flux
,
mag
,
path
,
band
=
'GAIA_bp'
):
"""
Calibrate the spectra according to the magnitude.
...
...
@@ -102,7 +102,7 @@ def calibrate(wave, flux, mag, band='GAIA_bp'):
Returns:
float: Flux of calibrated spectra. Units: 1e-17 erg/s/A/cm^2
"""
inst_mag
=
flux_to_mag
(
wave
,
flux
,
band
=
band
)
inst_mag
=
flux_to_mag
(
wave
,
flux
,
path
,
band
=
band
)
instflux
=
10
**
(
-
0.4
*
inst_mag
)
realflux
=
(
mag
*
u
.
STmag
).
to
(
u
.
erg
/
u
.
s
/
u
.
cm
**
2
/
u
.
AA
).
value
...
...
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