Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 9, 2024
1 parent 894720f commit 194b38f
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions fixms/fix_ms_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,10 @@ def restore_ms_dir(ms):

if tableexists("%s/FIELD_OLD" % (ms)):
logger.info("Restoring FIELD directions in %s" % (ms), ms=ms)
with table("%s/FIELD" % (ms), readonly=False, ack=False) as tp, table(
"%s/FIELD_OLD" % (ms), readonly=True, ack=False
) as fp:
with (

Check warning on line 237 in fixms/fix_ms_dir.py

View check run for this annotation

Codecov / codecov/patch

fixms/fix_ms_dir.py#L237

Added line #L237 was not covered by tests
table("%s/FIELD" % (ms), readonly=False, ack=False) as tp,
table("%s/FIELD_OLD" % (ms), readonly=True, ack=False) as fp,
):
field_dir = fp.getcol("PHASE_DIR")
tp.putcol("PHASE_DIR", field_dir)
tp.putcol("DELAY_DIR", field_dir)
Expand All @@ -251,9 +252,10 @@ def restore_ms_dir(ms):

if tableexists("%s/FEED_OLD" % (ms)):
logger.info("Restoring BEAM_OFFSET in %s" % (ms), ms=ms)
with table("%s/FEED" % (ms), readonly=False, ack=False) as tp, table(
"%s/FEED_OLD" % (ms), readonly=True, ack=False
) as fp:
with (

Check warning on line 255 in fixms/fix_ms_dir.py

View check run for this annotation

Codecov / codecov/patch

fixms/fix_ms_dir.py#L255

Added line #L255 was not covered by tests
table("%s/FEED" % (ms), readonly=False, ack=False) as tp,
table("%s/FEED_OLD" % (ms), readonly=True, ack=False) as fp,
):
offset = fp.getcol("BEAM_OFFSET")
tp.putcol("BEAM_OFFSET", offset)

Expand Down Expand Up @@ -304,9 +306,10 @@ def fix_ms_dir(ms):

# Open up the MS FIELD table so it can be updated.
# Open up the MS FEED table so we can work out what the offset is for the beam.
with table("%s/FIELD" % (ms), readonly=False, ack=False) as tp, table(
"%s/FEED_OLD" % (ms), readonly=True, ack=False
) as tf:
with (

Check warning on line 309 in fixms/fix_ms_dir.py

View check run for this annotation

Codecov / codecov/patch

fixms/fix_ms_dir.py#L309

Added line #L309 was not covered by tests
table("%s/FIELD" % (ms), readonly=False, ack=False) as tp,
table("%s/FEED_OLD" % (ms), readonly=True, ack=False) as tf,
):
# The offsets are assumed to be the same for all antennas so get a list of all
# the offsets for one antenna and for the current beam. This should return offsets
# required for each field.
Expand Down

0 comments on commit 194b38f

Please sign in to comment.