Skip to content

Commit 25e33f6

Browse files
authored
Merge pull request #105 from radionets-project/move_gridder
Remove gridding and replace with pyvisgrid methods
2 parents ff6d878 + 2f2cdb9 commit 25e33f6

File tree

23 files changed

+218
-768
lines changed

23 files changed

+218
-768
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ jobs:
8686
if: matrix.environment-type == 'mamba'
8787
run: micromamba list
8888

89+
- name: Create CASA data directory
90+
run: |
91+
mkdir -p $HOME/.casa/data
92+
8993
- name: Tests
9094
run: |
9195
pytest -vv --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
@@ -122,6 +126,10 @@ jobs:
122126
uv pip install --system . --group docs -e .
123127
git describe --tags
124128
129+
- name: Create CASA data directory
130+
run: |
131+
mkdir -p $HOME/.casa/data
132+
125133
- name: Build docs
126134
run: make -C docs html
127135

.readthedocs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ build:
1111
- asdf plugin add uv
1212
- asdf install uv latest
1313
- asdf global uv latest
14+
- mkdir -p $HOME/.casa/data
1415
install:
1516
- uv pip install --upgrade pip
1617
- uv pip install --group docs .
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
.. _dataset_dataset:
3+
4+
*****************************************
5+
Dataset (:mod:`pyvisgen.dataset.dataset`)
6+
*****************************************
7+
8+
.. currentmodule:: pyvisgen.dataset.dataset
9+
10+
Dataset submodule of :mod:`pyvisgen.dataset`.
11+
12+
13+
Reference/API
14+
=============
15+
16+
.. automodapi:: pyvisgen.dataset.dataset
17+
:inherited-members:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
.. _dataset:
3+
4+
*********************************
5+
Dataset (:mod:`pyvisgen.dataset`)
6+
*********************************
7+
8+
.. currentmodule:: pyvisgen.dataset
9+
10+
11+
Introduction
12+
============
13+
14+
:mod:`pyvisgen.dataset` contains methods create datasets consisting of simulated
15+
visibilities and the corresponding true model images.
16+
17+
Submodules
18+
==========
19+
20+
.. toctree::
21+
:maxdepth: 1
22+
:glob:
23+
24+
dataset
25+
utils
26+
27+
28+
Reference/API
29+
=============
30+
31+
.. automodapi:: pyvisgen.dataset
32+
:no-inheritance-diagram:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.. _dataset_utils:
2+
3+
*********************************************
4+
Dataset Utils (:mod:`pyvisgen.dataset.utils`)
5+
*********************************************
6+
7+
.. currentmodule:: pyvisgen.dataset.utils
8+
9+
Utility submodule of :mod:`pyvisgen.dataset`.
10+
11+
12+
Reference/API
13+
=============
14+
15+
.. automodapi:: pyvisgen.dataset.utils
16+
:inherited-members:

docs/api-reference/gridding/index.rst

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/api-reference/simulation/data_set.rst

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/api-reference/simulation/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Submodules
2121
:glob:
2222

2323
array
24-
data_set
2524
observation
2625
scan
2726
visibility

docs/changes/105.feature.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- Removed gridding methods and replace it with [``pyvisgrid``](https://github.com/radionets-project/pyvisgrid)
2+
- Add ``pyvisgrid`` as dependency to ``pyproject.toml``
3+
- Move the dataset creation, utility methods and scripts to a ``dataset`` module of pyvisgen.
4+
- Fix typo ``sensitivty_cut`` for dataset config

pyproject.toml

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ dependencies = [
4242
"natsort",
4343
"numpy",
4444
"pandas",
45+
"pyvisgrid",
4546
"rich",
4647
"rich-click>=1.8.9",
4748
"scipy",
@@ -52,14 +53,9 @@ dependencies = [
5253
]
5354

5455
[project.optional-dependencies]
55-
plot = [
56-
"matplotlib",
57-
]
56+
plot = ["matplotlib"]
5857

59-
tutorials = [
60-
"matplotlib",
61-
"pytorch_finufft"
62-
]
58+
tutorials = ["matplotlib", "pytorch_finufft"]
6359

6460
[dependency-groups]
6561
tests = [
@@ -101,12 +97,12 @@ dev = [
10197
"jupyter",
10298
"pre-commit",
10399
"pytorch_finufft",
104-
{include-group = "tests"},
105-
{include-group = "docs"},
100+
{ include-group = "tests" },
101+
{ include-group = "docs" },
106102
]
107103

108104
[project.scripts]
109-
pyvisgen-simulate = "pyvisgen.simulation.scripts.create_dataset:main"
105+
pyvisgen-simulate = "pyvisgen.dataset.scripts.create_dataset:main"
110106
pyvisgen-quickstart = "pyvisgen.tools.quickstart:quickstart"
111107

112108
[tool.hatch.version]
@@ -125,6 +121,9 @@ include = ["src/pyvisgen"]
125121
"resources" = "share/resources"
126122
"config" = "share/configs"
127123

124+
[tool.hatch.metadata]
125+
"allow-direct-references" = true
126+
128127
[tool.coverage.run]
129128
omit = [
130129
"docs/*",
@@ -143,7 +142,7 @@ extend-exclude = ["tests", "examples"]
143142

144143
[tool.ruff.lint]
145144
extend-select = [
146-
"I", # isort
145+
"I", # isort
147146
]
148147
ignore = []
149148

@@ -161,33 +160,33 @@ docstring-code-format = true
161160
known-first-party = ["pyvisgen"]
162161

163162
[tool.towncrier]
164-
package = "pyvisgen"
165-
directory = "docs/changes"
166-
filename = "CHANGES.rst"
167-
template = "docs/changes/template.rst"
168-
# let towncrier create proper links to the merged PR
169-
issue_format = "`#{issue} <https://github.com/radionets-project/pyvisgen/pull/{issue}>`__"
170-
171-
[tool.towncrier.fragment.feature]
172-
name = "New Features"
173-
showcontent = true
174-
175-
[tool.towncrier.fragment.bugfix]
176-
name = "Bug Fixes"
177-
showcontent = true
178-
179-
[tool.towncrier.fragment.api]
180-
name = "API Changes"
181-
showcontent = true
182-
183-
[tool.towncrier.fragment.optimization]
184-
name = "Refactoring and Optimization"
185-
showcontent = true
186-
187-
[tool.towncrier.fragment.maintenance]
188-
name = "Maintenance"
189-
showcontent = true
190-
191-
[[tool.towncrier.section]]
192-
name = ""
193-
path = ""
163+
package = "pyvisgen"
164+
directory = "docs/changes"
165+
filename = "CHANGES.rst"
166+
template = "docs/changes/template.rst"
167+
# let towncrier create proper links to the merged PR
168+
issue_format = "`#{issue} <https://github.com/radionets-project/pyvisgen/pull/{issue}>`__"
169+
170+
[tool.towncrier.fragment.feature]
171+
name = "New Features"
172+
showcontent = true
173+
174+
[tool.towncrier.fragment.bugfix]
175+
name = "Bug Fixes"
176+
showcontent = true
177+
178+
[tool.towncrier.fragment.api]
179+
name = "API Changes"
180+
showcontent = true
181+
182+
[tool.towncrier.fragment.optimization]
183+
name = "Refactoring and Optimization"
184+
showcontent = true
185+
186+
[tool.towncrier.fragment.maintenance]
187+
name = "Maintenance"
188+
showcontent = true
189+
190+
[[tool.towncrier.section]]
191+
name = ""
192+
path = ""

0 commit comments

Comments
 (0)