Skip to content

Commit e9a5a98

Browse files
Merge pull request #72 from HERA-Team/refactoring
refactor: rename vis_cpu to matvis
2 parents 8386a48 + 1ecce4f commit e9a5a98

43 files changed

Lines changed: 712 additions & 703 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# .coveragerc to control coverage.py
22
[run]
33
branch = True
4-
source = vis_cpu
4+
source = matvis
55
omit = */cli.py
66

77
[paths]

.github/ISSUE_TEMPLATE/question.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
name: Question
3-
about: Ask a question about how to use vis_cpu
3+
about: Ask a question about how to use matvis
44
title: "[Question]"
55
labels: 'Type: question'
66
assignees: steven-murray
77

88
---
99

10-
<!-- Please ask your question below. Please try to be as specific as you can, and provide information about your installed version of vis_cpu and Python -->
10+
<!-- Please ask your question below. Please try to be as specific as you can, and provide information about your installed version of matvis and Python -->

.github/PULL_REQUEST_TEMPLATE/feature.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Thank you for creating a PR on vis_cpu!
2+
Thank you for creating a PR on matvis!
33
44
Please read through the following and check the boxes to ensure
55
your PR meets our coding standards and that it follows the

.github/workflows/run_notebooks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
pip install .[test] papermill jupyter ipykernel
3232
3333
- name: Install ipykernel
34-
run: python -m ipykernel install --user --name viscpu --display-name "viscpu"
34+
run: python -m ipykernel install --user --name matvis --display-name "matvis"
3535

3636
- name: Run Notebooks
3737
run: |
38-
papermill -k viscpu docs/tutorials/vis_cpu_tutorial.ipynb tmp.ipynb
38+
papermill -k matvis docs/tutorials/matvis_tutorial.ipynb tmp.ipynb

.github/workflows/test_suite.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ jobs:
4343
4444
- name: Run Tests
4545
run: |
46-
python -m pytest --ignore tests/test_plot.py --cov=vis_cpu --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=${{ env.LOG_LEVEL}}
46+
python -m pytest --ignore tests/test_plot.py --cov=matvis --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=${{ env.LOG_LEVEL}}
4747
4848
- name: Run Plotting Tests
4949
if: matrix.python-version != '3.9' || matrix.os == 'macos-latest'
5050
run: |
51-
python -m pytest tests/test_plot.py --cov=vis_cpu --cov-config=.coveragerc --cov-append --cov-report xml:./coverage.xml --durations=25 --log-cli-level=INFO
51+
python -m pytest tests/test_plot.py --cov=matvis --cov-config=.coveragerc --cov-append --cov-report xml:./coverage.xml --durations=25 --log-cli-level=INFO
5252
5353
- name: Upload coverage report
5454
uses: codecov/codecov-action@v3.1.3
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Run Tests
9494
run: |
95-
python -m pytest -k "gpu" --cov=vis_cpu --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=INFO
95+
python -m pytest -k "gpu" --cov=matvis --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=INFO
9696
9797
- name: Upload coverage report
9898
uses: codecov/codecov-action@v3.1.3

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ indent=' '
44
skip=.tox,.venv,build,dist
55
known_standard_library=setuptools,pkg_resources
66
known_test=pytest
7-
known_first_party=vis_cpu
7+
known_first_party=matvis
88
sections=FUTURE,STDLIB,COMPAT,TEST,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
99
default_section=THIRDPARTY
1010
multi_line_output=3

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
exclude: '^docs/conf.py|^src/vis_cpu/data/'
1+
exclude: '^docs/conf.py|^src/matvis/data/'
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Contributors
66
* Hugh Garsden
77
* Phil Bull
88
* Steven Murray <steven.g.murray@asu.edu>
9+
* Piyanat Kittiwisit <piyanat.kittiwisit@gmail.com>

