xoa.core.tiles.fit_regular_axis#
- xoa.core.tiles.fit_regular_axis(axes, step=None, origin=None, size=None, name='axis')[source]#
Get the regular axis that holds increasing 1D axes
What is not given is inferred. The step is first estimated from the axes, then refined with a least squares fit on all their points, which avoids a drift over large grids with single precision coordinates, and rounded to 8 significant digits. The origin is the lowest coordinate and the size covers the last coordinate.
- Parameters:
- Returns:
float – Step
float – Origin
int – Size
- Raises:
xoa.exceptions.XoaError – When the step cannot be inferred, or when an axis starts before the origin