casangi / astrohack

Antenna panel and position corrections.
https://astrohack.readthedocs.io/
GNU General Public License v3.0
9 stars 3 forks source link

Solve Xarray deprecation warning when using holog_mds.plot_lm_sky_coverage #243

Closed vsmagalhaes closed 5 months ago

vsmagalhaes commented 5 months ago

When running the plot_lm_sky_coverage method of the holog_mds objects the following warning is encountered twice:

/home/victor/work/Holography-1022/astrohack/src/astrohack/visualization/diagnostics.py:676: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
  if input_xds.dims['chan'] != 1:
/home/victor/work/Holography-1022/astrohack/src/astrohack/visualization/diagnostics.py:679: FutureWarning: The return type of `Dataset.dims` will be changed to return a set of dimension names in future, in order to be more consistent with `DataArray.dims`. To access a mapping from dimension names to lengths, please use `Dataset.sizes`.
  if input_xds.dims['time'] != 1:
vsmagalhaes commented 5 months ago

This only shows up in python versions >= 3.10