RadioAstronomySoftwareGroup / RadioAstronomySoftwareGroup/pyuvdata

Can we vectorize some of compress by redundancy?

Open
#863 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Noted in #827 this block of code is used in the averaging feature of the compress by redundancy, but it is possible we could replace the for loops with a well constructed search much like the uvw calculation. This would require a baseline,time ordering to be enforced for this option though. Investigation is needed.

                for bl in reg_group:
                    bl_inds = np.where(self.baseline_array == bl)[0]
                    group_inds.extend(bl_inds)
                    group_times.extend(self.time_array[bl_inds])
                for bl in conj_group:
                    bl_inds = np.where(self.baseline_array == bl)[0]
                    conj_group_inds.extend(bl_inds)
                    conj_group_times.extend(self.time_array[bl_inds])

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 in the averaging implementation for compress by redundancy and compare its baseline and time handling with the uvw calculation mentioned in the issue. Investigate whether enforcing baseline,time ordering enables a search-based replacement for the shown loops. Done means the averaging path uses the investigated vectorized approach and its behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 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.