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
9e339148
Commit
9e339148
authored
Jul 11, 2025
by
Wei Chengliang
Browse files
reset drawImage method to default
parent
0b6e5b12
Pipeline
#9226
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
observation_sim/mock_objects/MockObject.py
View file @
9e339148
...
@@ -172,7 +172,10 @@ class MockObject(object):
...
@@ -172,7 +172,10 @@ class MockObject(object):
# star = galsim.Convolve(psf, star)
# star = galsim.Convolve(psf, star)
star
=
psf
.
withFlux
(
nphotons
)
star
=
psf
.
withFlux
(
nphotons
)
stamp
=
star
.
drawImage
(
method
=
'no_pixel'
,
wcs
=
chip_wcs_local
,
offset
=
offset
)
if
EXTRA
==
True
:
stamp
=
star
.
drawImage
(
method
=
'no_pixel'
,
wcs
=
chip_wcs_local
,
offset
=
offset
)
else
:
stamp
=
star
.
drawImage
(
wcs
=
chip_wcs_local
,
offset
=
offset
)
if
np
.
sum
(
np
.
isnan
(
stamp
.
array
))
>
0
:
if
np
.
sum
(
np
.
isnan
(
stamp
.
array
))
>
0
:
continue
continue
stamp
.
setCenter
(
x_nominal
,
y_nominal
)
stamp
.
setCenter
(
x_nominal
,
y_nominal
)
...
...
observation_sim/mock_objects/Stamp.py
View file @
9e339148
...
@@ -92,7 +92,7 @@ class Stamp(MockObject):
...
@@ -92,7 +92,7 @@ class Stamp(MockObject):
else
:
else
:
gal
=
gal
+
gal_temp
gal
=
gal
+
gal_temp
stamp
=
gal
.
drawImage
(
method
=
'no_pixel'
,
wcs
=
chip_wcs_local
,
offset
=
offset
)
stamp
=
gal
.
drawImage
(
wcs
=
chip_wcs_local
,
offset
=
offset
)
if
np
.
sum
(
np
.
isnan
(
stamp
.
array
))
>
0
:
if
np
.
sum
(
np
.
isnan
(
stamp
.
array
))
>
0
:
# ERROR happens
# ERROR happens
return
2
,
pos_shear
return
2
,
pos_shear
...
...
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