RadioAstronomySoftwareGroup / RadioAstronomySoftwareGroup/pyuvsim

Code Review of simsetup

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

Nobody has claimed this yet.

technical debt
Dominant language
Python
Stars
54
Forks
11
Avg merge
2d 17h
Merged PRs (30d)
8

Description

This issue is mostly a reminder that we should do a bit of a group review of the simsetup part of pyuvsim. A few notes:

  1. There seem to be two main parts of pyuvsim: (i) the configuration definition (i.e. simsetup) and (ii) the actual simulator, which is supposed to provide a community 'reference'. To me, it seems that part (i) is essential because it allows other simulators to be run based on the same configuration file as pyuvsim, and therefore more easily compared.
  2. The simsetup module is quite convoluted at this point (a few open issues testify to this), and could do with a reduction of complexity.
  3. The simsetup module was written without too much of a concern for performance, because it was assumed that the simulation part would always be the biggest bottleneck. However, this is not always the case, depending on how the simulator itself works (eg. in HERA validation using vis-cpu, we do the simsetup at least once for each frequency, sometimes multiple times for each frequency). This brings the 'overhead' from simsetup into a regime where it can be very non-negligible (see eg. #410).

In terms of performance, I think ideas would revolve around how to streamline UVData creation, and which (if any) checks need to be run on the uvdata object, and which attributes "need" to be set.

In terms of code complexity, I wonder if using pyyaml's in-built ability to define tags etc might not come in handy (maybe not, but it's something to consider).

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 reviewing the simsetup module and issue #410, then trace UVData creation and identify which checks and attributes are involved. Consider the stated PyYAML tag idea alongside setup overhead and code complexity; the issue needs a concrete review scope and agreed completion criteria before implementation can begin.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.