Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dcp utils miriad baseline fix #1434

Conversation

telegraphic
Copy link
Contributor

Minor bugfix for MIRIAD baseline calculations.

Description

MIRIAD indexes antennas starting at 1, not 0, so comparator should be >255 instead of >=255. Changed a comparator from >= 255 to >255.

Motivation and Context

Minor bugfix for code to calculate baseline ID in MIRIAD convention. The code was correct for 0-indexed antennas (ANT0, ANT1, ...), but MIRIAD uses 1-indexed antennas (ANT1, ANT2 ...).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change (documentation changes only)
  • Version change
  • Build or continuous integration change

Checklist:

Bug fix checklist:

  • My fix includes a new test that breaks as a result of the bug (if possible).
  • All new and existing tests pass.
  • I have updated the CHANGELOG.

MIRIAD indexes antennas starting at 1, not 0, so comparator should be >255 instead of >=255
Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.92%. Comparing base (4fba712) to head (ae02e23).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1434   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files          37       37           
  Lines       20869    20869           
=======================================
  Hits        20853    20853           
  Misses         16       16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ant2 = np.array([0, 1, 2, 3, 255, 256]) + 1 # Ant2 array should be 1-based
bl_gold = np.array([257, 514, 771, 1028, 67840, 67841], dtype="uint64")
ant1 = np.array([1, 2, 3, 1, 1, 1, 255, 256]) # Ant1 array should be 1-based
ant2 = np.array([0, 1, 2, 254, 255, 256, 0, 1]) # Ant2 array should be 1-based
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there zeros in the ant2 array if they are 1-based?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants