Skip to content

Commit

Permalink
Fix plot ranges and circle radius values
Browse files Browse the repository at this point in the history
  • Loading branch information
bhilbert4 committed Aug 19, 2024
1 parent 904c089 commit fe80b95
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions jwql/website/apps/jwql/monitor_pages/monitor_readnoise_bokeh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]'
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit fe80b95

Please sign in to comment.