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-cicd
csst-dag
Commits
4ac339a1
Commit
4ac339a1
authored
Jul 23, 2025
by
BO ZHANG
🏀
Browse files
fixed n_file_expected bug for obs_group-detector dispatcher
parent
a9114d21
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dag/dag/_dispatcher.py
View file @
4ac339a1
...
@@ -543,7 +543,7 @@ class Dispatcher:
...
@@ -543,7 +543,7 @@ class Dispatcher:
return
[]
return
[]
# unique obsgroup basis (using group_by)
# unique obsgroup basis (using group_by)
obsgroup_basis
=
plan_basis
.
group_by
(
obsgroup_
plan_
basis
=
plan_basis
.
group_by
(
keys
=
[
keys
=
[
"dataset"
,
"dataset"
,
"instrument"
,
"instrument"
,
...
@@ -556,29 +556,29 @@ class Dispatcher:
...
@@ -556,29 +556,29 @@ class Dispatcher:
task_list
=
[]
task_list
=
[]
# loop over obsgroup
# loop over obsgroup
for
i_obsgroup
in
trange
(
len
(
obsgroup_basis
.
groups
),
**
TQDM_KWARGS
):
for
i_obsgroup
_plan
in
trange
(
len
(
obsgroup_
plan_
basis
.
groups
),
**
TQDM_KWARGS
):
this_obsgroup_basis
=
obsgroup_basis
.
groups
[
i_obsgroup
]
this_obsgroup_
plan_
basis
=
obsgroup_
plan_
basis
.
groups
[
i_obsgroup
_plan
]
this_obsgroup_obsid
=
this_obsgroup_basis
[
"obs_id"
].
data
this_obsgroup_obsid
=
this_obsgroup_
plan_
basis
[
"obs_id"
].
data
n_file_expected
=
this_obsgroup_
basis
[
"n_file"
].
sum
(
)
n_file_expected
=
len
(
this_obsgroup_
obsid
)
this_instrument
=
this_obsgroup_basis
[
"instrument"
][
0
]
this_instrument
=
this_obsgroup_
plan_
basis
[
"instrument"
][
0
]
effective_detector_names
=
csst
[
this_instrument
].
effective_detector_names
effective_detector_names
=
csst
[
this_instrument
].
effective_detector_names
for
this_effective_detector_name
in
effective_detector_names
:
for
this_effective_detector_name
in
effective_detector_names
:
this_task
=
dict
(
this_task
=
dict
(
dataset
=
this_obsgroup_basis
[
"dataset"
][
0
],
dataset
=
this_obsgroup_
plan_
basis
[
"dataset"
][
0
],
instrument
=
this_obsgroup_basis
[
"instrument"
][
0
],
instrument
=
this_obsgroup_
plan_
basis
[
"instrument"
][
0
],
obs_type
=
this_obsgroup_basis
[
"obs_type"
][
0
],
obs_type
=
this_obsgroup_
plan_
basis
[
"obs_type"
][
0
],
obs_group
=
this_obsgroup_basis
[
"obs_group"
][
0
],
obs_group
=
this_obsgroup_
plan_
basis
[
"obs_group"
][
0
],
detector
=
this_effective_detector_name
,
detector
=
this_effective_detector_name
,
)
)
this_obsgroup_detector_expected
=
table
.
Table
(
this_obsgroup_detector_expected
=
table
.
Table
(
[
[
dict
(
dict
(
dataset
=
this_obsgroup_basis
[
"dataset"
][
0
],
dataset
=
this_obsgroup_
plan_
basis
[
"dataset"
][
0
],
instrument
=
this_obsgroup_basis
[
"instrument"
][
0
],
instrument
=
this_obsgroup_
plan_
basis
[
"instrument"
][
0
],
obs_type
=
this_obsgroup_basis
[
"obs_type"
][
0
],
obs_type
=
this_obsgroup_
plan_
basis
[
"obs_type"
][
0
],
obs_group
=
this_obsgroup_basis
[
"obs_group"
][
0
],
obs_group
=
this_obsgroup_
plan_
basis
[
"obs_group"
][
0
],
obs_id
=
this_obsid
,
obs_id
=
this_obsid
,
detector
=
this_effective_detector_name
,
detector
=
this_effective_detector_name
,
)
)
...
@@ -610,9 +610,9 @@ class Dispatcher:
...
@@ -610,9 +610,9 @@ class Dispatcher:
dict
(
dict
(
task
=
this_task
,
task
=
this_task
,
success
=
this_success
,
success
=
this_success
,
relevant_plan
=
this_obsgroup_basis
,
relevant_plan
=
this_obsgroup_
plan_
basis
,
relevant_data
=
this_obsgroup_detector_found
,
relevant_data
=
this_obsgroup_detector_found
,
n_relevant_plan
=
len
(
this_obsgroup_basis
),
n_relevant_plan
=
len
(
this_obsgroup_
plan_
basis
),
n_relevant_data
=
len
(
this_obsgroup_detector_found
),
n_relevant_data
=
len
(
this_obsgroup_detector_found
),
relevant_data_id_list
=
(
relevant_data_id_list
=
(
list
(
this_obsgroup_detector_found
[
"_id"
])
list
(
this_obsgroup_detector_found
[
"_id"
])
...
...
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