Closed miguelcarcamov closed 1 year ago
Hi @miguelcarcamov. The following works for me with dask-ms==0.2.15
, python==3.9.15
and one of my local MS:
$ virtualenv -p python3.9 dask-ms
$ source dask-ms/bin/activate
(dask-ms) $ pip install dask-ms[complete]==0.2.15
(dask-ms) $ python
Python 3.9.15 (main, Oct 12 2022, 19:14:24)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from daskms import xds_from_table
>>> ants = xds_from_table("~/data/WSRT_polar.MS_p0::ANTENNA")[0]
>>> ants
<xarray.Dataset>
Dimensions: (row: 14, xyz: 3)
Coordinates:
ROWID (row) int64 dask.array<chunksize=(14,), meta=np.ndarray>
Dimensions without coordinates: row, xyz
Data variables:
OFFSET (row, xyz) float64 dask.array<chunksize=(14, 3), meta=np.ndarray>
POSITION (row, xyz) float64 dask.array<chunksize=(14, 3), meta=np.ndarray>
FLAG_ROW (row) bool dask.array<chunksize=(14,), meta=np.ndarray>
NAME (row) object dask.array<chunksize=(14,), meta=np.ndarray>
STATION (row) object dask.array<chunksize=(14,), meta=np.ndarray>
TYPE (row) object dask.array<chunksize=(14,), meta=np.ndarray>
DISH_DIAMETER (row) float64 dask.array<chunksize=(14,), meta=np.ndarray>
MOUNT (row) object dask.array<chunksize=(14,), meta=np.ndarray>
Attributes:
__daskms_partition_schema__: ()
>>>
I've changed the installation to dask-ms[complete] and now it works. Before I had it just with dask-ms[xarray].
I've changed the installation to dask-ms[complete] and now it works. Before I had it just with dask-ms[xarray].
Thanks, thats useful information. I've just tried with a base install and I get the following (note, no xarray Dataset, dask-ms's vendored Dataset is provided instead):
$ virtualenv -p python3.9 dask-ms
$ source dask-ms/bin/activate
(dask-ms) $ pip install dask-ms==0.2.15
(dask-ms) $ python
Python 3.9.15 (main, Oct 12 2022, 19:14:24)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from daskms import xds_from_table
>>> ants = xds_from_table("~/data/WSRT_polar.MS_p0::ANTENNA")[0]
>>> ants
<daskms.dataset.Dataset object at 0x7f0a4de68f10>
>>>
I wonder if there's some strange interaction between xarray and fsspec.
I wonder if there's some strange interaction between xarray and fsspec.
A pip install dask-ms[xarray]==0.2.15
also works for me.
Are you sure your virtual environment might not be misconfigured somehow?
Maybe - I had to uninstall everything and then install everything from zero for dask-ms to work. Maybe there were misconfigurations and inconsistencies in my environment. I will close this issue. Sorry for the inconveniences :).
Maybe - I had to uninstall everything and then install everything from zero for dask-ms to work. Maybe there were misconfigurations and inconsistencies in my environment. I will close this issue. Sorry for the inconveniences :).
No problem. I would guess there was an outdated fsspec version in the environment.
Hello,
I've been seeing this error since dask-ms version 0.2.10. The error is triggered when reading the ANTENNA table or any subtable. This piece of code:
antennas = xds_from_table(self.ms_name_dask + "ANTENNA", taql_where=taql_query_flag_row)[0]
can be translated to
antennas = xds_from_table("ms_file.ms::ANTENNA", taql_where="!FLAG_ROW")[0]
This is the error per se.
How can I fix this?
Cheers.