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
019bd00d
Commit
019bd00d
authored
Jul 03, 2025
by
BO ZHANG
🏀
Browse files
fix indent for if-else use_detector
parent
b2450a56
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dag/dag/dags.py
View file @
019bd00d
...
...
@@ -116,29 +116,27 @@ class GeneralDAGViaObsid(BaseDAG):
)
assert
this_update
.
success
,
this_update
.
message
# generate DAG messages via obs_id
else
:
u_obsid
,
c_obsid
=
np
.
unique
(
[
this_rec
[
"obs_id"
]
for
this_rec
in
recs
.
data
],
return_counts
=
True
,
# generate DAG messages via obs_id
else
:
u_obsid
,
c_obsid
=
np
.
unique
(
[
this_rec
[
"obs_id"
]
for
this_rec
in
recs
.
data
],
return_counts
=
True
,
)
# select those obs_ids with `counts == effective detector number`
u_obsid_selected
=
u_obsid
[
c_obsid
==
len
(
self
.
effective_detector_names
)]
for
this_obsid
in
u_obsid
[
u_obsid_selected
]:
# generate a DAG message if is_selected
this_dag_run
=
self
.
gen_dag_run
(
dag_group_run
=
dag_group_run
,
dag_run
=
self
.
generate_sha1
(),
batch_id
=
batch_id
,
pmapname
=
pmapname
,
dataset
=
dataset
,
obs_type
=
obs_type
,
obs_group
=
obs_group
,
obs_id
=
this_obsid
,
)
# select those obs_ids with `counts == effective detector number`
u_obsid_selected
=
u_obsid
[
c_obsid
==
len
(
self
.
effective_detector_names
)
]
for
this_obsid
in
u_obsid
[
u_obsid_selected
]:
# generate a DAG message if is_selected
this_dag_run
=
self
.
gen_dag_run
(
dag_group_run
=
dag_group_run
,
dag_run
=
self
.
generate_sha1
(),
batch_id
=
batch_id
,
pmapname
=
pmapname
,
dataset
=
dataset
,
obs_type
=
obs_type
,
obs_group
=
obs_group
,
obs_id
=
this_obsid
,
)
dag_run_list
.
append
(
this_dag_run
)
dag_run_list
.
append
(
this_dag_run
)
if
not
demo
:
# push and update
...
...
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