dask-ms
dask-ms copied to clipboard
Support dimension ID coordinates (ROWID++)
-
[ ] Tests added / passed
$ py.test -v -s daskms/tests
If the pep8 tests fail, the quickest way to correct this is to run
autopep8
and thenflake8
andpycodestyle
to fix the remaining issues.$ pip install -U autopep8 flake8 pycodestyle $ autopep8 -r -i daskms $ flake8 daskms $ pycodestyle daskms
-
[ ] Fully documented, including
HISTORY.rst
for all changes and one of thedocs/*-api.rst
files for new APITo build the docs locally:
pip install -r requirements.readthedocs.txt cd docs READTHEDOCS=True make html
This PR adds generic ID coordinates to datasets read by dask-ms
. This extends the existing ROWID functionality to all dimensions. The advantage of this approach is that it becomes possible to leverage the excellent xarray selection mechanisms without making writing to disk complicated e.g. a user may select and write out a channel subset without having to coerce the selected data into the same shape as the original.
Currently, the new functionality works for multidimensional arrays but there remain a number of issues:
- [x] Previous code relied on absence of chunking in non-row dimensions to trigger
putcol
behaviour. This is not safe when using IDs as a single chunk may correspond to multiple locations on disk. - [x] New code always generates
dim_runs
(extension ofrow_runs
), regardless of chunking/data type. This currently causes dictionary writes to fail. - [ ] New code may end up using slower
putcolslice
unnecessarily in some cases. - [ ] Changes do not make use of
inlined_array
due to mysterious bugs occurring in testing. This likely needs to be addressed for the purposes of maintaining a tidy graph. - [ ] Test suite needs to be substantially improved.
- [ ] Changes currently break arrow schemas.