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
Liu Dezi
csst_msc_sim
Commits
0d59783b
Commit
0d59783b
authored
Jun 08, 2021
by
Zhang Xin
Browse files
fix spec sim bug
parent
d5059d30
Changes
2
Hide whitespace changes
Inline
Side-by-side
ObservationSim/Instrument/Chip/Chip.py
View file @
0d59783b
...
...
@@ -312,7 +312,7 @@ class Chip(FocalPlane):
BoolDeadPix
=
False
# Add sky background
if
sky_map
==
None
:
if
sky_map
is
None
:
sky_map
=
filt
.
getSkyNoise
(
exptime
=
self
.
exptime
)
elif
img
.
array
.
shape
!=
sky_map
.
shape
:
raise
ValueError
(
"The shape img and sky_map must be equal."
)
...
...
@@ -738,4 +738,4 @@ class Chip(FocalPlane):
# img_name_root = chip_output.img_name.split(".")[0]
# sub_img.write("%s/%s_%s.fits" % (chip_output.subdir, img_name_root, rowcoltag))
# del sub_img
return
img
\ No newline at end of file
return
img
ObservationSim/ObservationSim.py
View file @
0d59783b
...
...
@@ -218,7 +218,7 @@ class Observation(object):
pointing_ID
=
pointing_ID
,
timestamp_obs
=
timestamp_obs
,
pointing_type
=
pointing_type
,
sky_map
=
sky_map
)
sky_map
=
sky_map
,
tel
=
self
.
tel
)
if
pointing_type
==
'MS'
:
datetime_obs
=
datetime
.
fromtimestamp
(
timestamp_obs
)
...
...
@@ -373,4 +373,4 @@ class Observation(object):
pointing_type
=
pointing_type
[
ipoint
],
cat_dir
=
self
.
path_dict
[
"cat_dir"
],
sed_dir
=
self
.
path_dict
[
"SED_dir"
])
print
(
"finished running chip#%d..."
%
(
chip
.
chipID
),
flush
=
True
)
\ No newline at end of file
print
(
"finished running chip#%d..."
%
(
chip
.
chipID
),
flush
=
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