From 663eac6d87ea43ffeb6b1c01c8ce54af8b5e7c05 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 28 Mar 2024 10:23:50 +0000 Subject: [PATCH] Revert "BUG: Always downsample histogram for Imviz in Plot Options (#2735)" This reverts commit fbef31f4c20716a29fc3f7ec96e371ee4b283a67. --- .../default/plugins/plot_options/plot_options.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/jdaviz/configs/default/plugins/plot_options/plot_options.py b/jdaviz/configs/default/plugins/plot_options/plot_options.py index 4dff3fbf69..66a53dc605 100644 --- a/jdaviz/configs/default/plugins/plot_options/plot_options.py +++ b/jdaviz/configs/default/plugins/plot_options/plot_options.py @@ -973,12 +973,8 @@ def _update_stretch_histogram(self, msg={}): x_max = x_limits.max() y_min = max(y_limits.min(), 0) y_max = y_limits.max() + arr = comp.data[y_min:y_max, x_min:x_max] - if self.config == "imviz": - # Downsample input data to about 400px (as per compass.vue) for performance. - xstep = max(1, round(arr.shape[1] / 400)) - ystep = max(1, round(arr.shape[0] / 400)) - arr = arr[::ystep, ::xstep] sub_data = arr.ravel() else: @@ -999,14 +995,8 @@ def _update_stretch_histogram(self, msg={}): sub_data = comp.data[inds].ravel() else: - if self.config == "imviz": - # Downsample input data to about 400px (as per compass.vue) for performance. - xstep = max(1, round(data.shape[1] / 400)) - ystep = max(1, round(data.shape[0] / 400)) - arr = comp[::ystep, ::xstep] - else: - # include all data, regardless of zoom limits - arr = comp.data + # include all data, regardless of zoom limits + arr = comp.data sub_data = arr.ravel() # filter out nans (or else bqplot will fail)