Skip to content

Commit a4ae6c0

Browse files
Merge pull request #5 from norlandrhagen/multiscales_scale_fix
multiscale metadata scale fix
2 parents 4e6efdb + c27cb9d commit a4ae6c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/topozarr/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def create_multiscale_metadata(
7878

7979
def get_transform(level: int):
8080
# build transform arrays for scale and translation from dataset dimensions.
81-
s = [float(2**level) if d in spatial_dims else 1.0 for d in ds.dims]
81+
s = [2.0 if (level > 0 and d in spatial_dims) else 1.0 for d in ds.dims]
8282
t = [0.5 if (level > 0 and d in spatial_dims) else 0.0 for d in ds.dims]
8383
return {"scale": s, "translation": t}
8484

0 commit comments

Comments
 (0)