README.rst

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,65 @@
11
=======
2-
vis_cpu
2+
matvis
33
=======
4-
.. image:: https://github.com/hera-team/vis_cpu/workflows/Tests/badge.svg
5-
:target: https://github.com/hera-team/vis_cpu
4+
.. image:: https://github.com/hera-team/ matvis/workflows/Tests/badge.svg
5+
:target: https://github.com/hera-team/ matvis
66
.. image:: https://badge.fury.io/py/vis-cpu.svg
77
:target: https://badge.fury.io/py/vis-cpu
8-
.. image:: https://codecov.io/gh/hera-team/vis_cpu/branch/main/graph/badge.svg
9-
:target: https://codecov.io/gh/hera-team/vis_cpu
8+
.. image:: https://codecov.io/gh/hera-team/ matvis/branch/main/graph/badge.svg
9+
:target: https://codecov.io/gh/hera-team/ matvis
1010
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
1111
:target: https://github.com/psf/black
1212

1313

14-
Fast visibility simulator capable of running on CPU and GPU.
14+
Fast matrix-based visibility simulator capable of running on CPU and GPU.
1515

1616

1717
Description
1818
===========
1919

20-
``vis_cpu`` is a Python/numpy-based simulator for interferometer visibilities.
21-
It models the sky as an ensemble of point sources, each with their own frequency
22-
spectrum. Diffuse emission can be modelled by treating (e.g.) each pixel of a Healpix
23-
map as a separate source. The code is capable of modelling polarized visibilities
24-
and primary beams, but currently only a Stokes I sky model.
20+
``matvis`` is a fast Python matrix-based interferometric visibility simulator with both
21+
CPU and GPU implementations.
2522

26-
``vis_cpu`` includes a separate ``pycuda``-based implementation called ``vis_gpu``.
27-
This is intended to keep feature parity with the ``vis_cpu`` code to the greatest
28-
extent possible.
23+
It is applicable to wide field-of-view instruments such as the Hydrogen Epoch of
24+
Reionization Array (HERA) and the Square Kilometre Array (SKA), as it does not make
25+
any approximations of the visibility integral (such as the flat-sky approximation).
26+
The only approximation made is that the sky is a collection of point sources, which
27+
is valid for sky models that intrinsically consist of point-sources, but is an
28+
approximation for diffuse sky models.
29+
30+
An example wrapper for the main ``matvis`` simulator function is provided in this
31+
package (``matvis.simulate_vis()``).
32+
33+
Features
34+
--------
35+
36+
* Matrix-based algorithm is fast and scales well to large numbers of antennas.
37+
* Supports both CPU and GPU implementations as drop-in replacements for each other.
38+
* Supports both dense and sparse sky models.
39+
* Includes a wrapper for simulating multiple frequencies and setting up the simulation.
40+
* No approximations of the visibility integral (such as the flat-sky approximation).
41+
* Arbitrary primary beams per-antenna using the ``pyuvdata.UVBeam`` class.
42+
43+
Limitations
44+
-----------
45+
46+
* Currently no support for polarized sky models.
47+
* Currently no way of taking advantage of baseline redundancy to speed up simulations.
48+
* Diffuse sky models must be pixelised, which may not be the best basis-function for
49+
some sky models.
2950

30-
An example wrapper for the main ``vis_cpu`` simulator function is provided in this
31-
package (``vis_cpu.wrapper.simulate_vis()``).
3251

3352
Installation
3453
============
35-
Merely do ``pip install vis_cpu``. If you want to use the GPU functions, install
36-
with ``pip install vis_cpu[gpu]``.
54+
``pip install matvis``.
55+
56+
If you want to use the GPU functions, install
57+
with ``pip install matvis[gpu]``.
3758

3859
Developers
3960
==========
4061
Run ``pre-commit install`` before working on this code.
4162

4263
Read the Docs
4364
=============
44-
https://vis-cpu.readthedocs.io/en/latest/
65+
https://matvis.readthedocs.io/en/latest/

ci/notebook-env.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: viscpu
1+
name: matvis
22
channels:
33
- conda-forge
44
- defaults

0 commit comments

Comments
 (0)