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
c7d8f8d5
Commit
c7d8f8d5
authored
Jul 08, 2025
by
BO ZHANG
🏀
Browse files
add references for join_types
parent
efd06df4
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dag/dag/dispatcher.py
View file @
c7d8f8d5
...
...
@@ -8,7 +8,6 @@ from .._csst import csst
# from csst_dag._csst import csst
# THESE ARE GENERAL PARAMETERS!
PLAN_PARAMS
=
{
"dataset"
:
None
,
...
...
@@ -50,6 +49,44 @@ PROC_PARAMS = {
# should be capable to extend
}
# plan basis keys
PLAN_BASIS_KEYS
=
(
"dataset"
,
"instrument"
,
"obs_type"
,
"obs_group"
,
"obs_id"
,
"n_frame"
,
"_id"
,
)
# data basis keys
DATA_BASIS_KEYS
=
(
"dataset"
,
"instrument"
,
"obs_type"
,
"obs_group"
,
"obs_id"
,
"detector"
,
"file_name"
,
"_id"
,
)
# join_type for data x plan
PLAN_JOIN_TYPE
=
"inner"
"""
References:
- https://docs.astropy.org/en/stable/api/astropy.table.join.html
- https://docs.astropy.org/en/stable/table/operations.html#join
Typical types:
- inner join: Only matching rows from both tables
- left join: All rows from left table, matching rows from right table
- right join: All rows from right table, matching rows from left table
- outer join: All rows from both tables
- cartesian join: Every combination of rows from both tables
"""
def
override_common_keys
(
d1
:
dict
,
d2
:
dict
)
->
dict
:
"""
...
...
@@ -105,33 +142,6 @@ def split_data_basis(data_basis: table.Table, n_split: int = 1) -> list[table.Ta
return
chunks
# plan basis keys
PLAN_BASIS_KEYS
=
(
"dataset"
,
"instrument"
,
"obs_type"
,
"obs_group"
,
"obs_id"
,
"n_frame"
,
"_id"
,
)
# data basis keys
DATA_BASIS_KEYS
=
(
"dataset"
,
"instrument"
,
"obs_type"
,
"obs_group"
,
"obs_id"
,
"detector"
,
"file_name"
,
"_id"
,
)
# join_type for data x plan
PLAN_JOIN_TYPE
=
"inner"
class
Dispatcher
:
"""
A class to dispatch tasks based on the observation type.
...
...
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