From 0c16e1d9ff0862b729be5c40eafb02eb7ec3db36 Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sat, 29 May 2021 21:17:07 -0700 Subject: [PATCH 01/13] Ignore presentations dir from language --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..206308f1e --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +presentations/* linguist-documentation \ No newline at end of file From b7204f5a4b984c48d5ba6a7b61b63bbf5d1722b2 Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sat, 29 May 2021 21:18:29 -0700 Subject: [PATCH 02/13] Try double star for ignore lang --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 206308f1e..bc8460392 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -presentations/* linguist-documentation \ No newline at end of file +presentations/** linguist-documentation \ No newline at end of file From f7b36efb30f074d9d91242414ad5fc24459bc2ae Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sat, 29 May 2021 21:34:19 -0700 Subject: [PATCH 03/13] Add benchmark for chunk size variability --- benchmarks/benchmark_chunk_sizes.py | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 benchmarks/benchmark_chunk_sizes.py diff --git a/benchmarks/benchmark_chunk_sizes.py b/benchmarks/benchmark_chunk_sizes.py new file mode 100644 index 000000000..411977bfd --- /dev/null +++ b/benchmarks/benchmark_chunk_sizes.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import random +from pathlib import Path + +from aicsimageio import AICSImage + +from .benchmark_image_containers import _ImageContainerTimeSuite + +############################################################################### + +# We only benchmark against local files as remote files are covered by unit tests +# and are generally slower than local but scale at a similar rate. +LOCAL_RESOURCES_DIR = ( + Path(__file__).parent.parent / "aicsimageio" / "tests" / "resources" +) + +############################################################################### + + +class ChunkSuite(_ImageContainerTimeSuite): + + params = ( + [ + "YX", + "ZYX", + "CYX", + "CZYX", + ], + sorted( + [ + str(f) + for f in [ + LOCAL_RESOURCES_DIR / "actk.ome.tiff", + LOCAL_RESOURCES_DIR / "pipeline-4.ome.tiff", + LOCAL_RESOURCES_DIR / "pre-variance-cfe.ome.tiff", + LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff", + ] + ] + ), + ) + + def setup(self, img_path, chunk_dims): + random.seed(42) + self.ImageContainer = AICSImage From 3098989d0fd8cdb61a7e76a340ef9dcf2b9797ae Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 13:22:53 -0700 Subject: [PATCH 04/13] Fix default and lif bench, add chunk compare --- benchmarks/benchmark_chunk_sizes.py | 73 ++++++++++++++++++++---- benchmarks/benchmark_image_containers.py | 38 +++++++----- 2 files changed, 86 insertions(+), 25 deletions(-) diff --git a/benchmarks/benchmark_chunk_sizes.py b/benchmarks/benchmark_chunk_sizes.py index 411977bfd..110643e2f 100644 --- a/benchmarks/benchmark_chunk_sizes.py +++ b/benchmarks/benchmark_chunk_sizes.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import dask.array as da import random from pathlib import Path @@ -20,27 +21,75 @@ class ChunkSuite(_ImageContainerTimeSuite): + # This suite measures the effect that changing the default chunk dims + # has on the duration of various reads. + # We would expect that processing speed can be optimized based off of the + # dimensions of the file and what the user is trying to do with said file. + # i.e. If the user wants to nrmalize each channel and make a max projection + # through Z, then the default of 'ZYX' is preferred over just 'YX'. + # During this suite we not only benchmark the above example but also + # file reading under the various chunk configurations as a monitor + # for general read performance. params = ( + [ + str(LOCAL_RESOURCES_DIR / "actk.ome.tiff"), + str(LOCAL_RESOURCES_DIR / "pipeline-4.ome.tiff"), + str(LOCAL_RESOURCES_DIR / "pre-variance-cfe.ome.tiff"), + str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff"), + ], + # We don't go above chunking by three dims because it would be rare + # to do so... if you can read four-plus dims in a single chunk why can't you + # just read in the whole image at once. + # We also use CYX here to show that chunking with the _wrong_ dimensions can + # result in longer processing times. [ "YX", "ZYX", "CYX", - "CZYX", ], - sorted( - [ - str(f) - for f in [ - LOCAL_RESOURCES_DIR / "actk.ome.tiff", - LOCAL_RESOURCES_DIR / "pipeline-4.ome.tiff", - LOCAL_RESOURCES_DIR / "pre-variance-cfe.ome.tiff", - LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff", - ] - ] - ), ) + def time_norm_and_project(self, img_path, chunk_dims): + """ + Benchmark how long a norm and project through Z takes + under various chunk dims configurations. + """ + # Init image container + r = self.ImageContainer(img_path, chunk_dims=chunk_dims) + + # Store all delayed projections + projs = [] + + # Only run the first + selected_channels = random.sample(r.channel_names, 2) + for i, channel_name in enumerate(r.channel_names): + if channel_name in selected_channels: + # Select each channel + data = r.get_image_dask_data("ZYX", C=i) + + # Get percentile norm by values + min_px_val, max_px_val = da.percentile( + data.flatten(), + [50.0, 99.8], + ).compute() + + # Norm + normed = (data - min_px_val) / (max_px_val - min_px_val) + + # Clip any values outside of 0 and 1 + clipped = da.clip(normed, 0, 1) + + # Scale them between 0 and 255 + scaled = clipped * 255 + + # Create max project + projs.append(scaled.max(axis=0)) + + # Compute all projections + projs = da.stack(projs) + projs.compute() + def setup(self, img_path, chunk_dims): random.seed(42) self.ImageContainer = AICSImage diff --git a/benchmarks/benchmark_image_containers.py b/benchmarks/benchmark_image_containers.py index 976e86ab3..36031cab7 100644 --- a/benchmarks/benchmark_image_containers.py +++ b/benchmarks/benchmark_image_containers.py @@ -5,7 +5,7 @@ from pathlib import Path from aicsimageio import AICSImage, readers -from aicsimageio.dimensions import DimensionNames +from aicsimageio.dimensions import DEFAULT_CHUNK_DIMS, DimensionNames ############################################################################### @@ -61,25 +61,34 @@ class _ImageContainerTimeSuite: DimensionNames.Samples, ] - def time_init(self, img_path): + def time_init(self, img_path, chunk_dims=None): """ Benchmark how long it takes to validate a file and finish general setup. """ - self.ImageContainer(img_path) + if chunk_dims is None: + chunk_dims = DEFAULT_CHUNK_DIMS - def time_delayed_array_construct(self, img_path): + self.ImageContainer(img_path, chunk_dims=chunk_dims) + + def time_delayed_array_construct(self, img_path, chunk_dims=None): """ Benchmark how long it takes to construct the delayed dask array for a file. """ - self.ImageContainer(img_path).dask_data + if chunk_dims is None: + chunk_dims = DEFAULT_CHUNK_DIMS + + self.ImageContainer(img_path, chunk_dims=chunk_dims).dask_data - def time_random_single_chunk_read(self, img_path): + def time_random_single_chunk_read(self, img_path, chunk_dims=None): """ Benchmark how long it takes to read a single chunk out of a file. I.E. "Pull just the Brightfield channel z-stack. """ - r = self.ImageContainer(img_path) + if chunk_dims is None: + chunk_dims = DEFAULT_CHUNK_DIMS + + r = self.ImageContainer(img_path, chunk_dims=chunk_dims) random_index_selections = {} for dim, size in zip(r.dims.order, r.dims.shape): @@ -91,13 +100,16 @@ def time_random_single_chunk_read(self, img_path): ) r.get_image_dask_data(valid_dims_to_return, **random_index_selections).compute() - def time_random_many_chunk_read(self, img_path): + def time_random_many_chunk_read(self, img_path, chunk_dims=None): """ Open a file, get many chunks out of the file at once. I.E. "Pull the DNA and Nucleus channel z-stacks, for the middle 50% timepoints". """ - r = self.ImageContainer(img_path) + if chunk_dims is None: + chunk_dims = DEFAULT_CHUNK_DIMS + + r = self.ImageContainer(img_path, chunk_dims=chunk_dims) random_index_selections = {} for dim, size in zip(r.dims.order, r.dims.shape): @@ -133,7 +145,7 @@ class DefaultReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): def setup(self, img_path): random.seed(42) - self.ImageContainer = readers.DefaultReader + self.ImageContainer = readers.default_reader.DefaultReader class TiffReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): @@ -143,7 +155,7 @@ class TiffReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): def setup(self, img_path): random.seed(42) - self.ImageContainer = readers.TiffReader + self.ImageContainer = readers.tiff_reader.TiffReader class OmeTiffReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): @@ -153,7 +165,7 @@ class OmeTiffReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): def setup(self, img_path): random.seed(42) - self.ImageContainer = readers.OmeTiffReader + self.ImageContainer = readers.ome_tiff_reader.OmeTiffReader class LifReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): @@ -163,7 +175,7 @@ class LifReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): def setup(self, img_path): random.seed(42) - self.ImageContainer = readers.LifReader + self.ImageContainer = readers.lif_reader.LifReader class AICSImageSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): From 3b620b431b4feea3f4569d1c6981c0d32dcfd7e3 Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 13:55:58 -0700 Subject: [PATCH 05/13] Benchmark aicsimageio against other libs --- asv.conf.json | 2 +- benchmarks/benchmark_lib.py | 28 +++++++++++++++++++++++++++- setup.py | 6 ++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/asv.conf.json b/asv.conf.json index e5d94ee7b..4d220fc5c 100644 --- a/asv.conf.json +++ b/asv.conf.json @@ -7,7 +7,7 @@ "dvcs": "git", "environment_type": "virtualenv", "install_command": [ - "in-dir={env_dir} python -mpip install {build_dir}[dev]" + "in-dir={env_dir} python -mpip install {build_dir}[benchmark]" ], "show_commit_url": "http://github.com/AllenCellModeling/aicsimageio/commit/", "pythons": ["3.9"], diff --git a/benchmarks/benchmark_lib.py b/benchmarks/benchmark_lib.py index 78f063f11..09540b930 100644 --- a/benchmarks/benchmark_lib.py +++ b/benchmarks/benchmark_lib.py @@ -2,9 +2,20 @@ # -*- coding: utf-8 -*- """ -Benchmarks for general library operations. +Benchmarks for general library operations and comparisons against other libraries. """ +from dask_image.imread import imread +from aicsimageio import imread_dask + +from .benchmark_image_containers import LOCAL_RESOURCES_DIR + +############################################################################### + +PIPELINE_4_OME_TIFF = str(LOCAL_RESOURCES_DIR / "pipeline-4.ome.tiff") + +############################################################################### + class LibSuite: def time_base_import(self): @@ -12,3 +23,18 @@ def time_base_import(self): Benchmark how long it takes to import the library as a whole. """ import aicsimageio # noqa: F401 + + +class LibCompareSuite: + """ + Compare aicsimageio against other "just-in-time" image reading libs. + """ + + def time_aicsimageio_chunk_zyx(self): + imread_dask(PIPELINE_4_OME_TIFF, chunk_dims="ZYX").compute() + + def time_aicsimageio_chunk_yx(self): + imread_dask(PIPELINE_4_OME_TIFF, chunk_dims="YX").compute() + + def time_dask_image(self): + imread(PIPELINE_4_OME_TIFF).compute() diff --git a/setup.py b/setup.py index 87e7d67bc..4c4008393 100644 --- a/setup.py +++ b/setup.py @@ -53,6 +53,11 @@ "wheel>=0.34.2", ] +benchmark_requirements = [ + *dev_requirements, + "dask-image~=0.6.0", +] + requirements = [ "dask[array]>=2021.4.1", "fsspec>=2021.4.0", @@ -70,6 +75,7 @@ "setup": setup_requirements, "test": test_requirements, "dev": dev_requirements, + "benchmark": benchmark_requirements, **format_libs, "all": all_formats, } From 1f597346938891e8333118f823724cdb83315229 Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 14:18:25 -0700 Subject: [PATCH 06/13] Use variance cfe instead of pipeline 4 --- benchmarks/benchmark_lib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmarks/benchmark_lib.py b/benchmarks/benchmark_lib.py index 09540b930..54bbaada1 100644 --- a/benchmarks/benchmark_lib.py +++ b/benchmarks/benchmark_lib.py @@ -12,7 +12,7 @@ ############################################################################### -PIPELINE_4_OME_TIFF = str(LOCAL_RESOURCES_DIR / "pipeline-4.ome.tiff") +VARIANCE_CFE_OME_TIFF = str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff") ############################################################################### @@ -31,10 +31,10 @@ class LibCompareSuite: """ def time_aicsimageio_chunk_zyx(self): - imread_dask(PIPELINE_4_OME_TIFF, chunk_dims="ZYX").compute() + imread_dask(VARIANCE_CFE_OME_TIFF, chunk_dims="ZYX").compute() def time_aicsimageio_chunk_yx(self): - imread_dask(PIPELINE_4_OME_TIFF, chunk_dims="YX").compute() + imread_dask(VARIANCE_CFE_OME_TIFF, chunk_dims="YX").compute() def time_dask_image(self): - imread(PIPELINE_4_OME_TIFF).compute() + imread(VARIANCE_CFE_OME_TIFF).compute() From 2eca5a7be6c53885f5c8461a8c1ef749de46b6f4 Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 14:53:56 -0700 Subject: [PATCH 07/13] Configure better lib compare bench --- benchmarks/benchmark_lib.py | 36 +++++++++++++++++++++++++----------- setup.py | 2 ++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/benchmarks/benchmark_lib.py b/benchmarks/benchmark_lib.py index 54bbaada1..5701161bf 100644 --- a/benchmarks/benchmark_lib.py +++ b/benchmarks/benchmark_lib.py @@ -5,14 +5,18 @@ Benchmarks for general library operations and comparisons against other libraries. """ -from dask_image.imread import imread -from aicsimageio import imread_dask +from functools import partial + +from aicsimageio import imread_dask as aicsimageio_imread +from dask.array.image import imread as dask_array_imread +from dask_image.imread import imread as dask_image_imread +import pims from .benchmark_image_containers import LOCAL_RESOURCES_DIR ############################################################################### -VARIANCE_CFE_OME_TIFF = str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff") +ACTK_OME_TIFF = str(LOCAL_RESOURCES_DIR / "actk.ome.tiff") ############################################################################### @@ -30,11 +34,21 @@ class LibCompareSuite: Compare aicsimageio against other "just-in-time" image reading libs. """ - def time_aicsimageio_chunk_zyx(self): - imread_dask(VARIANCE_CFE_OME_TIFF, chunk_dims="ZYX").compute() - - def time_aicsimageio_chunk_yx(self): - imread_dask(VARIANCE_CFE_OME_TIFF, chunk_dims="YX").compute() - - def time_dask_image(self): - imread(VARIANCE_CFE_OME_TIFF).compute() + FUNC_LOOKUP = { + "aicsimageio-default-chunks": partial(aicsimageio_imread, chunk_dims="ZYX"), + "aicsimageio-plane-chunks": partial(aicsimageio_imread, chunk_dims="YX"), + "dask-array-imread-default": dask_array_imread, + "dask-image-imread-default": dask_image_imread, + } + + params = [ + "aicsimageio-default-chunks", + "aicsimageio-plane-chunks", + "dask-array-imread-default", + "dask-array-imread-pims", + "dask-image-imread-default", + ] + + def time_lib_config(self, func_name): + func = self.FUNC_LOOKUP[func_name] + func(ACTK_OME_TIFF).compute() diff --git a/setup.py b/setup.py index 4c4008393..9db8381f7 100644 --- a/setup.py +++ b/setup.py @@ -56,6 +56,8 @@ benchmark_requirements = [ *dev_requirements, "dask-image~=0.6.0", + "pims", # no pin because it's pulled from dask-image + "scikit-image~=0.18.1", ] requirements = [ From 77f35118157c46a221d55d11eed6c30a8ee9c76b Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 15:11:19 -0700 Subject: [PATCH 08/13] Remove extra deps from benchmark deps --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index 9db8381f7..4c4008393 100644 --- a/setup.py +++ b/setup.py @@ -56,8 +56,6 @@ benchmark_requirements = [ *dev_requirements, "dask-image~=0.6.0", - "pims", # no pin because it's pulled from dask-image - "scikit-image~=0.18.1", ] requirements = [ From 36718399dc4419c872046566bc2d9b1b430d1c04 Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 15:11:59 -0700 Subject: [PATCH 09/13] Cleanup lib compare --- benchmarks/benchmark_lib.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/benchmarks/benchmark_lib.py b/benchmarks/benchmark_lib.py index 5701161bf..16543c720 100644 --- a/benchmarks/benchmark_lib.py +++ b/benchmarks/benchmark_lib.py @@ -8,9 +8,7 @@ from functools import partial from aicsimageio import imread_dask as aicsimageio_imread -from dask.array.image import imread as dask_array_imread from dask_image.imread import imread as dask_image_imread -import pims from .benchmark_image_containers import LOCAL_RESOURCES_DIR @@ -21,7 +19,7 @@ ############################################################################### -class LibSuite: +class LibInitSuite: def time_base_import(self): """ Benchmark how long it takes to import the library as a whole. @@ -37,15 +35,12 @@ class LibCompareSuite: FUNC_LOOKUP = { "aicsimageio-default-chunks": partial(aicsimageio_imread, chunk_dims="ZYX"), "aicsimageio-plane-chunks": partial(aicsimageio_imread, chunk_dims="YX"), - "dask-array-imread-default": dask_array_imread, "dask-image-imread-default": dask_image_imread, } params = [ "aicsimageio-default-chunks", "aicsimageio-plane-chunks", - "dask-array-imread-default", - "dask-array-imread-pims", "dask-image-imread-default", ] From 9e7f80ff7b8d87c7407b19177f31860b82a11e3b Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 15:12:20 -0700 Subject: [PATCH 10/13] Reduce the amount of files checked during benchs --- benchmarks/benchmark_chunk_sizes.py | 2 -- benchmarks/benchmark_image_containers.py | 10 ++++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/benchmarks/benchmark_chunk_sizes.py b/benchmarks/benchmark_chunk_sizes.py index 110643e2f..4ca93bf3a 100644 --- a/benchmarks/benchmark_chunk_sizes.py +++ b/benchmarks/benchmark_chunk_sizes.py @@ -33,8 +33,6 @@ class ChunkSuite(_ImageContainerTimeSuite): params = ( [ - str(LOCAL_RESOURCES_DIR / "actk.ome.tiff"), - str(LOCAL_RESOURCES_DIR / "pipeline-4.ome.tiff"), str(LOCAL_RESOURCES_DIR / "pre-variance-cfe.ome.tiff"), str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff"), ], diff --git a/benchmarks/benchmark_image_containers.py b/benchmarks/benchmark_image_containers.py index 36031cab7..a4bd349d7 100644 --- a/benchmarks/benchmark_image_containers.py +++ b/benchmarks/benchmark_image_containers.py @@ -150,7 +150,11 @@ def setup(self, img_path): class TiffReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): params = [ - sorted([str(f) for f in LOCAL_RESOURCES_DIR.glob("*.tiff")]), + str( + LOCAL_RESOURCES_DIR + / "image_stack_tpzc_50tp_2p_5z_3c_512k_1_MMStack_2-Pos001_000.ome.tif" + ), + str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff"), ] def setup(self, img_path): @@ -160,7 +164,9 @@ def setup(self, img_path): class OmeTiffReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): params = [ - sorted([str(f) for f in LOCAL_RESOURCES_DIR.glob("*.ome.tiff")]), + str(LOCAL_RESOURCES_DIR / "actk.ome.tiff"), + str(LOCAL_RESOURCES_DIR / "pre-variance-cfe.ome.tiff"), + str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff"), ] def setup(self, img_path): From c7567fbeedc27f18b5939f835964f37766ff5b57 Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 15:14:35 -0700 Subject: [PATCH 11/13] Fix benchmark params on TIFF like --- benchmarks/benchmark_image_containers.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/benchmarks/benchmark_image_containers.py b/benchmarks/benchmark_image_containers.py index a4bd349d7..c78a3aebe 100644 --- a/benchmarks/benchmark_image_containers.py +++ b/benchmarks/benchmark_image_containers.py @@ -150,11 +150,13 @@ def setup(self, img_path): class TiffReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): params = [ - str( - LOCAL_RESOURCES_DIR - / "image_stack_tpzc_50tp_2p_5z_3c_512k_1_MMStack_2-Pos001_000.ome.tif" - ), - str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff"), + [ + str( + LOCAL_RESOURCES_DIR + / "image_stack_tpzc_50tp_2p_5z_3c_512k_1_MMStack_2-Pos001_000.ome.tif" + ), + str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff"), + ] ] def setup(self, img_path): @@ -164,9 +166,11 @@ def setup(self, img_path): class OmeTiffReaderSuite(_ImageContainerTimeSuite, _ImageContainerMemorySuite): params = [ - str(LOCAL_RESOURCES_DIR / "actk.ome.tiff"), - str(LOCAL_RESOURCES_DIR / "pre-variance-cfe.ome.tiff"), - str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff"), + [ + str(LOCAL_RESOURCES_DIR / "actk.ome.tiff"), + str(LOCAL_RESOURCES_DIR / "pre-variance-cfe.ome.tiff"), + str(LOCAL_RESOURCES_DIR / "variance-cfe.ome.tiff"), + ] ] def setup(self, img_path): From 6e232181cafd4e42e3d23b119205c41aadbf25ed Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 16:32:53 -0700 Subject: [PATCH 12/13] Fix comment in random sample --- benchmarks/benchmark_chunk_sizes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_chunk_sizes.py b/benchmarks/benchmark_chunk_sizes.py index 4ca93bf3a..2ba9be4d5 100644 --- a/benchmarks/benchmark_chunk_sizes.py +++ b/benchmarks/benchmark_chunk_sizes.py @@ -59,7 +59,7 @@ def time_norm_and_project(self, img_path, chunk_dims): # Store all delayed projections projs = [] - # Only run the first + # Only run a random sample of two channels instead of all selected_channels = random.sample(r.channel_names, 2) for i, channel_name in enumerate(r.channel_names): if channel_name in selected_channels: From a2dbc6fa3381716d21246942a88ec6b5f640d963 Mon Sep 17 00:00:00 2001 From: JacksonMaxfield Date: Sun, 30 May 2021 16:43:49 -0700 Subject: [PATCH 13/13] Fix typo --- benchmarks/benchmark_chunk_sizes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_chunk_sizes.py b/benchmarks/benchmark_chunk_sizes.py index 2ba9be4d5..a97e262eb 100644 --- a/benchmarks/benchmark_chunk_sizes.py +++ b/benchmarks/benchmark_chunk_sizes.py @@ -25,7 +25,7 @@ class ChunkSuite(_ImageContainerTimeSuite): # has on the duration of various reads. # We would expect that processing speed can be optimized based off of the # dimensions of the file and what the user is trying to do with said file. - # i.e. If the user wants to nrmalize each channel and make a max projection + # i.e. If the user wants to normalize each channel and make a max projection # through Z, then the default of 'ZYX' is preferred over just 'YX'. # During this suite we not only benchmark the above example but also # file reading under the various chunk configurations as a monitor