ISPy.img package

Submodules

ISPy.img.align module

ISPy.img.align.align(a, b)

Compute the shifts (dy,dx) needed to align image b into a

Parameters:
  • a (ndarray) – 2D numpy array of dimensions (ny, nx)

  • b (ndarray) – 2D numpy array of dimensions (ny, nx)

Returns:

dxy – the (y,x) shifts in pixel units.

Return type:

tuple

Example

>>> a = readimage('bla.fits')
>>> b = readimage('ble.fits')
>>> dy,dx = align(a,b)
Author:

Jaime de la Cruz Rodriguez (ISP/SU 2015), ported from IDL

ISPy.img.denoising module

ISPy.img.interpolate2d module

ISPy.img.interpolate2d.check_inputs(x, y, Z, points, mode, bounds_error)

Check inputs for interpolate2d function

ISPy.img.interpolate2d.interpolate2d(x, y, Z, points, mode='linear', bounds_error=False)

2D interpolation routine: it outputs an array with same length as points with interpolated values.

Parameters:
  • x (array) – x-coordinates of the mesh on which to interpolate

  • y (array) – y-coordinates of the mesh on which to interpolate

  • Z (array) – 2D array of values for each x, y pair

  • points (array) – Nx2 array of coordinates where interpolated values are sought

  • mode (str, optional) – Determines the interpolation order, by default ‘linear’

  • bounds_error (bool, optional) – Boolean flag. If True an exception will be raised when interpolated values are requested outside the domain of the input data, by default False

  • Authors: – Modified from the SAFE library: https://github.com/inasafe/python-safe/safe/engine/interpolation2d.py

Module contents

Tools and scripts to process, align and clean 2D images.