Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Ubuntu CI
on:
push:
branches:
- master
- '*'
tags:
- "*"
Comment on lines 3 to 8
pull_request:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <ian.heywood@physics.ox.ac.uk>"]
license = "GPL-2.0-only"
Expand Down
5 changes: 4 additions & 1 deletion shade_ms/data_mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Comment on lines +376 to +377
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.")
Expand Down