RadioAstronomySoftwareGroup / RadioAstronomySoftwareGroup/pyuvdata

Handle 2 pi azimuth wrap arounds in `uvbeam._interp_az_za_rect_spline`

Open
#1,033 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

beams enhancement HERA
Dominant language
Python
Stars
102
Forks
35
Avg merge
1d 20h
Merged PRs (30d)
14

Description

The function for converting enu to az_za in vis_cpu (a standard HERA simulator method)

https://github.com/HERA-Team/vis_cpu/blob/b602819508dee05742014b99dfce363a57cc4ffd/src/vis_cpu/conversions.py#L10

which is used to produce azimuths to be interpolated by uvbeam

https://github.com/HERA-Team/vis_cpu/blob/b602819508dee05742014b99dfce363a57cc4ffd/src/vis_cpu/conversions.py#L286

outputs azimuths between -pi and pi.

Many uvbeam objects can be expected to only have positive azimuths (for example, cst beams only run from 0 to 2pi) and this raises the error in uvbeam at

https://github.com/RadioAstronomySoftwareGroup/pyuvdata/blob/4c66208245db29be8b9920434d6d48d23b29e367/pyuvdata/uvbeam/uvbeam.py#L1387

This could be avoided if uvbeam recognized negative azimuth values as being identical to positive azimuth values (mod 2 pi).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading uvbeam._interp_az_za_rect_spline and the referenced pyuvdata/uvbeam/uvbeam.py location around line 1387, then review the linked vis_cpu conversions.py azimuth conversion. Done means negative azimuths are accepted as equivalent to positive values modulo 2 pi instead of raising the current error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.