From c675f6dedee9276dc319830fcb6c0f9debfb0c0b Mon Sep 17 00:00:00 2001 From: Bryan Hilbert Date: Sat, 17 Aug 2024 18:04:00 -0400 Subject: [PATCH 1/2] Specify circle radii in Bokeh plots --- .../apps/jwql/monitor_pages/monitor_readnoise_bokeh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py b/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py index d78e64de5..43f86358f 100644 --- a/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py +++ b/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py @@ -154,7 +154,7 @@ def plot_readnoise_amplifers(self): ("ngroups", "@ngroups"), ("readnoise", "@readnoise")])) - amp_plot.circle(x='expstarts', y='readnoise', source=source) + amp_plot.circle(x='expstarts', y='readnoise', radius=0.01, radius_dimension='y', source=source) amp_plot.xaxis.axis_label = 'Date' amp_plot.yaxis.axis_label = 'Mean Readnoise [DN]' @@ -204,7 +204,7 @@ def plot_readnoise_histogram(self): self.readnoise_histogram.add_tools(HoverTool(tooltips=[("Data (x, y)", "(@x, @y)"), ])) - self.readnoise_histogram.circle(x='x', y='y', source=source) + self.readnoise_histogram.circle(x='x', y='y', radius=0.01, radius_dimension='x', source=source) self.readnoise_histogram.xaxis.axis_label = 'Readnoise Difference [DN]' self.readnoise_histogram.yaxis.axis_label = 'Number of Pixels' From fe80b95eebaffaffcb8516cc0e28d124e910e458 Mon Sep 17 00:00:00 2001 From: Bryan Hilbert Date: Mon, 19 Aug 2024 13:50:39 -0400 Subject: [PATCH 2/2] Fix plot ranges and circle radius values --- .../jwql/monitor_pages/monitor_readnoise_bokeh.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py b/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py index 43f86358f..c190db3ed 100644 --- a/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py +++ b/jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py @@ -154,7 +154,15 @@ def plot_readnoise_amplifers(self): ("ngroups", "@ngroups"), ("readnoise", "@readnoise")])) - amp_plot.circle(x='expstarts', y='readnoise', radius=0.01, radius_dimension='y', source=source) + min_rn = np.min(readnoise_vals) + max_rn = np.max(readnoise_vals) + delta_rn = max_rn - min_rn + plot_max = max_rn + 0.5 * delta_rn + plot_min = min_rn - 0.5 * delta_rn + circle_radius = 0.01 * (plot_max - plot_min) + + amp_plot.circle(x='expstarts', y='readnoise', radius=circle_radius, radius_dimension='y', source=source, + y_range=(plot_min, plot_max)) amp_plot.xaxis.axis_label = 'Date' amp_plot.yaxis.axis_label = 'Mean Readnoise [DN]' @@ -204,7 +212,8 @@ def plot_readnoise_histogram(self): self.readnoise_histogram.add_tools(HoverTool(tooltips=[("Data (x, y)", "(@x, @y)"), ])) - self.readnoise_histogram.circle(x='x', y='y', radius=0.01, radius_dimension='x', source=source) + circle_radius = 0.01 * (hist_xr_end - hist_xr_start) + self.readnoise_histogram.circle(x='x', y='y', radius=circle_radius, radius_dimension='x', source=source) self.readnoise_histogram.xaxis.axis_label = 'Readnoise Difference [DN]' self.readnoise_histogram.yaxis.axis_label = 'Number of Pixels'