casangi / xradio

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

Small fixes for corner case MSs from casatestdata #185

Closed FedeMPouzols closed 6 days ago

FedeMPouzols commented 2 weeks ago

This is to add a few small fixes that are needed to be able to convert or read/write without errors all the test MSs included in the CASA 'casatestdata/measurementset'.

In particular it seems that relatively recent updates in xarray have changed the behavior of functions in such a way that we have to be more cautious in cases such as duplicate keys in weather, pointing, etc. tables. This issue produces exceptions from xarray like: Cannot expand rows to ['antenna_id', 'time'], possibly duplicate values in those coordinates. Exception: Cannot unstack MultiIndex containing duplicates. Make sure entries are unique, e.g., by calling ``.drop_duplicates('row')``, before unstacking

Fixes to include in the branch of this issue, for now: