casangi / xradio

Xarray Radio Astronomy Data IO
Other
9 stars 5 forks source link

antenna_xds loaded twice in load_processing_set() #137

Closed FedeMPouzols closed 1 month ago

FedeMPouzols commented 4 months ago

Fix:

diff --git a/src/xradio/vis/load_processing_set.py b/src/xradio/vis/load_processing_set.py
index a077c1e..2e5427b 100644
--- a/src/xradio/vis/load_processing_set.py
+++ b/src/xradio/vis/load_processing_set.py
@@ -68,9 +68,6 @@ def _load_ms_xds_core(ms_xds_name, slice_dict):
     ms_xds = _load_no_dask_zarr(
         zarr_name=os.path.join(ms_xds_name, "MAIN"), slice_dict=slice_dict
     )
-    ms_xds.attrs["antenna_xds"] = _load_no_dask_zarr(
-        zarr_name=os.path.join(ms_xds_name, "ANTENNA")
-    )
     sub_xds = {
         "antenna_xds": "ANTENNA",
         "pointing_xds": "POINTING",

When the weather_xds was introduced this was an oversight (and then the fix got lost in between PRs). This fix probably makes better sense after #136, and not before.

FedeMPouzols commented 1 month ago

This is no longer an issue, as it is now fixed in read_processing_set.py:_read_sub_xds().