From 7a2e5f13880b150255112acba0bbaeb5e712ff6c Mon Sep 17 00:00:00 2001 From: Athanaseus Javas Ramaila Date: Wed, 26 Feb 2025 19:26:28 +0200 Subject: [PATCH 1/4] Update data_mappers.py --- shade_ms/data_mappers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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.") From 9af6e2ca9e14424efa4b1f1e86bdcd1e5b350843 Mon Sep 17 00:00:00 2001 From: Athanaseus Javas Ramaila Date: Wed, 26 Feb 2025 19:28:46 +0200 Subject: [PATCH 2/4] Update ci.yml --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c976bd1..08aff4b 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: @@ -56,7 +56,9 @@ jobs: 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 + 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: From 371c596fad4a0f078a398cd51113efd4aba705b5 Mon Sep 17 00:00:00 2001 From: Athanaseus Javas Ramaila Date: Wed, 26 Feb 2025 19:31:05 +0200 Subject: [PATCH 3/4] test flags --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08aff4b..0da46eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ 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 @@ -58,7 +58,7 @@ jobs: - name: Run end to end test run: | poetry run shadems HLTau_B6cont.calavg.tav300s - 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 + 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: From 7faa0699358484bdd21f5e3544e2e35e11660daa Mon Sep 17 00:00:00 2001 From: Athanaseus Javas Ramaila Date: Wed, 26 Feb 2025 19:43:24 +0200 Subject: [PATCH 4/4] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"