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
5a850797
Commit
5a850797
authored
May 19, 2022
by
Fang Yuedong
Browse files
mag cut bug fix
parent
08fbbc91
Changes
1
Show whitespace changes
Inline
Side-by-side
ObservationSim/ObservationSim.py
View file @
5a850797
...
@@ -162,6 +162,15 @@ class Observation(object):
...
@@ -162,6 +162,15 @@ class Observation(object):
chip_output
.
create_output_file
()
chip_output
.
create_output_file
()
self
.
nobj
=
len
(
self
.
cat
.
objs
)
self
.
nobj
=
len
(
self
.
cat
.
objs
)
for
ifilt
in
range
(
len
(
self
.
all_filter
)):
temp_filter
=
self
.
all_filter
[
ifilt
]
# Update the limiting magnitude using exposure time in pointing
temp_filter
.
update_limit_saturation_mags
(
exptime
=
pointing
.
exp_time
,
chip
=
chip
)
# Select cutting band filter for saturation/limiting magnitude
if
temp_filter
.
filter_type
.
lower
()
==
self
.
config
[
"obs_setting"
][
"cut_in_band"
].
lower
():
cut_filter
=
temp_filter
# Loop over objects
# Loop over objects
missed_obj
=
0
missed_obj
=
0
bright_obj
=
0
bright_obj
=
0
...
@@ -190,20 +199,12 @@ class Observation(object):
...
@@ -190,20 +199,12 @@ class Observation(object):
target_filt
=
filt
,
target_filt
=
filt
,
norm_filt
=
norm_filt
,
norm_filt
=
norm_filt
,
)
)
for
ifilt
in
range
(
len
(
self
.
all_filter
)):
_
,
obj
.
param
[
"mag_%s"
%
cut_filter
.
filter_type
]
=
self
.
cat
.
convert_sed
(
temp_filter
=
self
.
all_filter
[
ifilt
]
_
,
obj
.
param
[
"mag_%s"
%
temp_filter
.
filter_type
]
=
self
.
cat
.
convert_sed
(
mag
=
obj
.
param
[
"mag_use_normal"
],
mag
=
obj
.
param
[
"mag_use_normal"
],
sed
=
sed_data
,
sed
=
sed_data
,
target_filt
=
temp
_filter
,
target_filt
=
cut
_filter
,
norm_filt
=
norm_filt
,
norm_filt
=
norm_filt
,
)
)
# Update the limiting magnitude using exposure time in pointing
temp_filter
.
update_limit_saturation_mags
(
exptime
=
pointing
.
exp_time
,
chip
=
chip
)
# Select cutting band filter for saturation/limiting magnitude
if
temp_filter
.
filter_type
.
lower
()
==
self
.
config
[
"obs_setting"
][
"cut_in_band"
].
lower
():
cut_filter
=
temp_filter
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
)
print
(
e
)
...
...
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