diff --git a/picasso_workflow/analyse.py b/picasso_workflow/analyse.py index bb516d5..8bf68ee 100644 --- a/picasso_workflow/analyse.py +++ b/picasso_workflow/analyse.py @@ -389,8 +389,6 @@ def _auto_min_netgrad( box_size, self.analysis_config["camera_info"], ) - logger.debug("sample spots: " + str(len(sample_spots))) - logger.debug("sample spot shape: " + str(sample_spots[0].shape)) border_width = 2 canvas_size = ( @@ -414,17 +412,10 @@ def normalize_spot(spot, maxval=255, dtype=np.uint8): ix, iy = i // sample_spots_cols, i % sample_spots_cols pix = ix * (box_size + border_width) piy = iy * (box_size + border_width) - logger.debug( - "normspot shape: " + str(normalize_spot(spot).shape) - ) - logger.debug("normspot: " + str(normalize_spot(spot))) - # logger.debug('target: ' + str(canvas[ - # pix:pix + box_size, - # piy:piy + box_size])) canvas[pix:pix + box_size, piy:piy + box_size] = ( - spot # normalize_spot(spot) + normalize_spot(spot) ) - break + # break ax[1].imshow(canvas, cmap="gray", interpolation="nearest") ax[1].grid(visible=False) ax[1].tick_params(bottom=False, left=False) diff --git a/picasso_workflow/tests/test_analyse.py b/picasso_workflow/tests/test_analyse.py index 150ffec..a30074a 100644 --- a/picasso_workflow/tests/test_analyse.py +++ b/picasso_workflow/tests/test_analyse.py @@ -128,16 +128,15 @@ def test_03_AutoPicasso_load_dataset_movie(self, mock_load_movie): @patch("picasso_workflow.analyse.localize.get_spots") def test_04_AutoPicasso_auto_min_netgrad(self, mock_get_spots): - mock_get_spots.return_value = np.random.randint( - 0, 1000, size=(7, 7), dtype=np.uint16 - ) + mock_get_spots.return_value = [ + np.random.randint(0, 1000, size=(7, 7), dtype=np.uint16) + ] * 48 fn = os.path.join(self.results_folder, "autominnet.png") results = self.ap._auto_min_netgrad( box_size=7, frame_numbers=[9], filename=fn ) logger.debug(results) assert results["filename"] == fn - assert False os.remove(fn)