Skip to content

Commit

Permalink
Merge pull request #21 from AlecThomson/oldcol
Browse files Browse the repository at this point in the history
Add backup
  • Loading branch information
AlecThomson authored May 1, 2024
2 parents 5b242c4 + 0c095c7 commit eb238be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fixms/fix_ms_corrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ def set_pol_axis(ms: Path, pol_ang: u.Quantity, feed_idx: Optional[int] = None)
# 45 - feed_angle = pol_angle
pol_axes = -(ms_feed - 45.0 * u.deg)

# Backup the original RECEPTOR_ANGLE to INSTRUMENT_RECEPTOR_ANGLE
with table((ms / "FEED").as_posix(), readonly=False, ack=False) as tf:
tf.putcol("INSTRUMENT_RECEPTOR_ANGLE", ms_feed.to(u.rad).value)
tf.flush()
logger.info("Backed up the original RECEPTOR_ANGLE to INSTRUMENT_RECEPTOR_ANGLE")

if feed_idx is None:
assert (ms_feed[:, 0] == ms_feed[0, 0]).all() & (
ms_feed[:, 1] == ms_feed[0, 1]
Expand Down

0 comments on commit eb238be

Please sign in to comment.