Skip to content
Snippets Groups Projects

Got EVLA CMS restores working via casa_envoy, using casa_restorepipescript.py when it exists

Merged Sam Kagan requested to merge use-casa-version-pipescript-in-casa-envoy into 2.8.4-DEVELOPMENT
1 unresolved thread
2 files
+ 26
13
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -56,7 +56,8 @@ def _get_settings(cwd: pathlib.Path, args: list) -> dict:
processing_dir = str(cwd.name)
metadata = args[0]
ppr = args[1]
# Restores don't always come with a PPR from the arguments, sometimes they want to use the PPR in the cal.
ppr = args[1] if len(args) > 1 else None
return {
"useCasa": use_casa,
@@ -78,25 +79,38 @@ def _setup_launcher(path: pathlib.Path, args: argparse.Namespace) -> LauncherIF:
:param args: arguments specifying type of processing requested
:return: Launcher
"""
if not (
(args.standard_cal is not None)
^ (args.vlass_cal is not None)
^ (args.standard_img is not None)
^ (args.vlass_img is not None)
^ (args.restore is not None)
^ (args.split is not None)
):
raise ValueError(
"Expected exactly one of standard_cal, vlass_cal, standard_img, vlass_img, or restore arguments to be provided, found none or multiple"
)
parameters = {}
if args.parallel is not None:
parameters["requested_parallel"] = args.parallel
if args.standard_cal is not None or args.vlass_cal is not None:
if args.standard_cal is not None or args.vlass_cal is not None or args.restore is not None:
if args.standard_cal:
parameters = {**parameters, **_get_settings(path, args.standard_cal)}
if args.restore:
parameters["product_type"] = ProductType.RESTORE.value
else:
parameters["product_type"] = ProductType.STD_CAL.value
if args.vlass_cal:
parameters["product_type"] = ProductType.STD_CAL.value
elif args.vlass_cal:
parameters = {
**parameters,
**_get_settings(path, args.vlass_cal),
"product_type": ProductType.VLASS_CAL.value,
}
elif args.restore:
parameters = {
**parameters,
**_get_settings(path, args.restore),
"product_type": ProductType.RESTORE.value,
}
return CalibrationLauncher(parameters)
elif args.standard_img is not None or args.vlass_img is not None:
@@ -175,9 +189,10 @@ def arg_parser() -> argparse.ArgumentParser:
)
parser.add_argument(
"--restore",
nargs="+",
required=False,
action="store_true",
help="run the restore measurement set CASA pipeline, use in conjunction with '-c'",
action="store",
help="run the restore measurement set CASA pipeline",
)
parser.add_argument(
"--integrated",
Loading