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_msc_sim
Commits
4168b748
Commit
4168b748
authored
May 21, 2025
by
Zhang Xin
Browse files
update header; fix sls bug: psf A and B error, modify the band bounders of sls
parent
877d689f
Pipeline
#8340
failed with stage
in 0 seconds
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
observation_sim/config/header/ImageHeader.py
View file @
4168b748
...
...
@@ -533,8 +533,8 @@ def generateExtensionHeader(chip, xlen=9216, ylen=9232, ra=60, dec=-40, pa=-23.4
# h_ext['CCDCHIP'] = CCDID[k - 1].rjust(2, '0')
# h_ext['CCDLABEL'] = filters[k-1] + '-' + filterID[k-1]
# h_ext['FILTER'] = filters[k-1]
h_ext
[
'
CHIPID
'
]
=
str
(
chip
.
chipID
).
rjust
(
2
,
'0'
)
h_ext
[
'
CHIP
LABL'
]
=
chip
.
chip_name
h_ext
[
'
DETECTOR
'
]
=
str
(
chip
.
chipID
).
rjust
(
2
,
'0'
)
h_ext
[
'
DET
LAB
E
L'
]
=
chip
.
chip_name
h_ext
[
'FILTER'
]
=
chip
.
filter_type
h_ext
[
'NAXIS1'
]
=
xlen
h_ext
[
'NAXIS2'
]
=
ylen
...
...
observation_sim/config/header/csst_msc_l0_ms.fits
View file @
4168b748
This diff is collapsed.
Click to expand it.
observation_sim/instruments/FilterParam.py
View file @
4168b748
...
...
@@ -37,9 +37,9 @@ class FilterParam(object):
# [TODO]
"FGS"
:
[
5000.0
,
8000.0
,
3000.0
,
11000.0
,
0.6500
,
0.164
,
0.
,
30.
],
"GU"
:
[
0.0
,
0.0
,
2550.0
,
42
00.0
,
1.0
,
0.037
,
14.0
,
26.0
],
"GV"
:
[
0.0
,
0.0
,
40
00.0
,
6500.0
,
1.0
,
0.037
,
14.0
,
26.0
],
"GI"
:
[
0.0
,
0.0
,
62
00.0
,
10000.0
,
1.0
,
0.037
,
14.0
,
26.0
],
"GU"
:
[
0.0
,
0.0
,
2550.0
,
100
00.0
,
1.0
,
0.037
,
14.0
,
26.0
],
"GV"
:
[
0.0
,
0.0
,
35
00.0
,
6500.0
,
1.0
,
0.037
,
14.0
,
26.0
],
"GI"
:
[
0.0
,
0.0
,
50
00.0
,
10000.0
,
1.0
,
0.037
,
14.0
,
26.0
],
}
else
:
filtP
=
filter_param
...
...
observation_sim/mock_objects/Galaxy.py
View file @
4168b748
...
...
@@ -285,7 +285,7 @@ class Galaxy(MockObject):
for
i
in
range
(
len
(
bandpass_list
)):
branges
[
i
,
0
]
=
bandpass_list
[
i
].
blue_limit
*
10
branges
[
i
,
1
]
=
bandpass_list
[
i
].
red_limit
*
10
for
i
in
range
(
len
(
bandpass_list
)):
# bandpass = bandpass_list[i]
brange
=
branges
[
i
]
...
...
@@ -335,7 +335,7 @@ class Galaxy(MockObject):
pos_img_local
[
1
]
=
pos_img
.
y
-
y_start
nnx
=
0
nny
=
0
for
order
in
[
"
B
"
,
"
A
"
]:
for
order
in
[
"
A
"
,
"
B
"
]:
EXTRA
=
False
if
self
.
getMagFilter
(
filt
)
<=
filt
.
mag_saturation
-
2.
:
EXTRA
=
True
...
...
@@ -362,16 +362,18 @@ class Galaxy(MockObject):
for
order
in
[
"C"
,
"D"
,
"E"
]:
galImg_List
.
append
(
galImg
)
except
:
psf
,
pos_shear
=
psf_model
.
get_PSF
(
chip
=
chip
,
pos_img
=
pos_img
)
star_p
=
galsim
.
Convolve
(
psf
,
gal
)
galImg
=
star_p
.
drawImage
(
wcs
=
chip_wcs_local
,
offset
=
offset
)
galImg
.
setOrigin
(
0
,
0
)
if
np
.
sum
(
np
.
isnan
(
galImg
.
array
))
>
0
:
# ERROR happens
return
2
,
pos_shear
for
order
in
[
"A"
,
"B"
,
"C"
,
"D"
,
"E"
]:
galImg_List
.
append
(
galImg
)
try
:
psf
,
pos_shear
=
psf_model
.
get_PSF
(
chip
=
chip
,
pos_img
=
pos_img
)
star_p
=
galsim
.
Convolve
(
psf
,
gal
)
galImg
=
star_p
.
drawImage
(
wcs
=
chip_wcs_local
,
offset
=
offset
)
galImg
.
setOrigin
(
0
,
0
)
if
np
.
sum
(
np
.
isnan
(
galImg
.
array
))
>
0
:
# ERROR happens
return
2
,
pos_shear
for
order
in
[
"A"
,
"B"
,
"C"
,
"D"
,
"E"
]:
galImg_List
.
append
(
galImg
)
except
Exception
as
e
:
continue
# starImg = gal.drawImage(
# wcs=chip_wcs_local, offset=offset, method='real_space')
...
...
observation_sim/mock_objects/MockObject.py
View file @
4168b748
...
...
@@ -445,7 +445,7 @@ class MockObject(object):
pos_img_local
[
1
]
=
pos_img
.
y
-
y_start
nnx
=
0
nny
=
0
for
order
in
[
"
B
"
,
"
A
"
]:
for
order
in
[
"
A
"
,
"
B
"
]:
EXTRA
=
False
if
self
.
getMagFilter
(
filt
)
<=
filt
.
mag_saturation
-
2.
:
EXTRA
=
True
...
...
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