Skip to content

Commit

Permalink
remove new_axes={'corr2': 2} in calibration utils (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
landmanbester authored Sep 13, 2023
1 parent 2e66bde commit 8620280
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ History

X.Y.Z (YYYY-MM-DD)
------------------
* Remove unnecessary new_axes in calibration utils after upstream fix in dask (:pr:`288`)
* Check that ncorr is never larger than 2 in calibration utils (:pr:`287`)
* Optionally check NRT allocations (:pr:`286`)
* Use `packaging.version.Version` instead of deprecated `distutils.version.LooseVersion` (:pr:`285`)
Expand Down
12 changes: 0 additions & 12 deletions africanus/calibration/utils/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def corrupt_vis(time_bin_indices, time_bin_counts, antenna1,
else:
raise ValueError("Unknown mode argument of %s" % mode)

# the new_axes={"corr2": 2} is required because of a dask bug
# see https://github.com/dask/dask/issues/5550
return blockwise(_corrupt_vis_wrapper, out_shape,
time_bin_indices, ("row",),
time_bin_counts, ("row",),
Expand All @@ -66,7 +64,6 @@ def corrupt_vis(time_bin_indices, time_bin_counts, antenna1,
jones, jones_shape,
model, model_shape,
adjust_chunks={"row": antenna1.chunks[0]},
new_axes={"corr2": 2},
dtype=model.dtype,
align_arrays=False)

Expand Down Expand Up @@ -114,8 +111,6 @@ def compute_and_corrupt_vis(time_bin_indices, time_bin_counts,
else:
raise ValueError("Unknown mode argument of %s" % mode)

# the new_axes={"corr2": 2} is required because of a dask bug
# see https://github.com/dask/dask/issues/5550
return blockwise(_compute_and_corrupt_vis_wrapper, out_shape,
time_bin_indices, ("row",),
time_bin_counts, ("row",),
Expand All @@ -127,7 +122,6 @@ def compute_and_corrupt_vis(time_bin_indices, time_bin_counts,
freq, ("chan",),
lm, ("row", "dir", "two"),
adjust_chunks={"row": antenna1.chunks[0]},
new_axes={"corr2": 2},
dtype=model.dtype,
align_arrays=False)

Expand Down Expand Up @@ -161,8 +155,6 @@ def correct_vis(time_bin_indices, time_bin_counts, antenna1,
else:
raise ValueError("Unknown mode argument of %s" % mode)

# the new_axes={"corr2": 2} is required because of a dask bug
# see https://github.com/dask/dask/issues/5550
return blockwise(_correct_vis_wrapper, out_shape,
time_bin_indices, ("row",),
time_bin_counts, ("row",),
Expand All @@ -172,7 +164,6 @@ def correct_vis(time_bin_indices, time_bin_counts, antenna1,
vis, out_shape,
flag, out_shape,
adjust_chunks={"row": antenna1.chunks[0]},
new_axes={"corr2": 2},
dtype=vis.dtype,
align_arrays=False)

Expand Down Expand Up @@ -211,8 +202,6 @@ def residual_vis(time_bin_indices, time_bin_counts, antenna1,
else:
raise ValueError("Unknown mode argument of %s" % mode)

# the new_axes={"corr2": 2} is required because of a dask bug
# see https://github.com/dask/dask/issues/5550
return blockwise(_residual_vis_wrapper, out_shape,
time_bin_indices, ("row",),
time_bin_counts, ("row",),
Expand All @@ -223,7 +212,6 @@ def residual_vis(time_bin_indices, time_bin_counts, antenna1,
flag, out_shape,
model, model_shape,
adjust_chunks={"row": antenna1.chunks[0]},
new_axes={"corr2": 2},
dtype=vis.dtype,
align_arrays=False)

Expand Down

0 comments on commit 8620280

Please sign in to comment.