We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4e6efdb + c27cb9d commit a4ae6c0Copy full SHA for a4ae6c0
src/topozarr/metadata.py
@@ -78,7 +78,7 @@ def create_multiscale_metadata(
78
79
def get_transform(level: int):
80
# 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]
+ s = [2.0 if (level > 0 and d in spatial_dims) else 1.0 for d in ds.dims]
82
t = [0.5 if (level > 0 and d in spatial_dims) else 0.0 for d in ds.dims]
83
return {"scale": s, "translation": t}
84
0 commit comments