vidavis 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vidavis/__version__.py +1 -1
- vidavis/apps/_ms_raster.py +25 -12
- vidavis/data/measurement_set/processing_set/_ps_data.py +5 -4
- vidavis/plot/ms_plot/_locate_points.py +20 -16
- vidavis/plot/ms_plot/_ms_plot.py +71 -40
- vidavis/plot/ms_plot/_ms_plot_constants.py +1 -1
- vidavis/plot/ms_plot/_ms_plot_selectors.py +1 -1
- vidavis/plot/ms_plot/_raster_plot.py +0 -2
- vidavis/plot/ms_plot/_raster_plot_gui.py +16 -23
- {vidavis-0.1.0.dist-info → vidavis-0.1.2.dist-info}/METADATA +1 -1
- {vidavis-0.1.0.dist-info → vidavis-0.1.2.dist-info}/RECORD +13 -13
- {vidavis-0.1.0.dist-info → vidavis-0.1.2.dist-info}/WHEEL +0 -0
- {vidavis-0.1.0.dist-info → vidavis-0.1.2.dist-info}/licenses/LICENSE +0 -0
vidavis/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.1.
|
|
1
|
+
__version__ = '0.1.2'
|
vidavis/apps/_ms_raster.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Implementation of the ``MsRaster`` application for measurement set raster plotting and editing
|
|
3
3
|
'''
|
|
4
4
|
|
|
5
|
+
import threading
|
|
5
6
|
import time
|
|
6
7
|
|
|
7
8
|
from bokeh.models.formatters import NumeralTickFormatter
|
|
@@ -183,8 +184,8 @@ class MsRaster(MsPlot):
|
|
|
183
184
|
|
|
184
185
|
start = time.time()
|
|
185
186
|
|
|
186
|
-
#
|
|
187
|
-
super().
|
|
187
|
+
# Unlink previous plot from data streams
|
|
188
|
+
super()._unlink_plot_locate()
|
|
188
189
|
|
|
189
190
|
# Clear for new plot
|
|
190
191
|
self._reset_plot(clear_plots)
|
|
@@ -450,7 +451,15 @@ class MsRaster(MsPlot):
|
|
|
450
451
|
}
|
|
451
452
|
|
|
452
453
|
self._gui_panel = create_raster_gui(callbacks, plot_info, self._empty_plot)
|
|
453
|
-
|
|
454
|
+
|
|
455
|
+
# Start Panel server in a background daemon thread so it doesn't block process exit.
|
|
456
|
+
# Note: The Panel server will automatically stop when the Python process exits.
|
|
457
|
+
# Any open browser windows or tabs displaying the plot will lose connection at that point.
|
|
458
|
+
server_thread = threading.Thread(
|
|
459
|
+
target=lambda panel=self._gui_panel, name=self._app_name: panel.show(title=name, threaded=False),
|
|
460
|
+
daemon=True
|
|
461
|
+
)
|
|
462
|
+
server_thread.start()
|
|
454
463
|
|
|
455
464
|
###
|
|
456
465
|
### Main callback to create plot if inputs changed
|
|
@@ -496,7 +505,7 @@ class MsRaster(MsPlot):
|
|
|
496
505
|
|
|
497
506
|
# Put plot with dmap for locate streams in gui panel
|
|
498
507
|
dmap = self._get_locate_dmap(self._locate_gui_points)
|
|
499
|
-
self._gui_panel[0][0]
|
|
508
|
+
self._gui_panel[0][0].object = gui_plot * dmap
|
|
500
509
|
except (ValueError, TypeError, KeyError, RuntimeError) as e:
|
|
501
510
|
# Clear plot, inputs invalid
|
|
502
511
|
self._notify(str(e), 'error', 0)
|
|
@@ -518,9 +527,9 @@ class MsRaster(MsPlot):
|
|
|
518
527
|
def _locate_gui_points(self, x, y, data, bounds):
|
|
519
528
|
''' Callback for locate streams '''
|
|
520
529
|
if self._gui_plot_data:
|
|
521
|
-
super()._locate_cursor(x, y, self._gui_plot_data, self._gui_panel[0])
|
|
522
|
-
super()._locate_points(data, self._gui_plot_data, self._gui_panel[
|
|
523
|
-
super()._locate_box(bounds, self._gui_plot_data, self._gui_panel[
|
|
530
|
+
super()._locate_cursor(x, y, self._gui_plot_data, self._gui_panel[0][1])
|
|
531
|
+
super()._locate_points(data, self._gui_plot_data, self._gui_panel[2])
|
|
532
|
+
super()._locate_box(bounds, self._gui_plot_data, self._gui_panel[3])
|
|
524
533
|
return self._last_gui_plot
|
|
525
534
|
|
|
526
535
|
def _do_gui_selection(self):
|
|
@@ -551,6 +560,10 @@ class MsRaster(MsPlot):
|
|
|
551
560
|
|
|
552
561
|
# Make single Overlay raster plot for DynamicMap
|
|
553
562
|
gui_plot = self._do_plot(True)
|
|
563
|
+
gui_plot = gui_plot.opts(
|
|
564
|
+
hv.opts.QuadMesh(**self._locate_plot_options),
|
|
565
|
+
hv.opts.Scatter(**self._locate_plot_options)
|
|
566
|
+
)
|
|
554
567
|
|
|
555
568
|
# Update color limits in gui with data range
|
|
556
569
|
plot_params = self._raster_plot.get_plot_params()
|
|
@@ -598,7 +611,7 @@ class MsRaster(MsPlot):
|
|
|
598
611
|
if not self._gui_panel:
|
|
599
612
|
return None
|
|
600
613
|
|
|
601
|
-
selectors = self._gui_panel[
|
|
614
|
+
selectors = self._gui_panel[4][1]
|
|
602
615
|
if name == "selectors":
|
|
603
616
|
return selectors
|
|
604
617
|
|
|
@@ -684,7 +697,7 @@ class MsRaster(MsPlot):
|
|
|
684
697
|
selection_key = MS_SELECTION_OPTIONS[selector.name] if selector.name in MS_SELECTION_OPTIONS else None
|
|
685
698
|
if selection_key:
|
|
686
699
|
if selection_key == 'data_group':
|
|
687
|
-
selector.options = list(super().data_groups())
|
|
700
|
+
selector.options = list(super().data_groups(False))
|
|
688
701
|
else:
|
|
689
702
|
selector.options = super().get_dimension_values(selection_key)
|
|
690
703
|
|
|
@@ -749,19 +762,19 @@ class MsRaster(MsPlot):
|
|
|
749
762
|
''' Callback to start spinner when Plot button clicked. '''
|
|
750
763
|
if self._gui_panel:
|
|
751
764
|
# Start spinner
|
|
752
|
-
spinner = self._gui_panel[
|
|
765
|
+
spinner = self._gui_panel[4][2][1]
|
|
753
766
|
spinner.value = plot_clicked
|
|
754
767
|
|
|
755
768
|
def _update_plot_status(self, plot_changed):
|
|
756
769
|
''' Change button color when plot inputs change. '''
|
|
757
770
|
if self._gui_panel:
|
|
758
771
|
# Set button color
|
|
759
|
-
button = self._gui_panel[
|
|
772
|
+
button = self._gui_panel[4][2][0]
|
|
760
773
|
button.button_style = 'solid' if plot_changed else 'outline'
|
|
761
774
|
|
|
762
775
|
def _show_plot_inputs(self):
|
|
763
776
|
''' Show inputs for raster plot in column in GUI tab '''
|
|
764
|
-
inputs_column = self._gui_panel[
|
|
777
|
+
inputs_column = self._gui_panel[1]
|
|
765
778
|
super()._fill_inputs_column(inputs_column)
|
|
766
779
|
|
|
767
780
|
###
|
|
@@ -85,11 +85,12 @@ class PsData:
|
|
|
85
85
|
return self._ps_xdt.xr_ps.summary(data_group)
|
|
86
86
|
|
|
87
87
|
def get_data_groups(self):
|
|
88
|
-
''' Returns
|
|
89
|
-
data_groups =
|
|
88
|
+
''' Returns dict of data groups in Processing Set data. '''
|
|
89
|
+
data_groups = {}
|
|
90
90
|
for ms_xdt_name in self._ps_xdt:
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
for group_name, group_members in self._ps_xdt[ms_xdt_name].data_groups.items():
|
|
92
|
+
data_groups[group_name] = group_members
|
|
93
|
+
return data_groups
|
|
93
94
|
|
|
94
95
|
def plot_antennas(self, label_antennas=False):
|
|
95
96
|
''' Plot antenna positions.
|
|
@@ -41,42 +41,45 @@ def update_cursor_location(cursor, plot_axes, xds, cursor_locate_box):
|
|
|
41
41
|
''' Show data values for cursor x,y position in cursor location box (pn.WidgetBox) '''
|
|
42
42
|
# Convert plot values to selection values to select plot data
|
|
43
43
|
cursor_locate_box.clear()
|
|
44
|
-
|
|
45
44
|
x, y = cursor
|
|
46
45
|
x_axis, y_axis, vis_axis = plot_axes
|
|
46
|
+
|
|
47
47
|
cursor_position = {x_axis: x, y_axis: y}
|
|
48
48
|
cursor_location = _locate_point(xds, cursor_position, vis_axis)
|
|
49
49
|
|
|
50
|
-
location_column = pn.Column(pn.widgets.StaticText(name="
|
|
50
|
+
location_column = pn.Column(pn.widgets.StaticText(name="CURSOR LOCATION"))
|
|
51
51
|
# Add row of columns to column layout
|
|
52
52
|
location_row = _layout_point_location(cursor_location)
|
|
53
53
|
location_column.append(location_row)
|
|
54
54
|
# Add location column to widget box
|
|
55
55
|
cursor_locate_box.append(location_column)
|
|
56
56
|
|
|
57
|
-
def update_points_location(data, plot_axes, xds,
|
|
57
|
+
def update_points_location(data, plot_axes, xds, points_tab_feed):
|
|
58
58
|
''' Show data values for points in point_draw in tab and log '''
|
|
59
|
-
|
|
59
|
+
points_tab_feed.clear()
|
|
60
|
+
locate_log = []
|
|
60
61
|
if data:
|
|
61
62
|
x_axis, y_axis, vis_axis = plot_axes
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
message = f"Locate {len(data['x'])} points:"
|
|
64
|
+
locate_log.append(message)
|
|
64
65
|
for point in list(zip(data['x'], data['y'])):
|
|
65
66
|
# Locate point
|
|
66
67
|
point_position = {x_axis: point[0], y_axis: point[1]}
|
|
67
68
|
point_location = _locate_point(xds, point_position, vis_axis)
|
|
68
69
|
# Format location and add to points locate column
|
|
69
70
|
location_layout = _layout_point_location(point_location)
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
points_tab_feed.append(location_layout)
|
|
72
|
+
points_tab_feed.append(pn.layout.Divider())
|
|
72
73
|
|
|
73
74
|
# Format and add to log
|
|
74
75
|
location_list = [f"{static_text.name}={static_text.value}" for static_text in point_location]
|
|
75
|
-
|
|
76
|
+
locate_log.append(", ".join(location_list))
|
|
77
|
+
return locate_log
|
|
76
78
|
|
|
77
|
-
def update_box_location(bounds, plot_axes, xds,
|
|
79
|
+
def update_box_location(bounds, plot_axes, xds, box_tab_feed):
|
|
78
80
|
''' Show data values for points in box_select in tab and log '''
|
|
79
|
-
|
|
81
|
+
box_tab_feed.clear()
|
|
82
|
+
locate_log = []
|
|
80
83
|
if bounds:
|
|
81
84
|
x_axis, y_axis, vis_axis = plot_axes
|
|
82
85
|
box_bounds = {x_axis: (bounds[0], bounds[2]), y_axis: (bounds[1], bounds[3])}
|
|
@@ -84,18 +87,19 @@ def update_box_location(bounds, plot_axes, xds, box_tab_column, logger):
|
|
|
84
87
|
|
|
85
88
|
message = f"Locate {npoints} points"
|
|
86
89
|
message += " (only first 100 shown):" if npoints > 100 else ":"
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
locate_log.append(message)
|
|
91
|
+
box_tab_feed.append(pn.pane.Str(message))
|
|
89
92
|
|
|
90
93
|
for point in point_locations:
|
|
91
94
|
# Format and add to box locate column
|
|
92
95
|
location_layout = _layout_point_location(point)
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
box_tab_feed.append(location_layout)
|
|
97
|
+
box_tab_feed.append(pn.layout.Divider())
|
|
95
98
|
|
|
96
99
|
# Format and add to log
|
|
97
100
|
location_list = [f"{static_text.name}={static_text.value}" for static_text in point]
|
|
98
|
-
|
|
101
|
+
locate_log.append(", ".join(location_list))
|
|
102
|
+
return locate_log
|
|
99
103
|
|
|
100
104
|
def _locate_point(xds, position, vis_axis):
|
|
101
105
|
'''
|
vidavis/plot/ms_plot/_ms_plot.py
CHANGED
|
@@ -3,6 +3,8 @@ Base class for ms plots
|
|
|
3
3
|
'''
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
+
import logging
|
|
7
|
+
import threading
|
|
6
8
|
import time
|
|
7
9
|
|
|
8
10
|
from bokeh.io import export_png, export_svg
|
|
@@ -29,7 +31,13 @@ class MsPlot:
|
|
|
29
31
|
|
|
30
32
|
# Set logger: use toolviper logger else casalog else python logger
|
|
31
33
|
self._logger = setup_logger(app_name, log_to_term=True, log_to_file=log_to_file, log_file=app_name.lower(), log_level=log_level.upper())
|
|
32
|
-
|
|
34
|
+
|
|
35
|
+
# For removing stdout logging when using locate
|
|
36
|
+
self._stdout_handler = None
|
|
37
|
+
for handler in self._logger.handlers:
|
|
38
|
+
if isinstance(handler, logging.StreamHandler):
|
|
39
|
+
self._stdout_handler = handler
|
|
40
|
+
break
|
|
33
41
|
|
|
34
42
|
# Save parameters; ms set below
|
|
35
43
|
self._show_gui = show_gui
|
|
@@ -67,7 +75,7 @@ class MsPlot:
|
|
|
67
75
|
self._last_points = None
|
|
68
76
|
self._last_box = None
|
|
69
77
|
self._locate_plot_options = {
|
|
70
|
-
'tools': ['
|
|
78
|
+
'tools': ['box_select', 'hover'],
|
|
71
79
|
'selection_fill_alpha': 0.2, # dim selected areas of plot
|
|
72
80
|
'nonselection_fill_alpha': 1.0, # do not dim unselected areas of plot
|
|
73
81
|
}
|
|
@@ -100,10 +108,17 @@ class MsPlot:
|
|
|
100
108
|
else:
|
|
101
109
|
self._logger.error("Error: MS path has not been set")
|
|
102
110
|
|
|
103
|
-
def data_groups(self):
|
|
104
|
-
'''
|
|
111
|
+
def data_groups(self, show=False):
|
|
112
|
+
''' Get data groups from all ProcessingSet ms_xds and either print or return them. '''
|
|
105
113
|
if self._ms_data:
|
|
106
|
-
|
|
114
|
+
ms_data_groups = self._ms_data.data_groups()
|
|
115
|
+
if show:
|
|
116
|
+
for name, items in ms_data_groups.items():
|
|
117
|
+
print(name, ":")
|
|
118
|
+
for item, val in items.items():
|
|
119
|
+
print(f" {item} = {val}")
|
|
120
|
+
return None
|
|
121
|
+
return ms_data_groups
|
|
107
122
|
self._logger.error("Error: MS path has not been set")
|
|
108
123
|
return None
|
|
109
124
|
|
|
@@ -142,18 +157,8 @@ class MsPlot:
|
|
|
142
157
|
self._plot_params.clear()
|
|
143
158
|
self._plot_axes = None
|
|
144
159
|
if self._gui_panel is not None:
|
|
145
|
-
self._gui_panel[
|
|
146
|
-
self._gui_panel[
|
|
147
|
-
|
|
148
|
-
def unlink_plot_locate(self):
|
|
149
|
-
''' Disconnect streams when plot data is going to be replaced '''
|
|
150
|
-
if self._show_panel and len(self._show_panel.objects) == 4:
|
|
151
|
-
# Remove dmap (streams with callback) from previous plot
|
|
152
|
-
self._show_panel[0][0] = self._last_plot.opts(tools=['hover'])
|
|
153
|
-
# Remove locate widgets
|
|
154
|
-
self._show_panel[0].pop(1) # cursor locate box
|
|
155
|
-
self._show_panel.pop(3) # box locate tab
|
|
156
|
-
self._show_panel.pop(2) # points locate tab
|
|
160
|
+
self._gui_panel[2].clear() # locate points
|
|
161
|
+
self._gui_panel[3].clear() # locate box
|
|
157
162
|
|
|
158
163
|
def clear_selection(self):
|
|
159
164
|
''' Clear data selection and restore original ProcessingSet '''
|
|
@@ -196,21 +201,29 @@ class MsPlot:
|
|
|
196
201
|
('Plot',
|
|
197
202
|
pn.Column(
|
|
198
203
|
plot * dmap,
|
|
199
|
-
pn.WidgetBox(), # cursor info
|
|
204
|
+
pn.WidgetBox(sizing_mode='stretch_width'), # cursor info
|
|
200
205
|
)
|
|
201
206
|
),
|
|
202
|
-
sizing_mode='
|
|
207
|
+
sizing_mode='stretch_both',
|
|
203
208
|
)
|
|
209
|
+
|
|
210
|
+
# Add tabs for inputs and locate
|
|
204
211
|
if inputs_column:
|
|
205
212
|
self._show_panel.append(('Plot Inputs', inputs_column))
|
|
206
|
-
self._show_panel.append(('Locate Selected Points', pn.
|
|
207
|
-
self._show_panel.append(('Locate Selected Box', pn.
|
|
213
|
+
self._show_panel.append(('Locate Selected Points', pn.Feed(height_policy='max')))
|
|
214
|
+
self._show_panel.append(('Locate Selected Box', pn.Feed(height_policy='max')))
|
|
208
215
|
|
|
209
216
|
# return value for locate callback
|
|
210
217
|
self._last_plot = plot
|
|
211
218
|
|
|
212
|
-
#
|
|
213
|
-
|
|
219
|
+
# Start Panel server in a background daemon thread so it doesn't block process exit.
|
|
220
|
+
# Note: The Panel server will automatically stop when the Python process exits.
|
|
221
|
+
# Any open browser windows or tabs displaying the plot will lose connection at that point.
|
|
222
|
+
server_thread = threading.Thread(
|
|
223
|
+
target=lambda panel=self._show_panel, name=self._app_name: panel.show(title=name, threaded=False),
|
|
224
|
+
daemon=True
|
|
225
|
+
)
|
|
226
|
+
server_thread.start()
|
|
214
227
|
|
|
215
228
|
def save(self, filename='ms_plot.png', fmt='auto', width=900, height=600):
|
|
216
229
|
'''
|
|
@@ -400,6 +413,16 @@ class MsPlot:
|
|
|
400
413
|
)
|
|
401
414
|
return dmap * points
|
|
402
415
|
|
|
416
|
+
def _unlink_plot_locate(self):
|
|
417
|
+
''' Disconnect streams when plot data is going to be replaced '''
|
|
418
|
+
if self._show_panel and len(self._show_panel.objects) == 4:
|
|
419
|
+
# Remove dmap (streams with callback) from previous plot
|
|
420
|
+
self._show_panel[0][0] = self._last_plot.opts(tools=['hover'])
|
|
421
|
+
# Remove locate widgets
|
|
422
|
+
self._show_panel[0].pop(1) # cursor locate box
|
|
423
|
+
self._show_panel.pop(3) # box locate tab
|
|
424
|
+
self._show_panel.pop(2) # points locate tab
|
|
425
|
+
|
|
403
426
|
def _get_plot_axes(self):
|
|
404
427
|
''' Return x, y, vis axes '''
|
|
405
428
|
if not self._plot_axes:
|
|
@@ -411,35 +434,43 @@ class MsPlot:
|
|
|
411
434
|
|
|
412
435
|
def _locate(self, x, y, data, bounds):
|
|
413
436
|
''' Callback for all show plot streams '''
|
|
414
|
-
self._locate_cursor(x, y, self._plot_data, self._show_panel)
|
|
415
|
-
self._locate_points(data, self._plot_data, self._show_panel)
|
|
416
|
-
self._locate_box(bounds, self._plot_data, self._show_panel)
|
|
437
|
+
self._locate_cursor(x, y, self._plot_data, self._show_panel[0][1])
|
|
438
|
+
self._locate_points(data, self._plot_data, self._show_panel[2])
|
|
439
|
+
self._locate_box(bounds, self._plot_data, self._show_panel[3])
|
|
417
440
|
return self._last_plot
|
|
418
441
|
|
|
419
|
-
def _locate_cursor(self, x, y, plot_data,
|
|
442
|
+
def _locate_cursor(self, x, y, plot_data, cursor_box):
|
|
420
443
|
''' Show location from cursor position in cursor locate box '''
|
|
421
444
|
cursor = (x, y)
|
|
422
445
|
if cursor_changed(cursor, self._last_cursor):
|
|
423
446
|
# new cursor position - update cursor location box
|
|
424
|
-
|
|
425
|
-
cursor_box = tabs[0][1]
|
|
426
|
-
update_cursor_location(cursor, plot_axes, plot_data, cursor_box)
|
|
447
|
+
update_cursor_location(cursor, self._get_plot_axes(), plot_data, cursor_box)
|
|
427
448
|
self._last_cursor = cursor
|
|
428
449
|
|
|
429
|
-
def _locate_points(self, point_data, plot_data,
|
|
450
|
+
def _locate_points(self, point_data, plot_data, points_tab):
|
|
430
451
|
''' Show points locations from point_draw tool '''
|
|
431
452
|
if points_changed(point_data, self._last_points):
|
|
432
|
-
#
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
453
|
+
# update selected points location tab
|
|
454
|
+
location_info = update_points_location(point_data, self._get_plot_axes(), plot_data, points_tab)
|
|
455
|
+
|
|
456
|
+
# log to file only
|
|
457
|
+
self._logger.removeHandler(self._stdout_handler)
|
|
458
|
+
for info in location_info:
|
|
459
|
+
self._logger.info(info)
|
|
460
|
+
self._logger.addHandler(self._stdout_handler)
|
|
461
|
+
|
|
436
462
|
self._last_points = point_data
|
|
437
463
|
|
|
438
|
-
def _locate_box(self, box_bounds, plot_data,
|
|
464
|
+
def _locate_box(self, box_bounds, plot_data, box_tab):
|
|
439
465
|
''' Show points locations in box from box_select tool '''
|
|
440
466
|
if box_changed(box_bounds, self._last_box):
|
|
441
|
-
#
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
467
|
+
# update selected box location tab
|
|
468
|
+
location_info = update_box_location(box_bounds, self._get_plot_axes(), plot_data, box_tab)
|
|
469
|
+
|
|
470
|
+
# log to file only
|
|
471
|
+
self._logger.removeHandler(self._stdout_handler)
|
|
472
|
+
for info in location_info:
|
|
473
|
+
self._logger.info(info)
|
|
474
|
+
self._logger.addHandler(self._stdout_handler)
|
|
475
|
+
|
|
445
476
|
self._last_box = box_bounds
|
|
@@ -10,7 +10,7 @@ WEIGHT_AXIS_OPTIONS = ['weight', 'sigma']
|
|
|
10
10
|
# GUI label to selection keyword
|
|
11
11
|
PS_SELECTION_OPTIONS = {
|
|
12
12
|
'MSv4 Name': 'name',
|
|
13
|
-
'Intents': '
|
|
13
|
+
'Scan Intents': 'scan_intents',
|
|
14
14
|
'Scan Name': 'scan_name',
|
|
15
15
|
'Spectral Window Name': 'spw_name',
|
|
16
16
|
'Field Name': 'field_name',
|
|
@@ -185,7 +185,6 @@ class RasterPlot:
|
|
|
185
185
|
x_formatter = get_time_formatter() if x_axis == 'time' else None
|
|
186
186
|
y_formatter = get_time_formatter() if y_axis == 'time' else None
|
|
187
187
|
|
|
188
|
-
# Hide flagged colorbar if unflagged colorbar is shown
|
|
189
188
|
if xda.count().values > 0:
|
|
190
189
|
if is_flagged:
|
|
191
190
|
show_colorbar = style_params['show_flagged_colorbar']
|
|
@@ -240,7 +239,6 @@ class RasterPlot:
|
|
|
240
239
|
yticks=plot_params['axis_labels']['y']['ticks'],
|
|
241
240
|
rot=45,
|
|
242
241
|
marker='s', # square
|
|
243
|
-
hover=True,
|
|
244
242
|
responsive=True,
|
|
245
243
|
)
|
|
246
244
|
|
|
@@ -8,7 +8,7 @@ from vidavis.plot.ms_plot._ms_plot_selectors import (file_selector, title_select
|
|
|
8
8
|
|
|
9
9
|
def create_raster_gui(callbacks, plot_info, empty_plot):
|
|
10
10
|
''' Use Holoviz Panel to create a dashboard for plot inputs and raster plot display.
|
|
11
|
-
|
|
11
|
+
callbacks (dist): callback functions for widgets
|
|
12
12
|
plot_info (dict): with keys 'ms', 'data_dims', 'x_axis', 'y_axis'
|
|
13
13
|
empty_plot (hv.Overlay): QuadMesh overlay plot with no data
|
|
14
14
|
'''
|
|
@@ -21,29 +21,21 @@ def create_raster_gui(callbacks, plot_info, empty_plot):
|
|
|
21
21
|
# Dynamic map for plot, with callback when inputs change or location needed
|
|
22
22
|
#dmap, points = get_plot_dmap(callbacks, selectors, init_plot)
|
|
23
23
|
|
|
24
|
-
return pn.
|
|
25
|
-
pn.
|
|
26
|
-
(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
('Locate Selected Points', pn.Column()), # Tabs[2]
|
|
34
|
-
('Locate Selected Box', pn.Column()), # Tabs[3]
|
|
35
|
-
sizing_mode='stretch_width',
|
|
36
|
-
),
|
|
37
|
-
pn.Spacer(width=10), # Row [1]
|
|
38
|
-
pn.Column( # Row [2]
|
|
24
|
+
return pn.Tabs(
|
|
25
|
+
('Plot', pn.Column( # Tabs[0]
|
|
26
|
+
pn.pane.HoloViews(empty_plot), # Row[0] plot
|
|
27
|
+
pn.WidgetBox(sizing_mode='stretch_width'), # Row[1] cursor location
|
|
28
|
+
)),
|
|
29
|
+
('Plot Inputs', pn.Column()), # Tabs[1]
|
|
30
|
+
('Locate Selected Points', pn.Feed(sizing_mode='stretch_height')), # Tabs[2]
|
|
31
|
+
('Locate Selected Box', pn.Feed(sizing_mode='stretch_height')), # Tabs[3]
|
|
32
|
+
('Plot Settings', pn.Column( # Tabs[4]
|
|
39
33
|
pn.Spacer(height=25), # Column[0]
|
|
40
|
-
selectors, # Column[1]
|
|
41
|
-
init_plot, # Column[2]
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
),
|
|
46
|
-
sizing_mode='stretch_height',
|
|
34
|
+
selectors, # Column[1] selectors
|
|
35
|
+
init_plot, # Column[2] plot button and spinner
|
|
36
|
+
sizing_mode='stretch_both',
|
|
37
|
+
)),
|
|
38
|
+
sizing_mode='stretch_width',
|
|
47
39
|
)
|
|
48
40
|
|
|
49
41
|
def get_plot_input_selectors(callbacks, plot_info):
|
|
@@ -82,6 +74,7 @@ def get_plot_input_selectors(callbacks, plot_info):
|
|
|
82
74
|
("Aggregation", agg_selectors), # [4]
|
|
83
75
|
("Iteration", iter_selectors), # [5]
|
|
84
76
|
("Plot title", title_input), # [6]
|
|
77
|
+
sizing_mode='stretch_width',
|
|
85
78
|
)
|
|
86
79
|
selectors.toggle = True
|
|
87
80
|
return selectors
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
vidavis/LICENSE.rst,sha256=qzGpkvhDzf_MgF1PIn6rCmYPrcEhkfrBUchosLJj-U4,26371
|
|
2
2
|
vidavis/__init__.py,sha256=FVM92yTXUplR7tVHiGao0Y3Hd80pRTrwVIYDLjzICws,1709
|
|
3
3
|
vidavis/apps/__init__.py,sha256=ZQ5v1VFtjn3ztmuOHLOk5WbC1uLNIgL9rbHQ4v0zJwY,87
|
|
4
|
-
vidavis/apps/_ms_raster.py,sha256=
|
|
4
|
+
vidavis/apps/_ms_raster.py,sha256=HR2t6ZYTzZxxFtPnPmAVoI_PADHYA268FwhCrM1u6-o,41600
|
|
5
5
|
vidavis/bokeh/__init__.py,sha256=gdPPxBCe0enCSjvPFxkgMlhpVnAMFXKcw9GN28tVdXM,95
|
|
6
6
|
vidavis/bokeh/_palette.py,sha256=gzfJHuUgqxd8hJpZe-gQPFTCPq9f5I8uLEkHAK5FNDM,2480
|
|
7
7
|
vidavis/data/__init__.py,sha256=-RDRe0PYK6vPlhdRV2Dy1vGbnDGoXWDATmfxaR-gXcE,48
|
|
@@ -10,7 +10,7 @@ vidavis/data/measurement_set/_ms_data.py,sha256=7ATsPbGFAv8WtWk_PRxlfoLdqapd6eMv
|
|
|
10
10
|
vidavis/data/measurement_set/processing_set/__init__.py,sha256=TVQe5Nl4APCB2E1T1giAkOvSxg7OBNcOm9-BeZelY2Q,95
|
|
11
11
|
vidavis/data/measurement_set/processing_set/_ps_concat.py,sha256=uTuxE7krTu6SS7lwV9ITMsAxJ4BJhKOU9dLlQ9L1oNY,3513
|
|
12
12
|
vidavis/data/measurement_set/processing_set/_ps_coords.py,sha256=SDp-0ebd94QjO_jPv00weiYmp-OD1XqsCzWvNc0D-94,3747
|
|
13
|
-
vidavis/data/measurement_set/processing_set/_ps_data.py,sha256=
|
|
13
|
+
vidavis/data/measurement_set/processing_set/_ps_data.py,sha256=v6ARj5AJYsT30Gp8tWOZCoU7WxDb2_p8pfMbVBW4gVA,11689
|
|
14
14
|
vidavis/data/measurement_set/processing_set/_ps_io.py,sha256=VeNi-s1hozgCAGAGHs4NUXtlVFwUh-mkqrY9iYWOfW4,1717
|
|
15
15
|
vidavis/data/measurement_set/processing_set/_ps_raster_data.py,sha256=m7d0qe5bS-XjGD_1mrpRn9dTobwG8WDidCmAaLP2TWQ,7378
|
|
16
16
|
vidavis/data/measurement_set/processing_set/_ps_select.py,sha256=AtEsLy3bSHEyFUFKM-OO6_-YwUdWOWcGkXkEgFxMaEE,10859
|
|
@@ -19,13 +19,13 @@ vidavis/data/measurement_set/processing_set/_xds_data.py,sha256=qLO2VkLINkSAQ7CG
|
|
|
19
19
|
vidavis/plot/__init__.py,sha256=thxe5vAGdpEiqoKPHLJoWUqKMVrUVx0ajpsGf5pVP98,95
|
|
20
20
|
vidavis/plot/ms_plot/__init__.py,sha256=wY0_7gY9M6K1D6tKQsr89L_uSs3seJlD-uicx7dx5Mo,74
|
|
21
21
|
vidavis/plot/ms_plot/_check_raster_inputs.py,sha256=a7u5wlDKTxWYW36-Xp3xd4c756SbYURdFkGHbUaX440,4786
|
|
22
|
-
vidavis/plot/ms_plot/_locate_points.py,sha256=
|
|
23
|
-
vidavis/plot/ms_plot/_ms_plot.py,sha256=
|
|
24
|
-
vidavis/plot/ms_plot/_ms_plot_constants.py,sha256=
|
|
25
|
-
vidavis/plot/ms_plot/_ms_plot_selectors.py,sha256=
|
|
22
|
+
vidavis/plot/ms_plot/_locate_points.py,sha256=PlPAq0WGoKNOEiTsOV8cDKHAcbkQOWfqoc0vRSFbkiA,11006
|
|
23
|
+
vidavis/plot/ms_plot/_ms_plot.py,sha256=0zbZ-QdXdwl91Ze9--H7G47y9FulHkGy_5_2dlm9wuw,20144
|
|
24
|
+
vidavis/plot/ms_plot/_ms_plot_constants.py,sha256=xbn_dEx4QWbZIsUDziJifrT7pXwO2Qr2B5CHyAy16So,940
|
|
25
|
+
vidavis/plot/ms_plot/_ms_plot_selectors.py,sha256=LeRLuOVkitzuOL--QRHXtoxJIz3DGjhjIjSfbOj7qyI,11146
|
|
26
26
|
vidavis/plot/ms_plot/_plot_inputs.py,sha256=GeErBB3pYz6ecJiMTGQMNXkPeMLbWbYGmqL5dr8A46Q,687
|
|
27
|
-
vidavis/plot/ms_plot/_raster_plot.py,sha256=
|
|
28
|
-
vidavis/plot/ms_plot/_raster_plot_gui.py,sha256=
|
|
27
|
+
vidavis/plot/ms_plot/_raster_plot.py,sha256=6TOZvKSh8oBI79K926zp8Cn5bzk4MJGPB_PQ5S-1H4M,10803
|
|
28
|
+
vidavis/plot/ms_plot/_raster_plot_gui.py,sha256=gsNklMUj4Tx9H2r4Am8XHY0qoEHcCsaDYZDd3FaAmSQ,3563
|
|
29
29
|
vidavis/plot/ms_plot/_raster_plot_inputs.py,sha256=kxR6-1Qn4IyQ4FjgpVZ9HEZ7EnPHxJZWomb0n_zaRwo,4071
|
|
30
30
|
vidavis/plot/ms_plot/_time_ticks.py,sha256=j-DcPh7RfGE8iX2bPjLQDQPIbiAbmjiEWQnKmdMWA3I,1773
|
|
31
31
|
vidavis/plot/ms_plot/_xds_plot_axes.py,sha256=EeWvAbiKV33nEWdI8V3M0uwLTnycq4bFYBOyVWkxCu0,4429
|
|
@@ -33,8 +33,8 @@ vidavis/toolbox/__init__.py,sha256=jqFa-eziVz_frNnXxwjJFK36qNpz1H38s-VlpBcq-R8,1
|
|
|
33
33
|
vidavis/toolbox/_app_context.py,sha256=H7gtF8RrAH46FqDcMobv3KM1Osbnapgu6aTG-m3VCWA,3049
|
|
34
34
|
vidavis/toolbox/_logging.py,sha256=OEisrd8FM8VTNBMc7neLh9ekelf29ZILYB5pScebly0,2739
|
|
35
35
|
vidavis/toolbox/_static.py,sha256=HJLMtClppgOJXWAtV6Umn5EqN80u0oZiIouQ1JsB9PM,2346
|
|
36
|
-
vidavis/__version__.py,sha256=
|
|
37
|
-
vidavis-0.1.
|
|
38
|
-
vidavis-0.1.
|
|
39
|
-
vidavis-0.1.
|
|
40
|
-
vidavis-0.1.
|
|
36
|
+
vidavis/__version__.py,sha256=r_cKr7sbAG8wXvZQ-5WkC2eXGKMDWp6Xe_hNXu43MT0,21
|
|
37
|
+
vidavis-0.1.2.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
|
|
38
|
+
vidavis-0.1.2.dist-info/METADATA,sha256=bGXBhlQbWV5_Y82WSurot_OPr4U4on-pjsQZWDX-_d4,2268
|
|
39
|
+
vidavis-0.1.2.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
|
40
|
+
vidavis-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|