Skip to content

Commit

Permalink
Merge pull request #63 from ratt-ru/dev
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
SpheMakh authored May 11, 2020
2 parents 283bd35 + 8657588 commit 5a667c8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.3.6
-----
**ragavi-vis**

- Fixed bug in correlation selection

0.3.5
-----
**ragavi-vis**
Expand Down
7 changes: 7 additions & 0 deletions ragavi/ragavi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,8 @@ def main(**kwargs):
})
inv_source = ColumnDataSource(data={})

logger.debug(f"Processing data for {legend}")

data_obj = DataCoreProcessor(
sub, tab, gain,
fid=fid, yaxis=yaxis, corr=corr,
Expand All @@ -1679,6 +1681,7 @@ def main(**kwargs):
data = data_obj.act()
xaxis = data_obj.xaxis

logger.debug(f"Getting the flagged data")
infl_data = DataCoreProcessor(
sub, tab, gain, fid=fid, yaxis=yaxis,
corr=corr, flag=not _FLAG_DATA_,
Expand All @@ -1695,6 +1698,8 @@ def main(**kwargs):

iy = infl_data.y

logger.debug(f"Done")

source.add(x, name='x')
source.add(y, name=f"y{_y}")

Expand All @@ -1714,6 +1719,7 @@ def main(**kwargs):
fig_glyphs.append(glyphs)
fig_legends.append((legend, []))
fig_ebars.append(bars)
sub.close()

title = f"{yaxis.capitalize()} vs {xaxis.capitalize()}"
fig = create_bk_fig(xlab=x_label, ylab=y_label, title=title,
Expand All @@ -1738,6 +1744,7 @@ def main(**kwargs):
for spw in spw_ids:
# do this here otherwise extra x added after title
title = fig.above.pop()
logger.debug("Adding extra chan/freq axis")
fig = add_axis(fig, (freqs[spw][0], freqs[spw][-1]),
ax_label="Frequency [GHz]",
ax_name=f"spw{spw}")
Expand Down
1 change: 1 addition & 0 deletions ragavi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def get_frequencies(ms_name, spwid=None, chan=None, cbin=None):
frequencies = []
for s in spw_subtab:
frequencies.append(s.CHAN_FREQ)
s.close()
frequencies = xr.concat(frequencies, dim="row")

if spwid is not None:
Expand Down
2 changes: 1 addition & 1 deletion ragavi/visibilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,8 +1085,8 @@ def get_ms(ms_name, ants=None, cbin=None, chan_select=None, chunks=None,
tab_objs = antenna_iter(ms_name, **xds_inputs)
else:
tab_objs = xm.xds_from_ms(ms_name, **xds_inputs)
corr_select = None
if iter_axis == "corr":
corr_select = None
tab_objs = corr_iter(tab_objs)
# select channels
if chan_select is not None:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def requirements():
return [pname.strip() for pname in f.readlines()]

setup(name='ragavi',
version="0.3.5",
version="0.3.6",
description='Radio Astronomy Gain and Visibility Inspector',
long_description=readme(),
url='https://github.com/ratt-ru/ragavi',
Expand Down

0 comments on commit 5a667c8

Please sign in to comment.