diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c976bd1..0da46eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: Ubuntu CI on: push: branches: - - master + - '*' tags: - "*" pull_request: @@ -49,14 +49,16 @@ jobs: - name: Test command run: poetry run shadems --help - - name: Run testsuite + - name: Run test suite run: poetry run py.test -vvv shade_ms/ - name: Download test dataset run: curl https://ratt-public-data.s3.af-south-1.amazonaws.com/test-data/HLTau_B6cont.calavg.tav300s.tar.xz | tar xJf - - name: Run end to end test - run: poetry run shadems HLTau_B6cont.calavg.tav300s + run: | + poetry run shadems HLTau_B6cont.calavg.tav300s + poetry run shadems HLTau_B6cont.calavg.tav300s -x FREQ -y amp -a FLAG --field 0 --title 'test1' --col DATA --png test.png --corr XX --ymin 0 --ymax 30 # deploy: diff --git a/pyproject.toml b/pyproject.toml index 8f905a8..1f09ff2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "shadems" -version = "0.5.4" +version = "0.5.5" description = "Rapid Measurement Set plotting with dask-ms and datashader" authors = ["Ian Heywood & RATT "] license = "GPL-2.0-only" diff --git a/shade_ms/data_mappers.py b/shade_ms/data_mappers.py index d6b6d16..bdc71ce 100644 --- a/shade_ms/data_mappers.py +++ b/shade_ms/data_mappers.py @@ -359,7 +359,7 @@ def get_value(self, group, corr, extras, flag, flag_row, chanslice): # # discretize # if self.nlevels: - if coldata.dtype is bool or np.issubdtype(coldata.dtype, np.integer): + if coldata.dtype == bool or np.issubdtype(coldata.dtype, np.integer): if self._is_discrete is False: raise TypeError(f"{self.label}: column changed from continuous-valued to discrete. This is a bug, or a very weird MS.") self._is_discrete = True @@ -373,6 +373,9 @@ def get_value(self, group, corr, extras, flag, flag_row, chanslice): flag = bad_bins else: flag = da.logical_or(flag.data, bad_bins) + # Adding to treat flag as 0/1 + if coldata.dtype == bool: + coldata = coldata.astype(int) 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.")