Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 12, 2024
1 parent 32b5a1d commit 7e28212
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 40 deletions.
3 changes: 1 addition & 2 deletions flint/bandpass.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Procedure to calibrate bandpass observation
"""
"""Procedure to calibrate bandpass observation"""

from argparse import ArgumentParser
from pathlib import Path
Expand Down
5 changes: 2 additions & 3 deletions flint/calibrate/aocalibrate.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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}")
Expand Down
4 changes: 2 additions & 2 deletions flint/coadd/linmos.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions flint/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions flint/convol.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions flint/flagging.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions flint/imager/wsclean.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Simple interface into wsclean
"""
"""Simple interface into wsclean"""

from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions flint/masking.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions flint/ms.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
1 change: 1 addition & 0 deletions flint/naming.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions flint/prefect/common/utils.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions flint/prefect/flows/continuum_mask_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions flint/prefect/flows/continuum_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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),
},
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions flint/sclient.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions flint/source_finding/aegean.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions flint/summary.py
Original file line number Diff line number Diff line change
@@ -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,
)
Expand Down
3 changes: 1 addition & 2 deletions tests/test_aocalibrate.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/test_bandpass_flow.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/test_bptools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Itemss around testing components of bptools
"""
"""Itemss around testing components of bptools"""

import numpy as np
import pytest
Expand Down
4 changes: 2 additions & 2 deletions tests/test_naming.py
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
1 change: 1 addition & 0 deletions tests/test_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
somewhat tracked, especially when using an argparse object
to create it
"""

from pathlib import Path

from flint.options import FieldOptions
Expand Down
3 changes: 1 addition & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Basic tests for utility functions
"""
"""Basic tests for utility functions"""

from pathlib import Path

Expand Down
3 changes: 1 addition & 2 deletions tests/test_validation.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/test_wsclean.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Testing some wsclean functionality.
"""
"""Testing some wsclean functionality."""

from pathlib import Path

import pytest
Expand Down

0 comments on commit 7e28212

Please sign in to comment.