Skip to content

Commit

Permalink
remove unused stretch_histogram_needs_update
Browse files Browse the repository at this point in the history
* was replaced with skip_if_no_updates_since_last_active decorator in #2386
  • Loading branch information
kecnry committed Aug 30, 2023
1 parent 358480d commit f7fe13c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jdaviz/configs/default/plugins/plot_options/plot_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,10 @@ def _update_stretch_histogram(self, msg={}):
x_data = data.get_component(data.components[1]).data
y_data = data.get_component(data.components[0]).data

inds = np.where((x_data >= (viewer.state.x_min if not viewer.inverted_x_axis else viewer.state.x_max)) &
(x_data <= (viewer.state.x_max if not viewer.inverted_x_axis else viewer.state.x_min)) &
x_min = viewer.state.x_min if not viewer.inverted_x_axis else viewer.state.x_max
x_max = viewer.state.x_max if not viewer.inverted_x_axis else viewer.state.x_min
inds = np.where((x_data >= x_min) &
(x_data <= x_max) &
(y_data >= viewer.state.y_min) &
(y_data <= viewer.state.y_max))

Expand Down Expand Up @@ -641,8 +643,6 @@ def _update_stretch_histogram(self, msg={}):
# we'll force the traitlet to trigger a change
hist_mark.send_state('sample')

self._stretch_histogram_needs_update = False

@observe('stretch_vmin_value', 'stretch_vmax_value', 'layer_selected',
'stretch_hist_nbins', 'image_contrast_value', 'image_bias_value',
'stretch_curve_visible_value')
Expand Down

0 comments on commit f7fe13c

Please sign in to comment.