Skip to content

Commit

Permalink
Better exceptions re: coordinateTransformations (ref #115)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcompa committed Jul 25, 2022
1 parent 5a4634d commit 273ab07
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions fractal/tasks/image_labeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,13 @@ def image_labeling(
# Preliminary checks on multiscales
multiscales = zattrs["multiscales"]
if len(multiscales) > 1:
raise Exception(f"ERROR: There are {len(multiscales)} multiscales")
raise NotImplementedError(
f"Found {len(multiscales)} multiscales, "
"but only one is currently supported."
)
if "coordinateTransformations" in multiscales[0].keys():
raise Exception(
"ERROR: coordinateTransformations at the multiscales "
raise NotImplementedError(
"global coordinateTransformations at the multiscales "
"level are not currently supported"
)

Expand Down
4 changes: 2 additions & 2 deletions fractal/tasks/image_labeling_whole_well.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def image_labeling_whole_well(
if len(multiscales) > 1:
raise Exception(f"ERROR: There are {len(multiscales)} multiscales")
if "coordinateTransformations" in multiscales[0].keys():
raise Exception(
"ERROR: coordinateTransformations at the multiscales "
raise NotImplementedError(
"global coordinateTransformations at the multiscales "
"level are not currently supported"
)

Expand Down
4 changes: 2 additions & 2 deletions fractal/tasks/lib_zattrs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def extract_zyx_pixel_sizes(zattrs_path: str, level: int = 0):

# Check that there are no datasets-global transformations
if "coordinateTransformations" in multiscales[0].keys():
raise Exception(
"ERROR: coordinateTransformations at the multiscales "
raise NotImplementedError(
"global coordinateTransformations at the multiscales "
"level are not currently supported"
)

Expand Down

0 comments on commit 273ab07

Please sign in to comment.