Skip to content

Commit

Permalink
Merge pull request #90 from ratt-ru/issue-88
Browse files Browse the repository at this point in the history
Issue 88
  • Loading branch information
o-smirnov authored Jan 28, 2021
2 parents 92a20d8 + 8453660 commit 60ab7fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

requirements = [
"dask-ms[xarray]",
"distributed==2.14.0",
"dask[complete]==2.14.0",
"dask[complete]",
"datashader>=0.12.0",
"holoviews",
"matplotlib>2.2.3; python_version >= '3.5'",
Expand Down
9 changes: 8 additions & 1 deletion shade_ms/data_mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,19 @@ def get_value(self, group, corr, extras, flag, flag_row, chanslice):
if flag is None:
flag = bad_bins
else:
flag = da.logical_or(flag, bad_bins)
flag = da.logical_or(flag.data, bad_bins)
else:
if self._is_discrete is True:
raise TypeError(f"{self.label}: column chnaged from discrete to continuous-valued. This is a bug, or a very weird MS.")
self._is_discrete = False

# Ensure dask arrays for creating dask masked arrays
if isinstance(coldata, xarray.DataArray):
coldata = coldata.data

if isinstance(flag, xarray.DataArray):
flag = flag.data

bad_data = da.logical_not(da.isfinite(coldata))
if flag is not None:
return dama.masked_array(coldata, da.logical_or(flag, bad_data))
Expand Down
2 changes: 1 addition & 1 deletion shade_ms/data_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def create_plot(ddf, index_subsets, xdatum, ydatum, adatum, ared, cdatum, cmap,
alpha -= min_alpha
if nulls.all():
log.debug(f"alpha<min_alpha for entire plot -- all data below lower clip perhaps?")
else:
else:
#if percentile if specified, use that to override saturate_alpha
if saturate_alpha is None:
saturate_alpha = np.percentile(alpha[~nulls], saturate_percentile)
Expand Down

0 comments on commit 60ab7fc

Please sign in to comment.