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
b9bc3f10
Commit
b9bc3f10
authored
Apr 14, 2024
by
Yan Zhaojun
Browse files
test
parent
5f8779ad
Pipeline
#4058
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_mci_sim/support/sed.py
View file @
b9bc3f10
...
...
@@ -125,8 +125,8 @@ class Gal_Temp():
###import os
###parent = os.path.dirname(os.path.realpath(__file__))
hdulist
=
fits
.
open
(
path
+
'MCI_inputData/SED_Code/seddata/galaxy_temp.fits'
)
self
.
path
=
path
hdulist
=
fits
.
open
(
self
.
path
+
'MCI_inputData/SED_Code/seddata/galaxy_temp.fits'
)
self
.
wave
=
hdulist
[
1
].
data
[
'wave'
]
self
.
flux
=
hdulist
[
2
].
data
self
.
age_grid
=
hdulist
[
3
].
data
[
'logAge'
]
...
...
@@ -139,11 +139,11 @@ class Gal_Temp():
redshift (float, optional): redshift of spectra. Defaults to 0.
"""
wave
=
self
.
wave
*
(
1
+
redshift
)
self
.
umag
=
flux_to_mag
(
wave
,
self
.
flux
,
band
=
'SDSS_u'
)
self
.
gmag
=
flux_to_mag
(
wave
,
self
.
flux
,
band
=
'SDSS_g'
)
self
.
rmag
=
flux_to_mag
(
wave
,
self
.
flux
,
band
=
'SDSS_r'
)
self
.
imag
=
flux_to_mag
(
wave
,
self
.
flux
,
band
=
'SDSS_i'
)
self
.
zmag
=
flux_to_mag
(
wave
,
self
.
flux
,
band
=
'SDSS_z'
)
self
.
umag
=
flux_to_mag
(
wave
,
self
.
flux
,
self
.
path
,
band
=
'SDSS_u'
)
self
.
gmag
=
flux_to_mag
(
wave
,
self
.
flux
,
self
.
path
,
band
=
'SDSS_g'
)
self
.
rmag
=
flux_to_mag
(
wave
,
self
.
flux
,
self
.
path
,
band
=
'SDSS_r'
)
self
.
imag
=
flux_to_mag
(
wave
,
self
.
flux
,
self
.
path
,
band
=
'SDSS_i'
)
self
.
zmag
=
flux_to_mag
(
wave
,
self
.
flux
,
self
.
path
,
band
=
'SDSS_z'
)
class
Star_Temp
():
"""
...
...
@@ -153,7 +153,7 @@ class Star_Temp():
def
__init__
(
self
,
path
):
##import os
self
.
path
=
path
####parent = os.path.dirname(os.path.realpath(__file__))
###print("获取其父目录——" + parent) # 从当前文件路径中获取目录
...
...
@@ -163,14 +163,14 @@ class Star_Temp():
self
.
Teff_grid
=
hdulist
[
3
].
data
[
'Teff'
]
self
.
FeH_grid
=
hdulist
[
3
].
data
[
'FeH'
]
self
.
bpmag
=
flux_to_mag
(
self
.
wave
,
self
.
flux
,
band
=
'GAIA_bp'
)
self
.
rpmag
=
flux_to_mag
(
self
.
wave
,
self
.
flux
,
band
=
'GAIA_rp'
)
self
.
bpmag
=
flux_to_mag
(
self
.
wave
,
self
.
flux
,
path
,
band
=
'GAIA_bp'
)
self
.
rpmag
=
flux_to_mag
(
self
.
wave
,
self
.
flux
,
path
,
band
=
'GAIA_rp'
)
def
toMag
(
self
):
wave
=
self
.
wave
self
.
bpmag
=
flux_to_mag
(
wave
,
self
.
flux
,
band
=
'GAIA_bp'
)
self
.
rpmag
=
flux_to_mag
(
wave
,
self
.
flux
,
band
=
'GAIA_rp'
)
self
.
bpmag
=
flux_to_mag
(
wave
,
self
.
flux
,
self
.
path
,
band
=
'GAIA_bp'
)
self
.
rpmag
=
flux_to_mag
(
wave
,
self
.
flux
,
self
.
path
,
band
=
'GAIA_rp'
)
# -------------
# SED Modelling
...
...
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