Commit ced55eb3 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add find_plan_level0_basis and find_plan_level1_basis

parent 727f17da
...@@ -196,6 +196,32 @@ class Dispatcher: ...@@ -196,6 +196,32 @@ class Dispatcher:
) )
return data_basis return data_basis
@staticmethod
def find_plan_level0_basis(**kwargs) -> tuple(table.Table):
data_basis = Dispatcher.find_level0_basis(**kwargs)
plan_basis = Dispatcher.find_plan_basis(**kwargs)
u_data_basis = table.unique(data_basis["dataset", "obs_id"])
relevant_plan = table.join(
u_data_basis,
plan_basis,
keys=["dataset", "obs_id"],
join_type=PLAN_JOIN_TYPE,
)
return relevant_plan, data_basis
@staticmethod
def find_plan_level1_basis(**kwargs) -> tuple(table.Table):
data_basis = Dispatcher.find_level1_basis(**kwargs)
plan_basis = Dispatcher.find_plan_basis(**kwargs)
u_data_basis = table.unique(data_basis["dataset", "obs_id"])
relevant_plan = table.join(
u_data_basis,
plan_basis,
keys=["dataset", "obs_id"],
join_type=PLAN_JOIN_TYPE,
)
return relevant_plan, data_basis
@staticmethod @staticmethod
def dispatch_file( def dispatch_file(
plan_basis: table.Table, plan_basis: table.Table,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment