Skip to content

Commit 2b0d12f

Browse files
committed
Merge remote-tracking branch 'origin/main' into 355-zarr-python-v3-and-zarr-v3
2 parents 742e604 + 1df47d9 commit 2b0d12f

Some content is hidden

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

46 files changed

+3628
-2198
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Tests schemas are importable on a basic xradio install"
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '**.md'
7+
- '**.rst'
8+
pull_request:
9+
paths-ignore:
10+
- '**.md'
11+
- '**.rst'
12+
13+
jobs:
14+
test_schema:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- name: Set up Python 3
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: 3.13
24+
25+
- name: Install base xradio
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install .
29+
30+
- name: Test that schemas are importable
31+
run: python -c "import xradio.measurement_set; import xradio.schema.check"

.github/workflows/python-testing-linux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ jobs:
1717
with:
1818
cov_project: "xradio"
1919
test-path: "tests/"
20-
secrets: inherit
20+
secrets:
21+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ python:
1616
- method: pip
1717
path: .
1818
extra_requirements:
19-
- python-casacore
19+
- casacore
2020

2121
# Configuration for Sphinx documentation
2222
sphinx:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Xarray Radio Astronomy Data IO is still in development.
88
[![Coverage](https://codecov.io/gh/casangi/xradio/branch/main/graph/badge.svg)](https://codecov.io/gh/casangi/xradio/branch/main/xradio)
99
[![Documentation Status](https://readthedocs.org/projects/xradio/badge/?version=latest)](https://xradio.readthedocs.io)
1010
[![Version Status](https://img.shields.io/pypi/v/xradio.svg)](https://pypi.python.org/pypi/xradio/)
11+
[![Benchmarks](https://img.shields.io/badge/Benchmarks-Tests-orange)](https://casangi.github.io/benchviper/xradio)
1112

1213
# Installing
1314
XRADIO can be installed in virtual environments via pip. It is recommended to use the conda environment manager from [miniforge](https://github.com/conda-forge/miniforge) to create a clean, self-contained runtime where XRADIO and all its dependencies can be installed, for example:

docs/source/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@
9191

9292
nitpicky = True
9393

94+
# Ignore nitpicky warnings related to Python built-ins and the like
95+
# (https://stackoverflow.com/questions/11417221/sphinx-autodoc-gives-warning-pyclass-reference-target-not-found-type-warning)
96+
# (https://bugs.python.org/issue11975)
97+
nitpick_ignore = [("py:class", "optional")]
98+
9499
intersphinx_mapping = {
95100
"python": ("https://docs.python.org/3", None),
96101
"astropy": ("https://docs.astropy.org/en/stable", None),

docs/source/image_data/tutorials/image_schema_proposal.ipynb

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,28 @@
3333
" - Add types to all data variables and dataset.\n",
3434
"\n",
3535
"## Image Types\n",
36-
" sky\n",
37-
" flag\n",
38-
" point_spread_function\n",
39-
" primary_beam\n",
40-
" mask\n",
41-
" beam_fit_params_sky\n",
42-
" beam_fit_params_point_spread_function\n",
43-
" visibility_normalization\n",
44-
" description:\n",
45-
" date:\n",
36+
" sky: Image of the sky.\n",
37+
" flag: A boolean image defining any invalid pixels.\n",
38+
" point_spread_function: The instrumental response or \"dirty beam.\" Represents how a point source would appear given the uv-coverage and weighting scheme. Used by deconvolution algorithms to model and remove sidelobe artifacts. Determines the resolution of the image. Should be unity at the peak.\n",
39+
" primary_beam : The effective antenna power pattern projected onto the sky, describing how sensitivity falls off from the pointing center. Values range from 1.0 at center to ~0 at the edges. \n",
40+
" mask : A boolean image defining the region(s) where the deconvolution algorithm is allowed to place clean components. \n",
41+
" beam_fit_params_sky: The Gaussian fit of the resolution element. Note that this would be the same as the beam_fit_params_point_spread_function except when the sky image is convolved to a common beam.\n",
42+
" beam_fit_params_point_spread_function: The Gaussian fit to the peak of the point_spread_function.\n",
43+
" visibility_normalization: The aggregate of the image weights and used to normalize the gridded visibilities.\n",
44+
" description: String description.\n",
45+
" date: Date created.\n",
4646
"\n",
47-
" visibility*\n",
48-
" visibility_normalization*\n",
49-
" uv_sampling*\n",
50-
" uv_sampling_normalization*\n",
51-
" aperture*\n",
52-
" aperture_normalization*\n",
47+
" visibility* : Gridded Visibilities\n",
48+
" uv_sampling* : Gridded Weights\n",
49+
" uv_sampling_normalization* : Normalization used by uv_sampling.\n",
50+
" aperture* : Gridded weighted apertures. Used to calculate the primary_beam.\n",
51+
" aperture_normalization* : Normalization used by aperture.\n",
52+
"\n",
53+
"\n",
54+
"Examples of sky (each would be its own data group):\n",
55+
"SKY_DECONVOLVED\n",
56+
"SKY_MODEL\n",
57+
"SKY_RESIDUAL\n",
5358
"\n",
5459
"* UV plain. Only used internally and for debugging.\n",
5560
" "

docs/source/measurement_set/schema.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,13 @@ Value Keys
264264
Scan Intents
265265
~~~~~~~~~~~~
266266

267-
Scan intents to be used with :py:class:`~xradio.measurement_set.schema.VisibilityXds` and
268-
:py:class:`~xradio.measurement_set.schema.SpectrumXds`,
269-
in the ``intents`` field of the
270-
:py:class:`~xradio.measurement_set.schema.ObservationInfoDict`:
267+
Scan intents to be used with
268+
:py:class:`~xradio.measurement_set.schema.VisibilityXds` and
269+
:py:class:`~xradio.measurement_set.schema.SpectrumXds`, in the
270+
``scan_intents`` field of the
271+
:py:class:`~xradio.measurement_set.schema.ScanArray`. The format to
272+
be used is ``[intent]#[subintent]``, where the possible values for
273+
``[intent]`` are:
271274

272275
* ``CALIBRATE AMPLI`` : Amplitude calibration scan
273276
* ``CALIBRATE ANTENNA PHASE`` : Requested by EVLA.
@@ -300,10 +303,7 @@ in the ``intents`` field of the
300303
* ``TEST`` : used for development.
301304
* ``UNSPECIFIED`` : Unspecified scan intent
302305

303-
Sub-scan intents to be used with :py:class:`~xradio.measurement_set.schema.VisibilityXds` and
304-
:py:class:`~xradio.measurement_set.schema.SpectrumXds`,
305-
in the ``intents`` field of the
306-
:py:class:`~xradio.measurement_set.schema.ObservationInfoDict`:
306+
Possible values for ``[subintent]``:
307307

308308
* ``ON SOURCE`` : on-source measurement
309309
* ``OFF SOURCE`` : off-source measurement

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "xradio"
3-
version = "v1.1.1"
3+
version = "v1.1.3"
44
description = " Xarray Radio Astronomy Data IO"
55
authors = [
66
{name = "Jan-Willem Steeb", email="jsteeb@nrao.edu"},

src/xradio/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +0,0 @@
1-
# import os
2-
# from toolviper.utils.logger import setup_logger
3-
4-
5-
# _logger_name = "xradio"
6-
# if os.getenv("VIPER_LOGGER_NAME") != _logger_name:
7-
# os.environ["VIPER_LOGGER_NAME"] = _logger_name
8-
# setup_logger(
9-
# logger_name="xradio",
10-
# log_to_term=True,
11-
# log_to_file=False, # True
12-
# log_file="xradio-logfile",
13-
# log_level="DEBUG",
14-
# )

src/xradio/_utils/_casacore/casacore_from_casatools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
)
4949

5050
import numpy as np
51-
import toolviper.utils.logger as logger
51+
from xradio._utils.logging import xradio_logger
5252

5353
casaconfig.config.data_auto_update = False
5454
casaconfig.config.measures_auto_update = False
@@ -335,13 +335,13 @@ def taql(self, taqlcommand="TaQL expression"):
335335
tb_query = taqlcommand.replace("$mtable", tablename).replace(
336336
"$gtable", tablename
337337
)
338-
logger.debug(f"tb_query_from: {tb_query_from.name()}")
339-
logger.debug(f"tb_query_cmd: {tb_query}")
338+
xradio_logger().debug(f"tb_query_from: {tb_query_from.name()}")
339+
xradio_logger().debug(f"tb_query_cmd: {tb_query}")
340340
tb_query_to = _wrap_table(swig_object=tb_query_from._swigobj.taql(tb_query))
341341
if not is_open:
342342
tb_query_from.close()
343343
shutil.rmtree(tablename)
344-
logger.debug(f"tb_query_to: {tb_query_to.name()}")
344+
xradio_logger().debug(f"tb_query_to: {tb_query_to.name()}")
345345
return tb_query_to
346346

347347
def getcolshapestring(self, *args, **kwargs):

0 commit comments

Comments
 (0)