xradio 0.0.56__py3-none-any.whl → 0.0.59__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 (63) hide show
  1. xradio/__init__.py +2 -2
  2. xradio/_utils/_casacore/casacore_from_casatools.py +12 -2
  3. xradio/_utils/_casacore/tables.py +1 -0
  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/xds_from_casacore.py +49 -33
  9. xradio/image/_util/_casacore/xds_to_casacore.py +41 -14
  10. xradio/image/_util/_fits/xds_from_fits.py +146 -35
  11. xradio/image/_util/casacore.py +4 -3
  12. xradio/image/_util/common.py +4 -4
  13. xradio/image/_util/image_factory.py +8 -8
  14. xradio/image/image.py +45 -5
  15. xradio/measurement_set/__init__.py +19 -9
  16. xradio/measurement_set/_utils/__init__.py +1 -3
  17. xradio/measurement_set/_utils/_msv2/__init__.py +0 -0
  18. xradio/measurement_set/_utils/_msv2/_tables/read.py +17 -76
  19. xradio/measurement_set/_utils/_msv2/_tables/read_main_table.py +2 -685
  20. xradio/measurement_set/_utils/_msv2/conversion.py +174 -156
  21. xradio/measurement_set/_utils/_msv2/create_antenna_xds.py +9 -16
  22. xradio/measurement_set/_utils/_msv2/create_field_and_source_xds.py +128 -222
  23. xradio/measurement_set/_utils/_msv2/msv2_to_msv4_meta.py +1 -2
  24. xradio/measurement_set/_utils/_msv2/msv4_info_dicts.py +8 -7
  25. xradio/measurement_set/_utils/_msv2/msv4_sub_xdss.py +31 -74
  26. xradio/measurement_set/_utils/_msv2/partition_queries.py +1 -261
  27. xradio/measurement_set/_utils/_msv2/subtables.py +0 -107
  28. xradio/measurement_set/_utils/_utils/interpolate.py +60 -0
  29. xradio/measurement_set/_utils/_zarr/encoding.py +2 -7
  30. xradio/measurement_set/convert_msv2_to_processing_set.py +0 -2
  31. xradio/measurement_set/load_processing_set.py +2 -2
  32. xradio/measurement_set/measurement_set_xdt.py +20 -16
  33. xradio/measurement_set/open_processing_set.py +1 -3
  34. xradio/measurement_set/processing_set_xdt.py +54 -841
  35. xradio/measurement_set/schema.py +122 -132
  36. xradio/schema/check.py +95 -101
  37. xradio/schema/dataclass.py +159 -22
  38. xradio/schema/export.py +99 -0
  39. xradio/schema/metamodel.py +51 -16
  40. xradio/schema/typing.py +5 -5
  41. xradio/sphinx/schema_table.py +41 -77
  42. {xradio-0.0.56.dist-info → xradio-0.0.59.dist-info}/METADATA +20 -5
  43. xradio-0.0.59.dist-info/RECORD +65 -0
  44. {xradio-0.0.56.dist-info → xradio-0.0.59.dist-info}/WHEEL +1 -1
  45. xradio/image/_util/fits.py +0 -13
  46. xradio/measurement_set/_utils/_msv2/_tables/load.py +0 -66
  47. xradio/measurement_set/_utils/_msv2/_tables/load_main_table.py +0 -490
  48. xradio/measurement_set/_utils/_msv2/_tables/read_subtables.py +0 -398
  49. xradio/measurement_set/_utils/_msv2/_tables/write.py +0 -323
  50. xradio/measurement_set/_utils/_msv2/_tables/write_exp_api.py +0 -388
  51. xradio/measurement_set/_utils/_msv2/chunks.py +0 -115
  52. xradio/measurement_set/_utils/_msv2/descr.py +0 -165
  53. xradio/measurement_set/_utils/_msv2/msv2_msv3.py +0 -7
  54. xradio/measurement_set/_utils/_msv2/partitions.py +0 -392
  55. xradio/measurement_set/_utils/_utils/cds.py +0 -40
  56. xradio/measurement_set/_utils/_utils/xds_helper.py +0 -404
  57. xradio/measurement_set/_utils/_zarr/read.py +0 -263
  58. xradio/measurement_set/_utils/_zarr/write.py +0 -329
  59. xradio/measurement_set/_utils/msv2.py +0 -106
  60. xradio/measurement_set/_utils/zarr.py +0 -133
  61. xradio-0.0.56.dist-info/RECORD +0 -78
  62. {xradio-0.0.56.dist-info → xradio-0.0.59.dist-info}/licenses/LICENSE.txt +0 -0
  63. {xradio-0.0.56.dist-info → xradio-0.0.59.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 a dict
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
 
@@ -154,40 +154,46 @@ class SchemaTableDirective(ObjectDescription):
154
154
  self.state.nested_parse(vl, 0, entry)
155
155
 
156
156
 
157
- def format_literals(typ):
157
+ def format_literals(literal) -> nodes.line:
158
158
 
159
- # a | b | c: Recurse and merge
160
- if typing.get_origin(typ) == typing.Union:
161
- type_args = typing.get_args(typ)
162
- options = []
163
- for arg in type_args:
164
- options += format_literals(arg)
165
- return options
159
+ if isinstance(literal, list) and all([isinstance(item, str) for item in literal]):
160
+ formatted_literal = [nodes.literal(text=f"'{val}'") for val in literal]
161
+ else:
162
+ raise ValueError(f"Must be a list of literal string values: {literal}")
166
163
 
167
- # Literal['a', 'b', ...]: Wrap into individual "literal" nodes
168
- if typing.get_origin(typ) == typing.Literal:
169
- return list(map(lambda t: nodes.literal(text=repr(t)), typing.get_args(typ)))
164
+ # Join the literals with ... , .. , .. , or ...
165
+ line = nodes.line()
166
+ for i, lit in enumerate(formatted_literal):
167
+ if i > 0:
168
+ if i + 1 >= len(formatted_literal):
169
+ line += nodes.Text(" or\xa0")
170
+ else:
171
+ line += nodes.Text(", ")
172
+ line += lit
170
173
 
171
- # list[Literal['a'], Literal['b'], ...]: Format as one literal (compound) value
172
- if typing.get_origin(typ) == list:
173
- type_args = typing.get_args(typ)
174
- if any([typing.get_origin(arg) != typing.Literal for arg in type_args]):
175
- raise ValueError(f"List must contain only literals: {typ}")
176
- values = [repr(typing.get_args(val)[0]) for val in typing.get_args(typ)]
177
- return [nodes.literal(text=f"[{', '.join(values)}]")]
174
+ return line
175
+
176
+
177
+ def format_class_types(state, attr_type) -> nodes.line:
178
+ line = nodes.line()
179
+ vl = StringList()
180
+ vl.append(f":py:class:`~{attr_type}`", "")
181
+ with switch_source_input(state, vl):
182
+ state.nested_parse(vl, 0, line)
178
183
 
179
- raise ValueError(f"Must be either a type or a literal: {typ}")
184
+ return line
180
185
 
181
186
 
182
- def format_attr_model_text(state, attr) -> StringList:
187
+ def format_attr_model_text(state, attr) -> nodes.line:
183
188
  """
184
- Formats the text for the 'model' column in schema tables (arrays and datasets).
189
+ For an attribute, formats the text for the 'model' column in schema tables
190
+ (arrays and datasets).
185
191
  Doesn't aim at supporting any literal types or combinations of types in general,
186
192
  but the following three ones specifically:
187
193
 
188
- - Literals (with multiple options (implicit Union of literals))
189
- - List of literals (e.g. ["rad","rad"]
190
- - Union of list of literals (e.g. ["m","m","m"]/["rad","rad","m"]
194
+ - String literals (units, frames, measure types, etc.)
195
+ - Other classes (for example usual built-in types such str, bool or ints,
196
+ or schema classes: schema dicts and schema arrays)
191
197
 
192
198
  This is meant to produce readable text listing literals as quoted text and
193
199
  their combinations, in schema attributes (particularly quantities and measures).
@@ -196,58 +202,16 @@ def format_attr_model_text(state, attr) -> StringList:
196
202
  type name.
197
203
  """
198
204
 
199
- type_args = typing.get_args(attr.typ)
200
- is_list_of_literals = typing.get_origin(attr.typ) is list and all(
201
- [typing.get_origin(arg) is typing.Literal for arg in type_args]
202
- )
203
-
204
- line = nodes.line()
205
-
206
- if not is_list_of_literals:
207
- # A type?
208
- if isinstance(attr.typ, type):
209
- vl = StringList()
210
- vl.append(f":py:class:`~{attr.typ.__module__}.{attr.typ.__name__}`", "")
211
- with switch_source_input(state, vl):
212
- state.nested_parse(vl, 0, line)
213
- return line
214
-
215
- if typing.get_origin(attr.typ) == typing.Union:
216
- vl = StringList()
217
- type_args = typing.get_args(attr.typ)
218
- options = []
219
- for i, arg in enumerate(type_args):
220
- vl.append(f":py:class:`~{arg.__module__}.{arg.__name__}`", "")
221
- if i + 1 < len(type_args):
222
- vl.append(" or ", "")
223
- with switch_source_input(state, vl):
224
- state.nested_parse(vl, 0, line)
225
- return line
226
-
227
- # Derived type, e.g. list of types?
228
- if typing.get_origin(attr.typ) == list and all(
229
- [isinstance(arg, type) for arg in type_args]
230
- ):
231
- vl = StringList()
232
- vl.append("[", "")
233
- for i, arg in enumerate(typing.get_args(attr.typ)):
234
- if i > 0:
235
- vl.append(", ", "")
236
- vl.append(f":py:class:`~{arg.__module__}.{arg.__name__}`", "")
237
- vl.append("]", "")
238
- with switch_source_input(state, vl):
239
- state.nested_parse(vl, 0, line)
240
- return line
241
-
242
- # Assume it's a literal of some kind - collect options
243
- literals = format_literals(attr.typ)
244
- for i, lit in enumerate(literals):
245
- if i > 0:
246
- if i + 1 >= len(literals):
247
- line += nodes.Text(" or\xa0")
248
- else:
249
- line += nodes.Text(", ")
250
- line += lit
205
+ if getattr(attr, "literal"):
206
+ line = format_literals(attr.literal)
207
+ else:
208
+ if getattr(attr, "dict_schema"):
209
+ attr_type = attr.dict_schema.schema_name
210
+ elif getattr(attr, "array_schema"):
211
+ attr_type = attr.array_schema.schema_name
212
+ else:
213
+ attr_type = attr.type
214
+ line = format_class_types(state, attr_type)
251
215
 
252
216
  return line
253
217
 
@@ -356,7 +320,7 @@ class DictSchemaTableDirective(SchemaTableDirective):
356
320
  for attr in schema.attributes:
357
321
  self._add_row(
358
322
  attr.name,
359
- types=[f"{attr.typ.__name__}"],
323
+ types=[attr.type],
360
324
  optional=attr.optional,
361
325
  descr=attr.docstring,
362
326
  default=attr.default,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xradio
3
- Version: 0.0.56
3
+ Version: 0.0.59
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
@@ -50,6 +50,7 @@ Requires-Dist: zarr<3,>=2
50
50
  Requires-Dist: pyarrow
51
51
  Requires-Dist: typeguard
52
52
  Requires-Dist: numcodecs<0.16
53
+ Requires-Dist: psutil
53
54
  Provides-Extra: test
54
55
  Requires-Dist: pytest; extra == "test"
55
56
  Requires-Dist: pytest-cov; extra == "test"
@@ -107,25 +108,32 @@ Xarray Radio Astronomy Data IO is still in development.
107
108
  [![Version Status](https://img.shields.io/pypi/v/xradio.svg)](https://pypi.python.org/pypi/xradio/)
108
109
 
109
110
  # Installing
110
- 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:
111
+ 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:
111
112
  ```sh
112
113
  conda create --name xradio python=3.12 --no-default-packages
113
114
  conda activate xradio
114
115
  ```
116
+ > 📝 On macOS it is required to pre-install `python-casacore` using `conda install -c conda-forge python-casacore`.
117
+
115
118
  XRADIO can now be installed using:
116
119
  ```sh
117
120
  pip install xradio
118
121
  ```
119
- This will also install the minimal dependencies for XRADIO. To install the minimal dependencies and the interactive components (JupyterLab) use:
122
+ This will also install the minimal dependencies for XRADIO.
123
+
124
+ Note that if only the minimal dependencies are installed, the functionality to convert MSv2 to MSv4 will not be available.
125
+ This requires installing `python-casacore` (also included in the `all` group, see below), or alternatively the
126
+ `casatools` backend, as explained in the [casatools I/O backend guide](docs/source/measurement_set/guides/backends.md).
127
+
128
+ To install the minimal dependencies and the interactive components (JupyterLab) use:
120
129
  ```sh
121
130
  pip install "xradio[interactive]"
122
131
  ```
132
+
123
133
  To enable conversion from MSv2 to MSv4 use (this only works for Linux):
124
134
  ```sh
125
135
  pip install "xradio[python-casacore]"
126
136
  ```
127
- > 📝 On macOS it is required to pre-install `python-casacore` using `conda install -c conda-forge python-casacore`.
128
-
129
137
  To be able to run tests:
130
138
  ```sh
131
139
  pip install "xradio[test]"
@@ -134,3 +142,10 @@ Multiple-dependencies can be installed using:
134
142
  ```sh
135
143
  pip install "xradio[interactive,python-casacore,test]"
136
144
  ```
145
+
146
+ To install a more complete set of dependencies:
147
+ ```sh
148
+ pip install "xradio[all]"
149
+ ```
150
+ This will include the dependencies required to run the interactive Jupyter notebooks, run tests, build documentation,
151
+ and python-casacore to enable MSv2=>MSv4 functionality.
@@ -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=KHfm0AvjpLDLXHCOCtp51oFGwbrUVA2vKh6ZZ2sWK2M,12234
31
+ xradio/measurement_set/open_processing_set.py,sha256=yfXhs1co8UBf4-m7LLAnc7lV2hFvGKV-HwQ_yAcusH8,5243
32
+ xradio/measurement_set/processing_set_xdt.py,sha256=4ZnYT-hYw2upEil_jViOKptmi4JWrnbPOyAOQffd5Ek,34295
33
+ xradio/measurement_set/schema.py,sha256=C32tb7gNIgOZvvr9b3uF5tODqXfbpOQPECI3dgr-udA,90729
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=rPokAkZ7_4oJOOZ_byEv4nSL14L9oV5kbpj1yopgTjw,54089
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=HSmeR2BZvsVBPp7ySUgFIR_LXQ0-fLu9cFd_ScsJgZ0,33523
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=6BXZkypfe1C4n5bQDtxMdY0qnVuO3DDjtwDLUwtUOow,30453
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=JJg8x0PiNQ7zX04XBqg8l_AIAK1SDv8mRp8HJxYd1Rw,21942
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=4Pnymp34Pli2mQU_3LEBIx-2TUtlza-ZRwXLzBm1SjA,4859
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=CrhWMDYHwB7CbBMGfWtW20bLoBkeQZHd6l91cihvaBA,10709
61
+ xradio-0.0.59.dist-info/licenses/LICENSE.txt,sha256=9CYIJt7riOXo9AD0eXBZviLxo_HebD-2JJI8oiWtzfg,1807
62
+ xradio-0.0.59.dist-info/METADATA,sha256=ZBTavpFX7VvjtRZkANWIZO1jKxsRc2WrXwETbo91JN4,7513
63
+ xradio-0.0.59.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
64
+ xradio-0.0.59.dist-info/top_level.txt,sha256=dQu27fGBZJ2Yk-gW5XeD-dZ76Xa4Xcvk60Vz-dwXp7k,7
65
+ xradio-0.0.59.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.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,66 +0,0 @@
1
- from typing import Tuple
2
-
3
- import numpy as np
4
-
5
- try:
6
- from casacore import tables
7
- except ImportError:
8
- import xradio._utils._casacore.casacore_from_casatools as tables
9
- from ....._utils.common import get_pad_value
10
-
11
-
12
- def load_col_chunk(
13
- tb_tool: tables.table,
14
- col: str,
15
- cshape: Tuple[int],
16
- tidxs: np.ndarray,
17
- bidxs: np.ndarray,
18
- didxs: np.ndarray,
19
- d1: Tuple[int, int],
20
- d2: Tuple[int, int],
21
- ) -> np.ndarray:
22
- """
23
- Loads a slice of a col (using casacore getcol(slice))
24
-
25
- Parameters
26
- ----------
27
- tb_tool : tables.table
28
- a table/TaQL query open and being used to load columns
29
- col : str
30
- colum to load
31
- cshape : Tuple[int]
32
- shape of the resulting col data chunk
33
- tidxs : np.ndarray
34
- time axis indices
35
- bidxs : np.ndarray
36
- baseline axis indices
37
- didxs : np.ndarray
38
- effective) data indices, excluding missing baselines
39
- d1 : Tuple[int, int]
40
- indices to load on dimension 1 (None=all, pols or chans)
41
- d2 : Tuple[int, int]
42
- indices to load on dimension 2 (None=all, pols)
43
-
44
- Returns
45
- -------
46
- np.ndarray
47
- data array loaded directly with casacore getcol/getcolslice
48
- """
49
-
50
- if (len(cshape) == 2) or (col == "UVW"):
51
- # all the scalars and UVW
52
- data = np.array(tb_tool.getcol(col, 0, -1))
53
- elif len(cshape) == 3:
54
- # WEIGHT, SIGMA
55
- data = tb_tool.getcolslice(col, d1[0], d1[1], [], 0, -1)
56
- elif len(cshape) == 4:
57
- # DATA, FLAG, WEIGHT_SPECTRUM / SIGMA_SPECTRUM
58
- data = tb_tool.getcolslice(col, (d1[0], d2[0]), (d1[1], d2[1]), [], 0, -1)
59
-
60
- # full data is the maximum of the data shape and chunk shape dimensions
61
- fill_value = get_pad_value(data.dtype)
62
- chunk = np.full(cshape, np.fill_value, dtype=data.dtype)
63
- if len(didxs) > 0:
64
- chunk[tidxs[didxs], bidxs[didxs]] = data[didxs]
65
-
66
- return chunk