Interpolation

aotools.interpolation.binImgs(data, n)[source]

Bins one or more images down by the given factor bins. n must be a factor of data.shape, who knows what happens otherwise……

aotools.interpolation.zoom(array, newSize, order=3)[source]

A Class to zoom 2-dimensional arrays using interpolation

Uses the scipy Interp2d interpolation routine to zoom into an array. Can cope with real of complex data.

Parameters:
  • array (ndarray) – 2-dimensional array to zoom
  • newSize (tuple) – the new size of the required array
  • order (int, optional) – Order of interpolation to use (1, 3, 5). default is 3
Returns:

zoom array of new size.

Return type:

ndarray

aotools.interpolation.zoom_rbs(array, newSize, order=3)[source]

A Class to zoom 2-dimensional arrays using RectBivariateSpline interpolation

Uses the scipy RectBivariateSpline interpolation routine to zoom into an array. Can cope with real of complex data. May be slower than above zoom, as RBS routine copies data.

Parameters:
  • array (ndarray) – 2-dimensional array to zoom
  • newSize (tuple) – the new size of the required array
  • order (int, optional) – Order of interpolation to use. default is 3
Returns:

zoom array of new size.

Return type:

ndarray