Skip to content

Commit

Permalink
Add imager options
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecThomson committed Apr 2, 2024
1 parent 97d547b commit 9da0cc6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
13 changes: 13 additions & 0 deletions arrakis/imager.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def image_beam(
local_rms_window: Optional[float] = None,
multiscale: bool = False,
multiscale_scale_bias: Optional[float] = None,
multiscale_scales: Optional[str] = "0,2,4,8,16,32,64,128",
data_column: str = "CORRECTED_DATA",
no_mf_weighting: bool = False,
no_update_model_required: bool = True,
Expand Down Expand Up @@ -212,6 +213,7 @@ def image_beam(
local_rms_window=local_rms_window,
multiscale_scale_bias=multiscale_scale_bias,
multiscale=multiscale,
multiscale_scales=multiscale_scales,
data_column=data_column,
no_mf_weighting=no_mf_weighting,
no_update_model_required=no_update_model_required,
Expand Down Expand Up @@ -267,6 +269,7 @@ def image_beam(
local_rms_window=local_rms_window,
multiscale=multiscale if not squared_channel_joining else False,
multiscale_scale_bias=multiscale_scale_bias,
multiscale_scales=multiscale_scales,
data_column=data_column,
no_mf_weighting=no_mf_weighting,
no_update_model_required=no_update_model_required,
Expand Down Expand Up @@ -626,6 +629,7 @@ def main(
wsclean_path: Union[Path, str] = "docker://alecthomson/wsclean:latest",
multiscale: Optional[bool] = None,
multiscale_scale_bias: Optional[float] = None,
multiscale_scales: Optional[str] = "0,2,4,8,16,32,64,128",
absmem: Optional[float] = None,
make_residual_cubes: Optional[bool] = False,
ms_glob_pattern: str = "scienceData*_averaged_cal.leakage.ms",
Expand Down Expand Up @@ -697,6 +701,7 @@ def main(
local_rms_window=local_rms_window,
multiscale=multiscale,
multiscale_scale_bias=multiscale_scale_bias,
multiscale_scales=multiscale_scales,
absmem=absmem,
data_column=data_column,
no_mf_weighting=no_mf_weighting,
Expand Down Expand Up @@ -911,6 +916,12 @@ def imager_parser(parent_parser: bool = False) -> argparse.ArgumentParser:
default=None,
help="The multiscale scale bias term provided to wsclean. ",
)
parser.add_argument(
"--multiscale_scales",
type=str,
default="0,2,4,8,16,32,64,128",
help="The scales used in the multiscale clean. ",
)
parser.add_argument(
"--absmem",
type=float,
Expand Down Expand Up @@ -991,6 +1002,8 @@ def cli():
Path(args.local_wsclean) if args.local_wsclean else args.hosted_wsclean
),
multiscale=args.multiscale,
multiscale_scale_bias=args.multiscale_scale_bias,
multiscale_scales=args.multiscale_scales,
ms_glob_pattern=args.ms_glob_pattern,
data_column=args.data_column,
skip_fix_ms=args.skip_fix_ms,
Expand Down
13 changes: 7 additions & 6 deletions arrakis/process_spice.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,13 @@ def main(args: configargparse.Namespace) -> None:
output_args_path = save_args(args)
logger.info(f"Saved arguments to {output_args_path}.")

# Test the mongoDB
test_db(
host=host,
username=args.username,
password=args.password,
)
if not args.imager_only:
# Test the mongoDB
test_db(
host=host,
username=args.username,
password=args.password,
)

if not args.skip_imager:
# This is the client for the imager component of the arrakis
Expand Down

0 comments on commit 9da0cc6

Please sign in to comment.