Commit 4c92ef65 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add qc_status filter

parent 7a94dc9f
......@@ -5,9 +5,9 @@ Process an MSC dataset, given a set of parameters.
Example
-------
python -m csst_dag.cli.csst_msc_l1 -h
python -m csst_dag.cli.run -h
python -m csst_dag.cli.csst_msc_l1 \
python -m csst_dag.cli.run \
--dataset=csst-msc-c9-25sqdeg-v3 \
--instrument=MSC \
--obs-type=WIDE \
......@@ -56,6 +56,9 @@ parser.add_argument("--detector", type=str, help="Detector name", default=None)
parser.add_argument(
"--prc-status", type=int, help="Initial processing status", default=None
)
parser.add_argument(
"--qc-status", type=int, help="Initial QC status", default=None
)
# task parameters
parser.add_argument("--batch-id", type=str, help="Batch ID", default="test-batch")
parser.add_argument("--priority", type=str, help="Task priority", default="1")
......@@ -111,6 +114,7 @@ plan_basis, data_basis = Dispatcher.find_plan_level0_basis(
obs_id=args.obs_id,
detector=args.detector,
prc_status=args.prc_status,
qc_status=args.qc_status,
)
print(f"{len(plan_basis)} plan basis, {len(data_basis)} data basis found")
......
......@@ -28,6 +28,7 @@ LEVEL0_PARAMS = {
"obs_id": None,
"detector": None,
"prc_status": -1024,
"qc_status": -1024,
}
LEVEL1_PARAMS = {
......@@ -38,6 +39,7 @@ LEVEL1_PARAMS = {
"obs_id": None,
"detector": None,
"prc_status": -1024,
"qc_status": -1024,
# special keys for data products
"data_model": None,
"batch_id": "default_batch",
......@@ -164,9 +166,9 @@ class Dispatcher:
for _ in qr.data:
if _["instrument"] == "HSTDM":
if _["params"]["detector"] == "SIS12":
this_n_file = _["params"]["num_epec_frame"] * 2
this_n_file = len(_["params"]["exposure_start"]) * 2
else:
this_n_file = _["params"]["num_epec_frame"]
this_n_file = len(_["params"]["exposure_start"])
else:
this_n_file = 1
_["n_file"] = this_n_file
......
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