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
Zhang Xin
produceSED
Commits
b19bc697
Commit
b19bc697
authored
Dec 24, 2023
by
Zhang Xin
Browse files
band range bug
parent
56e72468
Changes
1
Hide whitespace changes
Inline
Side-by-side
produceSED_1.py
View file @
b19bc697
...
...
@@ -494,9 +494,8 @@ def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm
redden
=
0.0
)
wave
,
flux
=
sed_data
[
0
],
sed_data
[
1
]
speci
=
interpolate
.
interp1d
(
wave
,
flux
)
lamb
=
np
.
arange
(
2000
,
1
8
001
+
0.5
,
0.5
)
lamb
=
np
.
arange
(
2000
,
1
1
001
+
0.5
,
0.5
)
y
=
speci
(
lamb
)
# erg/s/cm2/A --> photo/s/m2/A
all_sed
=
y
*
lamb
/
(
cons
.
h
.
value
*
cons
.
c
.
value
)
*
1e-13
...
...
@@ -509,7 +508,7 @@ def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm
norm_thr
=
normThr
,
sWave
=
np
.
floor
(
normThr
[
norm_thr_rang_ids
][
0
][
0
]),
eWave
=
np
.
ceil
(
normThr
[
norm_thr_rang_ids
][
-
1
][
0
]))
sedNormFactor
=
1.0
norm_spec
=
Table
(
Table
(
np
.
array
([
wave
,
flux
*
sedNormFactor
]).
T
,
names
=
([
'WAVELENGTH'
,
'FLUX'
])))
norm_spec_phot
=
Table
(
Table
(
np
.
array
([
lamb
,
all_sed
*
sedNormFactor
]).
T
,
names
=
([
'WAVELENGTH'
,
'FLUX'
])))
...
...
@@ -539,7 +538,7 @@ sedlib_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/sedlibs/"
# gal_norm_fn = '/Users/zhangxin/Work/SlitlessSim/sed/produceSED_bycatfile/data/throughputs/LSST/lsst_throuput_g.fits'
gal_norm_fn
=
os
.
path
.
join
(
fileDir
,
"data/throughputs/LSST/lsst_throuput_g.fits"
)
gal_spec
,
gal_spec_photo
=
produceGalSED_C6
(
gal_id_s
=
'03
5931
00052300
144566
'
,
gal_z
=
1.6927
,
mag_norm
=
24.0
,
norm_filter_thr_fn
=
gal_norm_fn
)
gal_spec
,
gal_spec_photo
=
produceGalSED_C6
(
gal_id_s
=
'03
4908
00052300
010462
'
,
gal_z
=
0.3764
,
mag_norm
=
24.0
,
norm_filter_thr_fn
=
gal_norm_fn
)
#根据上面计算的光谱计算csst星等,噪声不需要就不用管了,t, frame, noisepix_num, flux_ratio,都是为了估计噪声
...
...
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