xradio 0.0.55__py3-none-any.whl → 0.0.58__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. xradio/__init__.py +2 -2
  2. xradio/_utils/_casacore/casacore_from_casatools.py +1001 -0
  3. xradio/_utils/_casacore/tables.py +6 -1
  4. xradio/_utils/coord_math.py +22 -23
  5. xradio/_utils/dict_helpers.py +76 -11
  6. xradio/_utils/schema.py +5 -2
  7. xradio/_utils/zarr/common.py +1 -73
  8. xradio/image/_util/_casacore/common.py +11 -3
  9. xradio/image/_util/_casacore/xds_from_casacore.py +59 -35
  10. xradio/image/_util/_casacore/xds_to_casacore.py +47 -16
  11. xradio/image/_util/_fits/xds_from_fits.py +172 -77
  12. xradio/image/_util/casacore.py +9 -4
  13. xradio/image/_util/common.py +4 -4
  14. xradio/image/_util/image_factory.py +8 -8
  15. xradio/image/image.py +45 -5
  16. xradio/measurement_set/__init__.py +19 -9
  17. xradio/measurement_set/_utils/__init__.py +1 -3
  18. xradio/measurement_set/_utils/_msv2/__init__.py +0 -0
  19. xradio/measurement_set/_utils/_msv2/_tables/read.py +35 -90
  20. xradio/measurement_set/_utils/_msv2/_tables/read_main_table.py +6 -686
  21. xradio/measurement_set/_utils/_msv2/_tables/table_query.py +13 -3
  22. xradio/measurement_set/_utils/_msv2/conversion.py +129 -145
  23. xradio/measurement_set/_utils/_msv2/create_antenna_xds.py +9 -16
  24. xradio/measurement_set/_utils/_msv2/create_field_and_source_xds.py +125 -221
  25. xradio/measurement_set/_utils/_msv2/msv2_to_msv4_meta.py +1 -2
  26. xradio/measurement_set/_utils/_msv2/msv4_info_dicts.py +13 -8
  27. xradio/measurement_set/_utils/_msv2/msv4_sub_xdss.py +27 -72
  28. xradio/measurement_set/_utils/_msv2/partition_queries.py +5 -262
  29. xradio/measurement_set/_utils/_msv2/subtables.py +0 -107
  30. xradio/measurement_set/_utils/_utils/interpolate.py +60 -0
  31. xradio/measurement_set/_utils/_zarr/encoding.py +2 -7
  32. xradio/measurement_set/convert_msv2_to_processing_set.py +0 -2
  33. xradio/measurement_set/load_processing_set.py +2 -2
  34. xradio/measurement_set/measurement_set_xdt.py +14 -14
  35. xradio/measurement_set/open_processing_set.py +1 -3
  36. xradio/measurement_set/processing_set_xdt.py +41 -835
  37. xradio/measurement_set/schema.py +96 -123
  38. xradio/schema/check.py +91 -97
  39. xradio/schema/dataclass.py +159 -22
  40. xradio/schema/export.py +99 -0
  41. xradio/schema/metamodel.py +51 -16
  42. xradio/schema/typing.py +5 -5
  43. {xradio-0.0.55.dist-info → xradio-0.0.58.dist-info}/METADATA +43 -11
  44. xradio-0.0.58.dist-info/RECORD +65 -0
  45. {xradio-0.0.55.dist-info → xradio-0.0.58.dist-info}/WHEEL +1 -1
  46. xradio/image/_util/fits.py +0 -13
  47. xradio/measurement_set/_utils/_msv2/_tables/load.py +0 -63
  48. xradio/measurement_set/_utils/_msv2/_tables/load_main_table.py +0 -487
  49. xradio/measurement_set/_utils/_msv2/_tables/read_subtables.py +0 -395
  50. xradio/measurement_set/_utils/_msv2/_tables/write.py +0 -320
  51. xradio/measurement_set/_utils/_msv2/_tables/write_exp_api.py +0 -385
  52. xradio/measurement_set/_utils/_msv2/chunks.py +0 -115
  53. xradio/measurement_set/_utils/_msv2/descr.py +0 -165
  54. xradio/measurement_set/_utils/_msv2/msv2_msv3.py +0 -7
  55. xradio/measurement_set/_utils/_msv2/partitions.py +0 -392
  56. xradio/measurement_set/_utils/_utils/cds.py +0 -40
  57. xradio/measurement_set/_utils/_utils/xds_helper.py +0 -404
  58. xradio/measurement_set/_utils/_zarr/read.py +0 -263
  59. xradio/measurement_set/_utils/_zarr/write.py +0 -329
  60. xradio/measurement_set/_utils/msv2.py +0 -106
  61. xradio/measurement_set/_utils/zarr.py +0 -133
  62. xradio-0.0.55.dist-info/RECORD +0 -77
  63. {xradio-0.0.55.dist-info → xradio-0.0.58.dist-info}/licenses/LICENSE.txt +0 -0
  64. {xradio-0.0.55.dist-info → xradio-0.0.58.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,10 @@
1
- from dataclasses import dataclass
1
+ from __future__ import annotations
2
+
3
+ from dataclasses import dataclass, MISSING
2
4
  import typing
3
5
 
4
6
  __all__ = [
7
+ "ValueSchema",
5
8
  "AttrSchemaRef",
6
9
  "ArraySchema",
7
10
  "ArraySchemaRef",
@@ -10,8 +13,44 @@ __all__ = [
10
13
  ]
11
14
 
12
15
 
13
- @dataclass(frozen=True)
14
- class AttrSchemaRef:
16
+ @dataclass
17
+ class ValueSchema:
18
+ """
19
+ Schema information about a value in an attribute or dictionary.
20
+ """
21
+
22
+ type: typing.Literal[
23
+ "bool", "str", "int", "float", "list[str]", "dict", "dataarray"
24
+ ]
25
+ """
26
+ Type of value
27
+
28
+ * ``bool``: A boolean
29
+ * ``str``: A UTF-8 string
30
+ * ``int``: A 64-bit signed integer
31
+ * ``float``: A double-precision floating point number
32
+ * ``list[str]``: A list of strings
33
+ * ``dict``: Dictionary
34
+ * ``dataarray``: An xarray dataarray (encoded using ``to_dict``)
35
+ """
36
+ dict_schema: typing.Optional[DictSchema] = None
37
+ """
38
+ Dictionary schema, if it is an xarray DataArray
39
+ """
40
+ array_schema: typing.Optional[ArraySchema] = None
41
+ """
42
+ Array schema, if it is an xarray DataArray
43
+ """
44
+ literal: typing.Optional[typing.List[typing.Any]] = None
45
+ """
46
+ Allowed literal values, if specified.
47
+ """
48
+ optional: bool = False
49
+ """Is the value optional?"""
50
+
51
+
52
+ @dataclass
53
+ class AttrSchemaRef(ValueSchema):
15
54
  """
16
55
  Schema information about an attribute as referenced from an array or
17
56
  dataset schema.
@@ -20,18 +59,11 @@ class AttrSchemaRef:
20
59
  in the array or dataset schema definition.
21
60
  """
22
61
 
23
- name: str
62
+ name: str = ""
24
63
  """Name of attribute as given in data array / dataset."""
25
- typ: type
26
- """
27
- Python type of attribute. Note that this might again be a data
28
- array or dataset, but we don't track that explicitly.
29
- """
30
- optional: bool
31
- """Is the attribute optional?"""
32
- default: typing.Optional[typing.Any]
64
+ default: typing.Optional[typing.Any] = None
33
65
  """If optional: What is the default value?"""
34
- docstring: str
66
+ docstring: str = ""
35
67
  """Documentation string of attribute reference"""
36
68
 
37
69
 
@@ -49,8 +81,11 @@ class ArraySchema:
49
81
  """(Class) name of the schema"""
50
82
  dimensions: typing.List[typing.List[str]]
51
83
  """List of possible dimensions"""
52
- dtypes: typing.List[typing.List["numpy.dtype"]]
53
- """List of possible (numpy) types"""
84
+ dtypes: typing.List[typing.List[str]]
85
+ """List of possible dtype options, where each inner list contains
86
+ (numpy) types as array interface protocol descriptors (e.g. `">f4"`).
87
+ Each inner list corresponds to a possible configuration of dtypes
88
+ for the data array."""
54
89
 
55
90
  coordinates: typing.List["ArraySchemaRef"]
56
91
  """Coordinates data arrays giving values to dimensions"""
@@ -97,7 +132,7 @@ class ArraySchemaRef(ArraySchema):
97
132
  """Name of array schema as given in dataset."""
98
133
  optional: bool
99
134
  """Is the data array optional?"""
100
- default: typing.Optional[typing.Any]
135
+ default: typing.Optional[typing.Any] = None
101
136
  """If optional: What is the default value?"""
102
137
  docstring: typing.Optional[str] = None
103
138
  """Documentation string of array reference"""
xradio/schema/typing.py CHANGED
@@ -312,26 +312,26 @@ def get_dims(tp: Any) -> List[Dims]:
312
312
 
313
313
  dims_out = []
314
314
  for dim in dims_in:
315
- args = get_args(dim)
315
+ args = list(get_args(dim))
316
316
  origin = get_origin(dim)
317
317
 
318
318
  # One-dimensional dimension
319
319
  if origin is Literal:
320
- dims_out.append((str(args[0]),))
320
+ dims_out.append([str(args[0])])
321
321
  continue
322
322
 
323
323
  if not (origin is tuple or origin is Tuple):
324
324
  raise TypeError(f"Could not find any dims in {tp!r}.")
325
325
 
326
326
  # Zero-dimensions
327
- if args == () or args == ((),):
328
- dims_out.append(())
327
+ if args == [] or args == [()]:
328
+ dims_out.append([])
329
329
  continue
330
330
 
331
331
  if not all(get_origin(arg) is Literal for arg in args):
332
332
  raise TypeError(f"Could not find any dims in {tp!r}.")
333
333
 
334
- dims_out.append(tuple(str(get_args(arg)[0]) for arg in args))
334
+ dims_out.append([str(get_args(arg)[0]) for arg in args])
335
335
 
336
336
  return dims_out
337
337
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xradio
3
- Version: 0.0.55
3
+ Version: 0.0.58
4
4
  Summary: Xarray Radio Astronomy Data IO
5
5
  Author-email: Jan-Willem Steeb <jsteeb@nrao.edu>, Federico Montesino Pouzols <pouzols@eso.edu>, Dave Mehringer <dmehring@nrao.edu>, Peter Wortmann <peter.wortmann@skao.int>
6
6
  License: BSD 3-Clause License
@@ -41,22 +41,22 @@ Requires-Python: <3.14,>=3.11
41
41
  Description-Content-Type: text/markdown
42
42
  License-File: LICENSE.txt
43
43
  Requires-Dist: astropy
44
- Requires-Dist: dask
45
- Requires-Dist: distributed
46
- Requires-Dist: toolviper>=0.0.11
44
+ Requires-Dist: toolviper>=0.0.12
47
45
  Requires-Dist: numba>=0.57.0
48
- Requires-Dist: numpy
49
- Requires-Dist: pytest
50
- Requires-Dist: pytest-cov
51
- Requires-Dist: pytest-html
52
46
  Requires-Dist: s3fs
53
47
  Requires-Dist: scipy
54
48
  Requires-Dist: xarray
55
49
  Requires-Dist: zarr<3,>=2
56
50
  Requires-Dist: pyarrow
57
- Requires-Dist: python_casacore>=3.6.1; sys_platform != "darwin"
58
51
  Requires-Dist: typeguard
59
52
  Requires-Dist: numcodecs<0.16
53
+ Requires-Dist: psutil
54
+ Provides-Extra: test
55
+ Requires-Dist: pytest; extra == "test"
56
+ Requires-Dist: pytest-cov; extra == "test"
57
+ Requires-Dist: pytest-html; extra == "test"
58
+ Provides-Extra: python-casacore
59
+ Requires-Dist: python_casacore>=3.6.1; sys_platform != "darwin" and extra == "python-casacore"
60
60
  Provides-Extra: interactive
61
61
  Requires-Dist: matplotlib; extra == "interactive"
62
62
  Requires-Dist: prettytable; extra == "interactive"
@@ -74,6 +74,26 @@ Requires-Dist: sphinx-autosummary-accessors; extra == "docs"
74
74
  Requires-Dist: sphinx_rtd_theme; extra == "docs"
75
75
  Requires-Dist: twine; extra == "docs"
76
76
  Requires-Dist: pandoc; extra == "docs"
77
+ Provides-Extra: all
78
+ Requires-Dist: pytest; extra == "all"
79
+ Requires-Dist: pytest-cov; extra == "all"
80
+ Requires-Dist: pytest-html; extra == "all"
81
+ Requires-Dist: python_casacore>=3.6.1; sys_platform != "darwin" and extra == "all"
82
+ Requires-Dist: matplotlib; extra == "all"
83
+ Requires-Dist: prettytable; extra == "all"
84
+ Requires-Dist: jupyterlab; extra == "all"
85
+ Requires-Dist: ipykernel; extra == "all"
86
+ Requires-Dist: ipympl; extra == "all"
87
+ Requires-Dist: ipython; extra == "all"
88
+ Requires-Dist: jupyter-client; extra == "all"
89
+ Requires-Dist: nbsphinx; extra == "all"
90
+ Requires-Dist: recommonmark; extra == "all"
91
+ Requires-Dist: scanpydoc; extra == "all"
92
+ Requires-Dist: sphinx-autoapi; extra == "all"
93
+ Requires-Dist: sphinx-autosummary-accessors; extra == "all"
94
+ Requires-Dist: sphinx_rtd_theme; extra == "all"
95
+ Requires-Dist: twine; extra == "all"
96
+ Requires-Dist: pandoc; extra == "all"
77
97
  Dynamic: license-file
78
98
 
79
99
  # xradio
@@ -93,8 +113,6 @@ It is recommended to use the conda environment manager from [miniforge](https://
93
113
  conda create --name xradio python=3.12 --no-default-packages
94
114
  conda activate xradio
95
115
  ```
96
- > 📝 On macOS it is required to pre-install `python-casacore` using `conda install -c conda-forge python-casacore`.
97
-
98
116
  XRADIO can now be installed using:
99
117
  ```sh
100
118
  pip install xradio
@@ -103,3 +121,17 @@ This will also install the minimal dependencies for XRADIO. To install the minim
103
121
  ```sh
104
122
  pip install "xradio[interactive]"
105
123
  ```
124
+ To enable conversion from MSv2 to MSv4 use (this only works for Linux):
125
+ ```sh
126
+ pip install "xradio[python-casacore]"
127
+ ```
128
+ > 📝 On macOS it is required to pre-install `python-casacore` using `conda install -c conda-forge python-casacore`.
129
+
130
+ To be able to run tests:
131
+ ```sh
132
+ pip install "xradio[test]"
133
+ ```
134
+ Multiple-dependencies can be installed using:
135
+ ```sh
136
+ pip install "xradio[interactive,python-casacore,test]"
137
+ ```
@@ -0,0 +1,65 @@
1
+ xradio/__init__.py,sha256=YTpM274ZBWK14HmIXyah27yiKPsmR6xCILvlXkQrYG4,387
2
+ xradio/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ xradio/_utils/coord_math.py,sha256=ZdbgStXqQ_HS7qQ9UBPk8Z3Zse5P_DrYQsgn2UCf22U,3342
4
+ xradio/_utils/dict_helpers.py,sha256=a4veG6Dgwmtb9yO0kV9qvcQ9IZAKKrC9rAJ_m4EukcE,4072
5
+ xradio/_utils/list_and_array.py,sha256=fW0LDSXlPrSQguSUcZM5oy2Zw-KQVqq9vmmLS8jhc70,4340
6
+ xradio/_utils/schema.py,sha256=OYfAljwNU94KyxGSpKuKxSzSdebW6T43RkMA13aTaeU,7615
7
+ xradio/_utils/_casacore/casacore_from_casatools.py,sha256=ugmWEIzJbuXsPDgJbtuzv0qSXx5Vybu8Sp73NAFt5oQ,31207
8
+ xradio/_utils/_casacore/tables.py,sha256=puRidbjtVx6caEG_Z5TebTLdTUbtBUhzvqByKLQTHfo,1389
9
+ xradio/_utils/zarr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ xradio/_utils/zarr/common.py,sha256=rqqGAogp75xCE9ZiUvV-cU2n4aOw2qHycKh0F_EW518,2964
11
+ xradio/image/__init__.py,sha256=HAD0GfopIbhdxOYckyW6S9US_dSWmZrwIl3FHUzZwrE,435
12
+ xradio/image/image.py,sha256=L-6hhAbO6Bm1zbPRzcl_P3REjHyjFd2rjQvnpYO5Q8Q,16726
13
+ xradio/image/_util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ xradio/image/_util/casacore.py,sha256=_o8767_zYGbXMqqN4k4clq2VhfgEls09h2WXInKEFe0,4615
15
+ xradio/image/_util/common.py,sha256=VGJ21x-Uifk9kf_O6o7URwesYInVZeMh1RLCXQOlgq0,8428
16
+ xradio/image/_util/image_factory.py,sha256=TSrbrrcjK5qzPU5MipGMw3W7aHJFCcmVrZ80CiVpprQ,8613
17
+ xradio/image/_util/zarr.py,sha256=lhQqVRC1GEWClG3zRbuDr2IlQBfXeDqaLUJIN-MVMxA,1652
18
+ xradio/image/_util/_casacore/__init__.py,sha256=OlsiRE40o1jSbBI4khgQQzgfDYbAlOMKIhO4UFlbGhg,41
19
+ xradio/image/_util/_casacore/common.py,sha256=2a88YrveQY9x8bcM7SQSn-L5y60W92rLW34OXC5VwSs,1764
20
+ xradio/image/_util/_casacore/xds_from_casacore.py,sha256=egL5pavyYs66sAHuWQGywnZUmaSle1IPtHSPeG25F1M,43731
21
+ xradio/image/_util/_casacore/xds_to_casacore.py,sha256=RO8xOU2DwjNyLfAmAZAz9dCAf_RSlLotRVYRBLhnGOI,17938
22
+ xradio/image/_util/_fits/xds_from_fits.py,sha256=DsuKAer43rWwDjA9gFNs2sCqFrFVdFW6O0i21RVZzzE,34654
23
+ xradio/image/_util/_zarr/common.py,sha256=ltlj3uFa-uv8lXlDtV79QnfNmfm0tyhXN5FDAjZtjzg,308
24
+ xradio/image/_util/_zarr/xds_from_zarr.py,sha256=KMsfaSSm9kyVoztS6pUzGNxMZzQnCxkk0kDv2GxW5Kw,4451
25
+ xradio/image/_util/_zarr/xds_to_zarr.py,sha256=nsDvDD-kuMuMF2dDlj0jTxSW4mdR-jjIsvXHi5uIERU,2373
26
+ xradio/image/_util/_zarr/zarr_low_level.py,sha256=xnYm6EmVbmLxMlOSXH32SABfQBLHfr2H9ch9gYwFNXs,13338
27
+ xradio/measurement_set/__init__.py,sha256=rGhy9tz5d60hln-SSWFLieDrZ2sodli3npKuCEQc8bc,1127
28
+ xradio/measurement_set/convert_msv2_to_processing_set.py,sha256=ffdqpNQE01YHP_rXR74EvNtGVYaxBlY646vzh3Aimeo,9666
29
+ xradio/measurement_set/load_processing_set.py,sha256=r_eO7DTr-3EphujOEh-P_VfcVRpYzx1M-tGBwpxFC-8,8201
30
+ xradio/measurement_set/measurement_set_xdt.py,sha256=xcnxJjgqhozApceSG65kbMfnALWF34bl_Nh7joTvanY,11970
31
+ xradio/measurement_set/open_processing_set.py,sha256=yfXhs1co8UBf4-m7LLAnc7lV2hFvGKV-HwQ_yAcusH8,5243
32
+ xradio/measurement_set/processing_set_xdt.py,sha256=EOOP7vaAU4JnE3eEC-ffVVNvAkyqTIHyFr5i-FL6QqU,33985
33
+ xradio/measurement_set/schema.py,sha256=pW3WGKZcSO-KEQp8XDomXx3dKuBrybdmuzk8tL7w8iQ,89510
34
+ xradio/measurement_set/_utils/__init__.py,sha256=iTbgPiQPw9hyXSdQYPcwGRrP2PFXgF6CZi8A3KNKya0,43
35
+ xradio/measurement_set/_utils/_msv2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
+ xradio/measurement_set/_utils/_msv2/conversion.py,sha256=oWzWPAUk9Y7dRd2XxuJkSgPtUYubyAg3yCf1riIs9WI,52895
37
+ xradio/measurement_set/_utils/_msv2/create_antenna_xds.py,sha256=s3HnTbyOl7h6pAocJ4dpd095s7qHSSngeQ34Ygo8Uk0,17650
38
+ xradio/measurement_set/_utils/_msv2/create_field_and_source_xds.py,sha256=FEV2-K1XMkuepWSsiUeCcC-4NSKlOCv_4w3dr3BHwyA,33495
39
+ xradio/measurement_set/_utils/_msv2/msv2_to_msv4_meta.py,sha256=ZpxJJ2yTjjEy6A4XWS9eT-1J92jLwR8CNyoDBfhAVm8,1572
40
+ xradio/measurement_set/_utils/_msv2/msv4_info_dicts.py,sha256=s7K4MUWtrxKG9e6brNSXXJ6EYvsUf30PYEkkb1P13Mc,7320
41
+ xradio/measurement_set/_utils/_msv2/msv4_sub_xdss.py,sha256=HhkDZYh8fWTM89nUzCAAbHV6EKDWsUq-3GpKisSnZas,30462
42
+ xradio/measurement_set/_utils/_msv2/optimised_functions.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
+ xradio/measurement_set/_utils/_msv2/partition_queries.py,sha256=1dzwAVraEktkMl8MYn6bzhjlpCCSgy6KTqlTmjeC3nQ,5661
44
+ xradio/measurement_set/_utils/_msv2/subtables.py,sha256=mrf7g7mbC4crtnQ0wFocPcFRNlvq_7e7iDzE5B6ugl4,843
45
+ xradio/measurement_set/_utils/_msv2/_tables/read.py,sha256=tW0ROevR4tXpydIWuj2UyNhWNtvkKU9NkYxMi1ZoVKc,45421
46
+ xradio/measurement_set/_utils/_msv2/_tables/read_main_table.py,sha256=FFoTVpY8JNvcXnTvUiraWNU9gB9-_9GR7he0NbODabg,3168
47
+ xradio/measurement_set/_utils/_msv2/_tables/table_query.py,sha256=Uc1zeiU-rYtCsYXpij8jzFG5NPBYvIh70qW1srn7B98,1498
48
+ xradio/measurement_set/_utils/_utils/interpolate.py,sha256=LlDYi-h7aj_tsuZqAu5Kr-vOi6fVBPpVbew-i-HnmA0,1962
49
+ xradio/measurement_set/_utils/_utils/partition_attrs.py,sha256=JaePHts_A0EbB4K-0a_uC98RZ2EmfjB9pDSEI11oAwk,3401
50
+ xradio/measurement_set/_utils/_utils/stokes_types.py,sha256=DMa8TmmS7BQ99Xm8c7ZjcRapMtLbrKVxrt4f0qUIOvg,561
51
+ xradio/measurement_set/_utils/_zarr/encoding.py,sha256=ze5ncHEBa-sVwJCayJa2irOdaxZEkYfBKObuij7uVRc,371
52
+ xradio/schema/__init__.py,sha256=EzEMnOtN8G_wdjo8QBRKfq5MrYgfr_nt1pfunlI6i6Q,733
53
+ xradio/schema/bases.py,sha256=dk24pFhugCe5RjaR41xxP38FxVVsIC9bdmBdsarwFvk,17162
54
+ xradio/schema/check.py,sha256=TTr7e-kZXOgqf4cih61BVQb9e28HTTuyFJC_OrcLLRg,21938
55
+ xradio/schema/dataclass.py,sha256=gzNqXzkBLV7ETEyddNOd_jRgP8rkivCkfUlURLz8z5c,19300
56
+ xradio/schema/export.py,sha256=_dqUToirb_T6eC_x2b4bzhUtDSB6VmvLTC8kW9z2XOI,2781
57
+ xradio/schema/metamodel.py,sha256=M_df1ffQEzVL_UV9T5ueqG-8Ywg9qf3dPbl0dlynVdk,4872
58
+ xradio/schema/typing.py,sha256=BJactfOKXgnIm4Y7BZE72lLKYhPt-N0xxlMjkTL6ecY,10438
59
+ xradio/sphinx/__init__.py,sha256=VGY-7Ty3q67qpnBee0-znbiJ-Iy0F93UO--IpjEdHXc,380
60
+ xradio/sphinx/schema_table.py,sha256=uq33habbAbReqnEG6ASKSd4UOMZGUzA3qoTX45rq84U,12373
61
+ xradio-0.0.58.dist-info/licenses/LICENSE.txt,sha256=9CYIJt7riOXo9AD0eXBZviLxo_HebD-2JJI8oiWtzfg,1807
62
+ xradio-0.0.58.dist-info/METADATA,sha256=OTKLv6RbyjAVkBphhGsSJ_0KOOMeGP14SYnxAK6g7_M,6827
63
+ xradio-0.0.58.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
64
+ xradio-0.0.58.dist-info/top_level.txt,sha256=dQu27fGBZJ2Yk-gW5XeD-dZ76Xa4Xcvk60Vz-dwXp7k,7
65
+ xradio-0.0.58.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,13 +0,0 @@
1
- import os
2
-
3
- import xarray as xr
4
-
5
- from ._fits.xds_from_fits import _fits_image_to_xds
6
-
7
-
8
- def _read_fits_image(
9
- infile: str, chunks: dict, verbose: bool, do_sky_coords: bool
10
- ) -> xr.Dataset:
11
- img_full_path = os.path.expanduser(infile)
12
- xds = _fits_image_to_xds(img_full_path, chunks, verbose, do_sky_coords)
13
- return xds
@@ -1,63 +0,0 @@
1
- from typing import Tuple
2
-
3
- import numpy as np
4
-
5
- from casacore import tables
6
- from ....._utils.common import get_pad_value
7
-
8
-
9
- def load_col_chunk(
10
- tb_tool: tables.table,
11
- col: str,
12
- cshape: Tuple[int],
13
- tidxs: np.ndarray,
14
- bidxs: np.ndarray,
15
- didxs: np.ndarray,
16
- d1: Tuple[int, int],
17
- d2: Tuple[int, int],
18
- ) -> np.ndarray:
19
- """
20
- Loads a slice of a col (using casacore getcol(slice))
21
-
22
- Parameters
23
- ----------
24
- tb_tool : tables.table
25
- a table/TaQL query open and being used to load columns
26
- col : str
27
- colum to load
28
- cshape : Tuple[int]
29
- shape of the resulting col data chunk
30
- tidxs : np.ndarray
31
- time axis indices
32
- bidxs : np.ndarray
33
- baseline axis indices
34
- didxs : np.ndarray
35
- effective) data indices, excluding missing baselines
36
- d1 : Tuple[int, int]
37
- indices to load on dimension 1 (None=all, pols or chans)
38
- d2 : Tuple[int, int]
39
- indices to load on dimension 2 (None=all, pols)
40
-
41
- Returns
42
- -------
43
- np.ndarray
44
- data array loaded directly with casacore getcol/getcolslice
45
- """
46
-
47
- if (len(cshape) == 2) or (col == "UVW"):
48
- # all the scalars and UVW
49
- data = np.array(tb_tool.getcol(col, 0, -1))
50
- elif len(cshape) == 3:
51
- # WEIGHT, SIGMA
52
- data = tb_tool.getcolslice(col, d1[0], d1[1], [], 0, -1)
53
- elif len(cshape) == 4:
54
- # DATA, FLAG, WEIGHT_SPECTRUM / SIGMA_SPECTRUM
55
- data = tb_tool.getcolslice(col, (d1[0], d2[0]), (d1[1], d2[1]), [], 0, -1)
56
-
57
- # full data is the maximum of the data shape and chunk shape dimensions
58
- fill_value = get_pad_value(data.dtype)
59
- chunk = np.full(cshape, np.fill_value, dtype=data.dtype)
60
- if len(didxs) > 0:
61
- chunk[tidxs[didxs], bidxs[didxs]] = data[didxs]
62
-
63
- return chunk