Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: update API for new multi-processing fftvis #332

Merged
merged 18 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,12 @@ repos:
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ['--fix=no']
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1 # pick a git hash / tag to point to
hooks:
- id: flake8
additional_dependencies:
- flake8-rst-docstrings
#- flake8-docstrings # not available for flake8>5
- flake8-builtins
- flake8-rst-docstrings
- flake8-rst
# - flake8-markdown # not available for flake8>5 (check later...)
- flake8-bugbear
- flake8-comprehensions
- flake8-print

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py39-plus]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.7.0
hooks:
Expand Down
2 changes: 0 additions & 2 deletions config_examples/simulator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
simulator: MatVis
precision: 2
ref_time: mean
correct_source_positions: true
38 changes: 27 additions & 11 deletions docs/tutorials/end_to_end_example.ipynb

Large diffs are not rendered by default.

48 changes: 29 additions & 19 deletions docs/tutorials/mutual_coupling_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,23 @@
"start_time": "2023-08-08T16:18:32.286643Z"
}
},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"basis_vector_type was not defined, defaulting to azimuth and zenith_angle.\n",
"2024-11-28 15:12:06,602\tINFO util.py:154 -- Missing packages: ['ipywidgets']. Run `pip install -U ipywidgets`, then restart the notebook server for rich notebook output.\n"
]
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import hera_sim\n",
"import uvtools\n",
"from astropy import constants, units\n",
"from pyuvdata import UniformBeam\n",
"\n",
"%matplotlib inline"
]
Expand Down Expand Up @@ -118,7 +128,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 5,
"id": "38c1c7c5",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -180,7 +190,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 7,
"id": "441e0c71",
"metadata": {
"ExecuteTime": {
Expand All @@ -195,7 +205,7 @@
"(-18.49989470376238, 75.0)"
]
},
"execution_count": 12,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -310,7 +320,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 10,
"id": "e060ae02",
"metadata": {
"ExecuteTime": {
Expand All @@ -327,7 +337,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 11,
"id": "baa12524",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -403,7 +413,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 12,
"id": "2b5c2b48",
"metadata": {
"ExecuteTime": {
Expand All @@ -415,15 +425,15 @@
"source": [
"# Choose simple coupling parameters\n",
"xt_kwargs = dict(\n",
" uvbeam=\"uniform\",\n",
" uvbeam=UniformBeam(),\n",
" reflection=np.ones(sim.Nfreqs) * 5e-2,\n",
" omega_p=np.sqrt(constants.c.si.value / freqs),\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 13,
"id": "b271908a",
"metadata": {
"ExecuteTime": {
Expand All @@ -448,7 +458,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 14,
"id": "37b085a8",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -504,7 +514,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 15,
"id": "06832ddd",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -593,7 +603,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 16,
"id": "d31bb1a3",
"metadata": {
"ExecuteTime": {
Expand All @@ -618,7 +628,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 17,
"id": "d16faf43",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -662,7 +672,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 18,
"id": "a839be0c",
"metadata": {
"ExecuteTime": {
Expand All @@ -688,7 +698,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 19,
"id": "06e18a4d",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -744,7 +754,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 20,
"id": "7525463b",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -790,7 +800,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 21,
"id": "7752892c",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -837,7 +847,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand All @@ -851,7 +861,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
"version": "3.12.6"
},
"toc": {
"base_numbering": 1,
Expand Down
124 changes: 32 additions & 92 deletions docs/tutorials/polybeam_simulation.ipynb

Large diffs are not rendered by default.

79 changes: 24 additions & 55 deletions docs/tutorials/visibility_simulator.ipynb

Large diffs are not rendered by default.

Loading
Loading