xradio 1.1.0__py3-none-any.whl → 1.1.12a0__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.
- xradio/_utils/zarr/common.py +1 -0
- xradio/image/_util/_casacore/xds_from_casacore.py +6 -5
- xradio/image/_util/_zarr/common.py +1 -0
- xradio/image/_util/casacore.py +1 -0
- xradio/image/_util/image_factory.py +1 -10
- xradio/measurement_set/_utils/_msv2/_tables/read.py +3 -7
- xradio/measurement_set/_utils/_msv2/create_field_and_source_xds.py +0 -1
- xradio/measurement_set/_utils/_msv2/msv4_sub_xdss.py +1 -1
- xradio/measurement_set/_utils/_utils/interpolate.py +0 -5
- xradio/measurement_set/_utils/_utils/partition_attrs.py +1 -0
- xradio/schema/common.py +1 -0
- xradio/testing/measurement_set/msv2_io.py +1 -0
- {xradio-1.1.0.dist-info → xradio-1.1.12a0.dist-info}/METADATA +1 -1
- {xradio-1.1.0.dist-info → xradio-1.1.12a0.dist-info}/RECORD +17 -17
- {xradio-1.1.0.dist-info → xradio-1.1.12a0.dist-info}/WHEEL +1 -1
- {xradio-1.1.0.dist-info → xradio-1.1.12a0.dist-info}/licenses/LICENSE.txt +0 -0
- {xradio-1.1.0.dist-info → xradio-1.1.12a0.dist-info}/top_level.txt +0 -0
xradio/_utils/zarr/common.py
CHANGED
|
@@ -381,12 +381,14 @@ def _casa_image_to_xds_coords(
|
|
|
381
381
|
attrs["sphr_dims"] = sphr_dims
|
|
382
382
|
coords = {}
|
|
383
383
|
coord_attrs = {}
|
|
384
|
-
coords["time"], coord_attrs["time"] = _get_time_values_attrs(coord_dict)
|
|
385
|
-
coords["frequency"], coord_attrs["frequency"] = _get_freq_values_attrs(
|
|
386
|
-
|
|
384
|
+
(coords["time"], coord_attrs["time"]) = _get_time_values_attrs(coord_dict)
|
|
385
|
+
(coords["frequency"], coord_attrs["frequency"]) = _get_freq_values_attrs(
|
|
386
|
+
csys, shape
|
|
387
|
+
)
|
|
388
|
+
(velocity_vals, coord_attrs["velocity"]) = _get_velocity_values_attrs(
|
|
387
389
|
coord_dict, coords["frequency"]
|
|
388
390
|
)
|
|
389
|
-
coords["polarization"], coord_attrs["polarization"] = _get_pol_values_attrs(
|
|
391
|
+
(coords["polarization"], coord_attrs["polarization"]) = _get_pol_values_attrs(
|
|
390
392
|
coord_dict
|
|
391
393
|
)
|
|
392
394
|
coords["velocity"] = (["frequency"], velocity_vals)
|
|
@@ -683,7 +685,6 @@ def _get_persistent_block(
|
|
|
683
685
|
block = _read_image_chunk(infile, shapes, starts)
|
|
684
686
|
block = np.expand_dims(block, new_axes)
|
|
685
687
|
block = block.transpose(transpose_list)
|
|
686
|
-
block = da.from_array(block, chunks=block.shape)
|
|
687
688
|
block = xr.DataArray(block, dims=dimorder)
|
|
688
689
|
return block
|
|
689
690
|
|
xradio/image/_util/casacore.py
CHANGED
|
@@ -202,6 +202,7 @@ def _xds_to_multiple_casa_images(xds: xr.Dataset, image_store_name: str) -> None
|
|
|
202
202
|
]
|
|
203
203
|
|
|
204
204
|
if "flag" in xds.attrs["data_groups"][data_group]:
|
|
205
|
+
print("******* found flag")
|
|
205
206
|
mask_sky_name = xds.attrs["data_groups"][data_group]["flag"]
|
|
206
207
|
image_to_write_xds["MASK_0"] = xds[mask_sky_name]
|
|
207
208
|
image_to_write_xds["SKY"].attrs["flag"] = "MASK_0"
|
|
@@ -337,16 +337,7 @@ def detect_store_type(store):
|
|
|
337
337
|
raise ValueError("Unknown directory structure." + str(store))
|
|
338
338
|
else:
|
|
339
339
|
logger.error("Path does not exist.")
|
|
340
|
-
raise ValueError(
|
|
341
|
-
"Path does not exist. The current path: "
|
|
342
|
-
+ str(os.system("pwd"))
|
|
343
|
-
+ " .The current casa directory: "
|
|
344
|
-
+ str(os.system("ls 3c286_Band6_5chans_lsrk_robust_0.5_niter_99_casa"))
|
|
345
|
-
+ ". The current fits directory: "
|
|
346
|
-
+ str(os.system("ls 3c286_Band6_5chans_lsrk_robust_0.5_niter_99_fits"))
|
|
347
|
-
+ " The given store "
|
|
348
|
-
+ str(store)
|
|
349
|
-
)
|
|
340
|
+
raise ValueError("Path does not exist." + str(store))
|
|
350
341
|
else:
|
|
351
342
|
store_type = "zarr"
|
|
352
343
|
|
|
@@ -93,12 +93,9 @@ def convert_mjd_time(rawtimes: np.ndarray) -> np.ndarray:
|
|
|
93
93
|
np.ndarray
|
|
94
94
|
times converted to pandas reference and datetime type
|
|
95
95
|
"""
|
|
96
|
-
|
|
97
|
-
print("^^^^^^^", rawtimes, MJD_DIF_UNIX, SECS_IN_DAY)
|
|
98
96
|
times_reref = pd.to_datetime(
|
|
99
97
|
(rawtimes - MJD_DIF_UNIX) * SECS_IN_DAY, unit="s"
|
|
100
98
|
).values
|
|
101
|
-
print("^^^^^^^", times_reref)
|
|
102
99
|
|
|
103
100
|
return times_reref
|
|
104
101
|
|
|
@@ -163,7 +160,7 @@ def make_taql_where_between_min_max(
|
|
|
163
160
|
if min_max_range is None:
|
|
164
161
|
taql = None
|
|
165
162
|
else:
|
|
166
|
-
min_val, max_val = min_max_range
|
|
163
|
+
(min_val, max_val) = min_max_range
|
|
167
164
|
taql = f"where {colname} >= {min_val} AND {colname} <= {max_val}"
|
|
168
165
|
|
|
169
166
|
return taql
|
|
@@ -229,7 +226,7 @@ def find_projected_min_max_array(
|
|
|
229
226
|
"""Does the min/max checks and search for find_projected_min_max_table()"""
|
|
230
227
|
|
|
231
228
|
sorted_array = np.sort(array)
|
|
232
|
-
range_min, range_max = min_max
|
|
229
|
+
(range_min, range_max) = min_max
|
|
233
230
|
if len(sorted_array) < 2:
|
|
234
231
|
tol = np.finfo(sorted_array.dtype).eps * 4
|
|
235
232
|
else:
|
|
@@ -894,8 +891,7 @@ def raw_col_data_to_coords_vars(
|
|
|
894
891
|
|
|
895
892
|
if col in timecols:
|
|
896
893
|
if col == "MJD":
|
|
897
|
-
|
|
898
|
-
data = convert_mjd_time(data).astype("datetime64[ns]").view("int64") / 1e9
|
|
894
|
+
data = convert_mjd_time(data).astype("float64") / 1e9
|
|
899
895
|
else:
|
|
900
896
|
try:
|
|
901
897
|
data = convert_casacore_time(data, False)
|
|
@@ -285,7 +285,6 @@ def extract_ephemeris_info(
|
|
|
285
285
|
# Metadata has to be fixed manually. Alternatively, issues like
|
|
286
286
|
# UNIT/QuantumUnits issue could be handled in convert_generic_xds_to_xradio_schema,
|
|
287
287
|
# but for now preferring not to pollute that function.
|
|
288
|
-
|
|
289
288
|
time_ephemeris_dim = ["time_ephemeris"]
|
|
290
289
|
to_new_data_variables = {
|
|
291
290
|
# mandatory: SOURCE_RADIAL_VELOCITY
|
|
@@ -27,6 +27,7 @@ from xradio.measurement_set._utils._msv2._tables.read import (
|
|
|
27
27
|
table_has_column,
|
|
28
28
|
)
|
|
29
29
|
|
|
30
|
+
|
|
30
31
|
standard_time_coord_attrs = make_time_measure_attrs(time_format="unix")
|
|
31
32
|
|
|
32
33
|
|
|
@@ -80,7 +81,6 @@ def rename_and_interpolate_to_time(
|
|
|
80
81
|
)
|
|
81
82
|
|
|
82
83
|
# rename the time_* axis to time.
|
|
83
|
-
|
|
84
84
|
time_coord = {"time": (time_initial_name, interp_time.data)}
|
|
85
85
|
renamed_time_xds = interpolated_xds.assign_coords(time_coord)
|
|
86
86
|
renamed_time_xds.coords["time"].attrs.update(standard_time_coord_attrs)
|
|
@@ -41,10 +41,6 @@ def interpolate_to_time(
|
|
|
41
41
|
method = "linear"
|
|
42
42
|
else:
|
|
43
43
|
method = "nearest"
|
|
44
|
-
|
|
45
|
-
# print("xds before interp:",xds.NORTH_POLE_ANGULAR_DISTANCE.values, xds[time_name].values)
|
|
46
|
-
# print("interp_time data:",interp_time,interp_time.data)
|
|
47
|
-
# print("method:",method)
|
|
48
44
|
xds = xds.interp(
|
|
49
45
|
{time_name: interp_time.data}, method=method, assume_sorted=True
|
|
50
46
|
)
|
|
@@ -60,6 +56,5 @@ def interpolate_to_time(
|
|
|
60
56
|
f"{message_prefix}: interpolating the time coordinate "
|
|
61
57
|
f"from {points_before} to {points_after} points"
|
|
62
58
|
)
|
|
63
|
-
# print("xds after interp:",xds.NORTH_POLE_ANGULAR_DISTANCE.values, xds[time_name].values)
|
|
64
59
|
|
|
65
60
|
return xds
|
xradio/schema/common.py
CHANGED
|
@@ -19,6 +19,7 @@ from casacore.tables import default_ms, default_ms_subtable
|
|
|
19
19
|
from casacore.tables.tableutil import makedminfo, maketabdesc
|
|
20
20
|
from casacore.tables.msutil import complete_ms_desc, makearrcoldesc, required_ms_desc
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
# 2 observations, 2 fields, 2 states
|
|
23
24
|
# 2 SPWs, 4 polarizations
|
|
24
25
|
default_ms_descr = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xradio
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.12a0
|
|
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
|
|
@@ -8,22 +8,22 @@ xradio/_utils/xarray_helpers.py,sha256=LQyh754BRFvKz8xP0CF_nWBj0s2HI5KVUz7c1YxC3
|
|
|
8
8
|
xradio/_utils/_casacore/casacore_from_casatools.py,sha256=lpkiDVj6eXpxY07xwTOwZba_Mw-g2uOAdspOdfPVVtE,31208
|
|
9
9
|
xradio/_utils/_casacore/tables.py,sha256=puRidbjtVx6caEG_Z5TebTLdTUbtBUhzvqByKLQTHfo,1389
|
|
10
10
|
xradio/_utils/zarr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
xradio/_utils/zarr/common.py,sha256=
|
|
11
|
+
xradio/_utils/zarr/common.py,sha256=Gy4Nl4JrISzLlBq8QqLwuWYUS7eDsgT3q9s2dhrNiNc,2990
|
|
12
12
|
xradio/image/__init__.py,sha256=s18tPMOv0VLW7zrq9cQ_gOb577YXfqfK8ZMhA63LGH0,468
|
|
13
13
|
xradio/image/image.py,sha256=SuEc0G4MRIOAv--qSPo2jMfJhJlHGA-nr3LdSA_Sykk,15366
|
|
14
14
|
xradio/image/image_xds.py,sha256=-RS3wM6uSspZSu50jaPgopUYQQbU8KgQSBUt6sh7XuE,9169
|
|
15
15
|
xradio/image/schema.py,sha256=S3FkclHMLucgw3ciTpqdc9x1P--ZxwhJZis5lyW7XcM,6043
|
|
16
16
|
xradio/image/_util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
xradio/image/_util/casacore.py,sha256=
|
|
17
|
+
xradio/image/_util/casacore.py,sha256=TpMdAl69ag8fGqYMaa9iJ98bEx_gXg-y3NdV_d_42hI,10084
|
|
18
18
|
xradio/image/_util/common.py,sha256=lcxletfv18zUUJgG8Qs_fV-VdON3D3xJIo5r97be6FU,8490
|
|
19
|
-
xradio/image/_util/image_factory.py,sha256=
|
|
19
|
+
xradio/image/_util/image_factory.py,sha256=51hUnwBSQaMK5KucW8tlNkbvDVwJaVNgV97T_KneFug,24484
|
|
20
20
|
xradio/image/_util/zarr.py,sha256=lhQqVRC1GEWClG3zRbuDr2IlQBfXeDqaLUJIN-MVMxA,1652
|
|
21
21
|
xradio/image/_util/_casacore/__init__.py,sha256=OlsiRE40o1jSbBI4khgQQzgfDYbAlOMKIhO4UFlbGhg,41
|
|
22
22
|
xradio/image/_util/_casacore/common.py,sha256=PHt7SNllwYW70w9pEhLrcCZ7avoZNmwKxTSnhSQQtOU,1793
|
|
23
|
-
xradio/image/_util/_casacore/xds_from_casacore.py,sha256=
|
|
23
|
+
xradio/image/_util/_casacore/xds_from_casacore.py,sha256=0gAxdwINDCoFsTdSQIRYu8MCxm-oc-mLtv7YJADybN8,45882
|
|
24
24
|
xradio/image/_util/_casacore/xds_to_casacore.py,sha256=dltoHo9TRklbxjcSkiGu6KaSehNQarGqo3lBSCiOhAw,20331
|
|
25
25
|
xradio/image/_util/_fits/xds_from_fits.py,sha256=U5bskcCCsQAUn8spJ6fxXtgGIiGaNflK4yS26x6KH9o,38221
|
|
26
|
-
xradio/image/_util/_zarr/common.py,sha256=
|
|
26
|
+
xradio/image/_util/_zarr/common.py,sha256=ltlj3uFa-uv8lXlDtV79QnfNmfm0tyhXN5FDAjZtjzg,308
|
|
27
27
|
xradio/image/_util/_zarr/xds_from_zarr.py,sha256=KMsfaSSm9kyVoztS6pUzGNxMZzQnCxkk0kDv2GxW5Kw,4451
|
|
28
28
|
xradio/image/_util/_zarr/xds_to_zarr.py,sha256=nsDvDD-kuMuMF2dDlj0jTxSW4mdR-jjIsvXHi5uIERU,2373
|
|
29
29
|
xradio/image/_util/_zarr/zarr_low_level.py,sha256=xnYm6EmVbmLxMlOSXH32SABfQBLHfr2H9ch9gYwFNXs,13338
|
|
@@ -38,24 +38,24 @@ xradio/measurement_set/_utils/__init__.py,sha256=iTbgPiQPw9hyXSdQYPcwGRrP2PFXgF6
|
|
|
38
38
|
xradio/measurement_set/_utils/_msv2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
xradio/measurement_set/_utils/_msv2/conversion.py,sha256=2ASFGgF2L-JiYzFTQhUd3QvTdqPRjd1I_oy87AfQf5g,54836
|
|
40
40
|
xradio/measurement_set/_utils/_msv2/create_antenna_xds.py,sha256=s3HnTbyOl7h6pAocJ4dpd095s7qHSSngeQ34Ygo8Uk0,17650
|
|
41
|
-
xradio/measurement_set/_utils/_msv2/create_field_and_source_xds.py,sha256=
|
|
41
|
+
xradio/measurement_set/_utils/_msv2/create_field_and_source_xds.py,sha256=k5pJhIafu9QANaX9-pdJ1fOqGOtplHxR2Ve9xBCf3dA,33557
|
|
42
42
|
xradio/measurement_set/_utils/_msv2/msv2_to_msv4_meta.py,sha256=ZpxJJ2yTjjEy6A4XWS9eT-1J92jLwR8CNyoDBfhAVm8,1572
|
|
43
43
|
xradio/measurement_set/_utils/_msv2/msv4_info_dicts.py,sha256=cMgD6EB1pRShL6TBVSpom0VhkqTnsYNi9vxz_gfgGtU,11952
|
|
44
|
-
xradio/measurement_set/_utils/_msv2/msv4_sub_xdss.py,sha256=
|
|
44
|
+
xradio/measurement_set/_utils/_msv2/msv4_sub_xdss.py,sha256=6BXZkypfe1C4n5bQDtxMdY0qnVuO3DDjtwDLUwtUOow,30453
|
|
45
45
|
xradio/measurement_set/_utils/_msv2/optimised_functions.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
46
|
xradio/measurement_set/_utils/_msv2/partition_queries.py,sha256=_eWxxgxEYRX1Pj1ZFHD_HIcrF9Rpfe6OJmp3uYJ2UiY,11970
|
|
47
47
|
xradio/measurement_set/_utils/_msv2/subtables.py,sha256=mrf7g7mbC4crtnQ0wFocPcFRNlvq_7e7iDzE5B6ugl4,843
|
|
48
|
-
xradio/measurement_set/_utils/_msv2/_tables/read.py,sha256=
|
|
48
|
+
xradio/measurement_set/_utils/_msv2/_tables/read.py,sha256=tW0ROevR4tXpydIWuj2UyNhWNtvkKU9NkYxMi1ZoVKc,45421
|
|
49
49
|
xradio/measurement_set/_utils/_msv2/_tables/read_main_table.py,sha256=FFoTVpY8JNvcXnTvUiraWNU9gB9-_9GR7he0NbODabg,3168
|
|
50
50
|
xradio/measurement_set/_utils/_msv2/_tables/table_query.py,sha256=Uc1zeiU-rYtCsYXpij8jzFG5NPBYvIh70qW1srn7B98,1498
|
|
51
|
-
xradio/measurement_set/_utils/_utils/interpolate.py,sha256=
|
|
52
|
-
xradio/measurement_set/_utils/_utils/partition_attrs.py,sha256=
|
|
51
|
+
xradio/measurement_set/_utils/_utils/interpolate.py,sha256=LlDYi-h7aj_tsuZqAu5Kr-vOi6fVBPpVbew-i-HnmA0,1962
|
|
52
|
+
xradio/measurement_set/_utils/_utils/partition_attrs.py,sha256=JaePHts_A0EbB4K-0a_uC98RZ2EmfjB9pDSEI11oAwk,3401
|
|
53
53
|
xradio/measurement_set/_utils/_utils/stokes_types.py,sha256=DMa8TmmS7BQ99Xm8c7ZjcRapMtLbrKVxrt4f0qUIOvg,561
|
|
54
54
|
xradio/measurement_set/_utils/_zarr/encoding.py,sha256=ze5ncHEBa-sVwJCayJa2irOdaxZEkYfBKObuij7uVRc,371
|
|
55
55
|
xradio/schema/__init__.py,sha256=tJqTUSwkwvkak_6eAZqhT5BQqunlfxciG07-y8uSrMY,683
|
|
56
56
|
xradio/schema/bases.py,sha256=TRwvOo2UA7ki-yV1Vcb5aDxAAxH2lTKtwoGx2m5VB4o,17512
|
|
57
57
|
xradio/schema/check.py,sha256=6bndBpmzkdiM3Ca1lquYEDb65H2ZZOGp2xQyIjqNHqU,23804
|
|
58
|
-
xradio/schema/common.py,sha256=
|
|
58
|
+
xradio/schema/common.py,sha256=Hi2vT8s0za0J7FfA0OhzrGdtwjJ5eQWH7x3hfhBCOuo,2016
|
|
59
59
|
xradio/schema/dataclass.py,sha256=gzNqXzkBLV7ETEyddNOd_jRgP8rkivCkfUlURLz8z5c,19300
|
|
60
60
|
xradio/schema/export.py,sha256=qN8O8Wc9FtrYbiEmg1u66cN4coY_8QVHrZfb-oHhYp0,3510
|
|
61
61
|
xradio/schema/metamodel.py,sha256=F0lxnn0wLrsT2HrBo2zfIcmRLxD2yQwh7XfDciPNwVs,4963
|
|
@@ -67,9 +67,9 @@ xradio/testing/_utils/__template__.py,sha256=1A3WJ2dcQwiIsxHqJscvn1Pmff7FhUXXxbp
|
|
|
67
67
|
xradio/testing/measurement_set/__init__.py,sha256=Vjk_959ZT48O7JRwXnUrIC3YvTH8GnrNRbee-RLjDco,1618
|
|
68
68
|
xradio/testing/measurement_set/checker.py,sha256=39wbX0xcLm6gsPiVTASbOciuoF_WzGOAcVe-7wir0Xg,4566
|
|
69
69
|
xradio/testing/measurement_set/io.py,sha256=A3m6tm2Rvoacw8-SO3UhNboEek1YeDCMguwHClUIqn4,559
|
|
70
|
-
xradio/testing/measurement_set/msv2_io.py,sha256=
|
|
71
|
-
xradio-1.1.
|
|
72
|
-
xradio-1.1.
|
|
73
|
-
xradio-1.1.
|
|
74
|
-
xradio-1.1.
|
|
75
|
-
xradio-1.1.
|
|
70
|
+
xradio/testing/measurement_set/msv2_io.py,sha256=D6ffVOwcFcWtHJWzxOPg5J1zWh_rKsbPsgYjvdXjOos,59714
|
|
71
|
+
xradio-1.1.12a0.dist-info/licenses/LICENSE.txt,sha256=9CYIJt7riOXo9AD0eXBZviLxo_HebD-2JJI8oiWtzfg,1807
|
|
72
|
+
xradio-1.1.12a0.dist-info/METADATA,sha256=HXt_FY9cTsB8bzaeTbkPhBS-M265fI2dq-QuM5jpiCE,9747
|
|
73
|
+
xradio-1.1.12a0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
74
|
+
xradio-1.1.12a0.dist-info/top_level.txt,sha256=dQu27fGBZJ2Yk-gW5XeD-dZ76Xa4Xcvk60Vz-dwXp7k,7
|
|
75
|
+
xradio-1.1.12a0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|