Closed sjperkins closed 4 years ago
@o-smirnov @bennahugo @IanHeywood @JSKenyon @smasoka @rubyvanrooyen
Primarily with https://github.com/ska-sa/tricolour/issues/70 in mind but might be useful elsewhere:
Code snippet:
datasets = xds_from_ms("WSRT.MS")
datasets = data_column_expr("2 * DATA / (DIR1_DATA + DIR2_DATA)", datasets)
consume(datasets[0].DATA_EXPRESSION.data)
and @landmanbester of course
Changed to support assignments:
datasets = xds_from_ms("WSRT.MS")
datasets = data_column_expr("EXPR = 2 * DATA / (DIR1_DATA + DIR2_DATA)", datasets)
consume(datasets[0].EXPR.data)
This is an absolutely awesome change, much more powerful than my simple binary arithmetic. I look forward to supporting this in shadeMS!
It supports a simple calculator syntax at the moment (no functions), but it could always be expanded later.
OK this is percolating in master if people wish to try it out. I've also exposed the docstrings on readthedocs.io
[x] Tests added / passed
If the pep8 tests fail, the quickest way to correct this is to run
autopep8
and thenflake8
andpycodestyle
to fix the remaining issues.[x] Fully documented, including
HISTORY.rst
for all changes and one of thedocs/*-api.rst
files for new APITo build the docs locally: