zoom2aff

marxs.math.utils.zoom2aff(zoom)[source] [edit on github]

Transform zoom to affine 4*4 matrix.

Parameters:
vecfloat or (3, ) array

zoom factor for x, y, z dimension (the same zoom is applied to every dimension is the input is a scalar).

Returns:
m(4, 4) array

affine transformation matrix