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:
[x] use explicitly drop_duplicates or similar when redimensioning subtables. This is to be able to deal with rows with duplicate keys. Examples with this issue: X425.pm04.scan4.ms (ALMA), analytic_variable.ms (GBT)
[x] Fix issues in the taql_where of read_flat_main_table. this "flat" reading alternative is anyway not used and probably never going to be used anymore -to be removed- but to keep it working for now in exhaustive tests through casatestdata).
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:
[x] use explicitly
drop_duplicates
or similar when redimensioning subtables. This is to be able to deal with rows with duplicate keys. Examples with this issue:X425.pm04.scan4.ms
(ALMA),analytic_variable.ms
(GBT)[x] Fix issues in the taql_where of read_flat_main_table. this "flat" reading alternative is anyway not used and probably never going to be used anymore -to be removed- but to keep it working for now in exhaustive tests through casatestdata).