Skip to content

Commit

Permalink
Remove A/B/C testing. Use image.requiresPixelsPyramid()
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Feb 26, 2024
1 parent 46792d3 commit f0bcabb
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions omeroweb/webgateway/marshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,19 +355,9 @@ def pixel_size_in_microns(method):
# If image is big - need to load RE to get resolution levels
# NB: some small images like OME-Zarr can have pyramids
# but these will be ignored

# TEMP - for A/B/C testing based on image ID
starttime = datetime.now()
big_image = (rv["size"]["width"] * rv["size"]["height"]) > (3000 * 3000)
rv["tile_ABC"] = image.id % 3
if image.id % 3 == 0 and not big_image:
rv["tiles"] = False
rv["tiles_test"] = "No"
elif image.id % 3 == 1 and not image.requiresPixelsPyramid():
if not image.requiresPixelsPyramid():
rv["tiles"] = False
rv["tiles_test"] = "requiresPixelsPyramid"
else:
rv["tiles_test"] = "re.getResolutionLevels"
if load_re(image, rv):
levels = image._re.getResolutionLevels()
tiles = levels > 1
Expand All @@ -383,7 +373,6 @@ def pixel_size_in_microns(method):
if init_zoom < 0:
init_zoom = levels + init_zoom
rv["init_zoom"] = init_zoom
rv["tiles_time"] = str(datetime.now() - starttime)

if key is not None and rv is not None:
for k in key.split("."):
Expand Down

0 comments on commit f0bcabb

Please sign in to comment.