diff --git a/flint/bandpass.py b/flint/bandpass.py index 960b2a90..5d6c9acb 100644 --- a/flint/bandpass.py +++ b/flint/bandpass.py @@ -1,5 +1,4 @@ -"""Procedure to calibrate bandpass observation -""" +"""Procedure to calibrate bandpass observation""" from argparse import ArgumentParser from pathlib import Path diff --git a/flint/calibrate/aocalibrate.py b/flint/calibrate/aocalibrate.py index f7d080ed..3a74def1 100644 --- a/flint/calibrate/aocalibrate.py +++ b/flint/calibrate/aocalibrate.py @@ -1,5 +1,4 @@ -"""Code to use AO calibrate s -""" +"""Code to use AO calibrate s""" from __future__ import annotations # used to keep mypy/pylance happy in AOSolutions @@ -964,7 +963,7 @@ def flag_aosolutions( ) for pol in (0, 3): logger.info(f"Processing {pols[pol]} polarisation") - + for ant in range(solutions.nant): if ant == ref_ant: logger.info(f"Skipping reference antenna = ant{ref_ant:02}") diff --git a/flint/coadd/linmos.py b/flint/coadd/linmos.py index 7465ae9e..2f9b16e2 100644 --- a/flint/coadd/linmos.py +++ b/flint/coadd/linmos.py @@ -1,5 +1,5 @@ -"""This is an interface into the yandasoft linmos task. -""" +"""This is an interface into the yandasoft linmos task.""" + from argparse import ArgumentParser from pathlib import Path from typing import Collection, List, NamedTuple, Optional diff --git a/flint/configuration.py b/flint/configuration.py index a00b24e8..8e56bb56 100644 --- a/flint/configuration.py +++ b/flint/configuration.py @@ -3,6 +3,7 @@ be used to specify the options for imaging and self-calibration throughout the pipeline. """ + from argparse import ArgumentParser from pathlib import Path from typing import Any, Dict, Optional diff --git a/flint/convol.py b/flint/convol.py index 7143d14b..a66d7b59 100644 --- a/flint/convol.py +++ b/flint/convol.py @@ -1,6 +1,7 @@ """Tooling related to the convolution of images. Principally this is mostly to smooth to a common resolution """ + from __future__ import annotations import warnings diff --git a/flint/flagging.py b/flint/flagging.py index 781b87e2..85234d0a 100644 --- a/flint/flagging.py +++ b/flint/flagging.py @@ -1,5 +1,4 @@ -"""Utility functions to carry out flagging against ASKAP measurement sets -""" +"""Utility functions to carry out flagging against ASKAP measurement sets""" from argparse import ArgumentParser from pathlib import Path diff --git a/flint/imager/wsclean.py b/flint/imager/wsclean.py index be1ebb37..f8e4dc91 100644 --- a/flint/imager/wsclean.py +++ b/flint/imager/wsclean.py @@ -1,5 +1,4 @@ -"""Simple interface into wsclean -""" +"""Simple interface into wsclean""" from __future__ import annotations diff --git a/flint/masking.py b/flint/masking.py index 8999f66c..6412ff23 100644 --- a/flint/masking.py +++ b/flint/masking.py @@ -1,6 +1,7 @@ """Utility functions to make image based masks from images, with the initial thought being towards FITS images. """ + from argparse import ArgumentParser from pathlib import Path from typing import Tuple diff --git a/flint/ms.py b/flint/ms.py index d90b9c3e..75453002 100644 --- a/flint/ms.py +++ b/flint/ms.py @@ -1,5 +1,4 @@ -"""Operations related to measurement sets -""" +"""Operations related to measurement sets""" from __future__ import ( # Used for mypy/pylance to like the return type of MS.with_options annotations, diff --git a/flint/naming.py b/flint/naming.py index f704f2a5..80acd6a8 100644 --- a/flint/naming.py +++ b/flint/naming.py @@ -1,6 +1,7 @@ """Attempts to centralise components to do with naming of pipeline files and data products. """ + import re from pathlib import Path from typing import Any, List, NamedTuple, Optional, Union diff --git a/flint/prefect/common/utils.py b/flint/prefect/common/utils.py index cdfa61db..fc2d4b93 100644 --- a/flint/prefect/common/utils.py +++ b/flint/prefect/common/utils.py @@ -1,5 +1,5 @@ -"""Common prefect related utilities that can be used between flows. -""" +"""Common prefect related utilities that can be used between flows.""" + import base64 from pathlib import Path from typing import Any, List, Optional, TypeVar diff --git a/flint/prefect/flows/continuum_mask_pipeline.py b/flint/prefect/flows/continuum_mask_pipeline.py index 2280a432..b3194708 100644 --- a/flint/prefect/flows/continuum_mask_pipeline.py +++ b/flint/prefect/flows/continuum_mask_pipeline.py @@ -12,6 +12,7 @@ that the best way to do this would be to use a header from the preivous imaging round. """ + from argparse import ArgumentParser from pathlib import Path from typing import Any, Union diff --git a/flint/prefect/flows/continuum_pipeline.py b/flint/prefect/flows/continuum_pipeline.py index 825ff9be..651b3267 100644 --- a/flint/prefect/flows/continuum_pipeline.py +++ b/flint/prefect/flows/continuum_pipeline.py @@ -164,7 +164,9 @@ def process_science_fields( wsclean_container=field_options.wsclean_container, update_wsclean_options=unmapped(wsclean_init), ) - beam_summaries = task_create_beam_summary.map(ms=flagged_mss, imageset=wsclean_cmds, wait_for=[field_summary]) + beam_summaries = task_create_beam_summary.map( + ms=flagged_mss, imageset=wsclean_cmds, wait_for=[field_summary] + ) if run_aegean: beam_aegean_outputs = task_run_bane_and_aegean.map( image=wsclean_cmds, @@ -242,7 +244,7 @@ def process_science_fields( "nmiter": 20, "force_mask_rounds": 17, "minuvw_m": 235, - "auto_mask": 8., + "auto_mask": 8.0, "local_rms_window": 55, "multiscale_scales": (0, 15, 30, 40, 50, 60, 70, 120, 240, 480), }, @@ -285,9 +287,8 @@ def process_science_fields( round=round, update_gain_cal_options=unmapped(gain_cal_options), archive_input_ms=field_options.zip_ms, - wait_for=[ - field_summary - ] + beam_summaries, # To make sure field summary is created with unzipped MSs + wait_for=[field_summary] + + beam_summaries, # To make sure field summary is created with unzipped MSs ) wsclean_cmds = task_wsclean_imager.map( in_ms=cal_mss, diff --git a/flint/sclient.py b/flint/sclient.py index 78706a83..c0080fb2 100644 --- a/flint/sclient.py +++ b/flint/sclient.py @@ -1,5 +1,5 @@ -"""Utilities related to running commands in a singularity container -""" +"""Utilities related to running commands in a singularity container""" + from pathlib import Path from socket import gethostname from subprocess import CalledProcessError diff --git a/flint/source_finding/aegean.py b/flint/source_finding/aegean.py index 6e41f296..780b2c10 100644 --- a/flint/source_finding/aegean.py +++ b/flint/source_finding/aegean.py @@ -1,5 +1,5 @@ -"""A basic interface into aegean source finding routines. -""" +"""A basic interface into aegean source finding routines.""" + from argparse import ArgumentParser from pathlib import Path from typing import NamedTuple, Tuple diff --git a/flint/summary.py b/flint/summary.py index c3e77da7..82814d0a 100644 --- a/flint/summary.py +++ b/flint/summary.py @@ -1,5 +1,5 @@ -"""Summary containers intended to hold general information obtained throughout a processing run. -""" +"""Summary containers intended to hold general information obtained throughout a processing run.""" + from __future__ import ( # Used for mypy/pylance to like the return type of MS.with_options annotations, ) diff --git a/tests/test_aocalibrate.py b/tests/test_aocalibrate.py index 21e6f3cd..0d6d48f1 100644 --- a/tests/test_aocalibrate.py +++ b/tests/test_aocalibrate.py @@ -1,5 +1,4 @@ -"""Some tests related to using aoccalibrate related things -""" +"""Some tests related to using aoccalibrate related things""" import shutil from pathlib import Path diff --git a/tests/test_bandpass_flow.py b/tests/test_bandpass_flow.py index ac59f8e2..cfb7e7b3 100644 --- a/tests/test_bandpass_flow.py +++ b/tests/test_bandpass_flow.py @@ -1,5 +1,4 @@ -"""Basic tests for the prefect bandpass flow -""" +"""Basic tests for the prefect bandpass flow""" # this pirate made a promise that if there is a typo and an error # then a test will be made to not let it happen. Penaalty is walking diff --git a/tests/test_bptools.py b/tests/test_bptools.py index c8e774e6..824a487b 100644 --- a/tests/test_bptools.py +++ b/tests/test_bptools.py @@ -1,5 +1,4 @@ -"""Itemss around testing components of bptools -""" +"""Itemss around testing components of bptools""" import numpy as np import pytest diff --git a/tests/test_naming.py b/tests/test_naming.py index 8f6af32a..32a4b48b 100644 --- a/tests/test_naming.py +++ b/tests/test_naming.py @@ -1,5 +1,5 @@ -"""Some tests related to components around measurement sets. -""" +"""Some tests related to components around measurement sets.""" + from pathlib import Path from flint.naming import ( diff --git a/tests/test_options.py b/tests/test_options.py index 03452dd3..04a875ac 100644 --- a/tests/test_options.py +++ b/tests/test_options.py @@ -2,6 +2,7 @@ somewhat tracked, especially when using an argparse object to create it """ + from pathlib import Path from flint.options import FieldOptions diff --git a/tests/test_utils.py b/tests/test_utils.py index da5a28bb..9da0abac 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,5 +1,4 @@ -"""Basic tests for utility functions -""" +"""Basic tests for utility functions""" from pathlib import Path diff --git a/tests/test_validation.py b/tests/test_validation.py index da3447f2..754d9635 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -1,5 +1,4 @@ -"""Items related to test functions in the validation stage of flint -""" +"""Items related to test functions in the validation stage of flint""" from pathlib import Path from typing import NamedTuple diff --git a/tests/test_wsclean.py b/tests/test_wsclean.py index 8234bc77..c166b02f 100644 --- a/tests/test_wsclean.py +++ b/tests/test_wsclean.py @@ -1,5 +1,5 @@ -"""Testing some wsclean functionality. -""" +"""Testing some wsclean functionality.""" + from pathlib import Path import pytest