Data manipulation

Pingwyn has the following functions for data manipulation.

pingwyn.affine_correct(image, vectors_from, ...)

Perform an affine transformation on an image.

pingwyn.align_rows(image[, mask, method])

Perform Gwyddion-like median row alignment of images.

pingwyn.bin(obj[, bins, keep_dims, method])

Bin an object by combining datapoints.

pingwyn.clip(obj[, min, max, relative])

Clip data to cut off extreme values.

pingwyn.copy(obj)

Create an in-memory copy of a pingwyn object.

pingwyn.curve_fix_zero(curve[, strat])

Shift a curve such that the points at x = 0 or y = 0 are set to zero.

pingwyn.curves_to_profiles(curves)

Convert individual curves to line profiles.

pingwyn.differentiate(obj[, method, absolute])

Differentiate the closest thing to dy/dx for the given object.

pingwyn.fix_zero(obj, *args, **kwargs)

Wrapper for pingwyn.image_fix_zero, pingwyn.curve_fix_zero and pingwyn.profile_fix_zero.

pingwyn.image_fix_zero(image[, mask])

Set minimum value of an image to zero.

pingwyn.normalise(obj[, strat])

Normalise an object.

pingwyn.profile_fix_zero(profile[, strat])

Shift a profile such that for each curve in the profile, the points at x = 0 or y = 0 are set to zero.

pingwyn.remove_artefacts(image_trace, ...[, ...])

Remove a variety of scanning artefacts using FFT based feature detection.

pingwyn.remove_plane(image[, order, mask])

Remove an n-th order polynomial background from an image

pingwyn.smooth(obj, n_points[, strat])

Smooth data points.

pingwyn.square_pixels(image)

Resize an image such that the width and height of a pixel are equal (i.e. square).

pingwyn.to_float(obj)

Convert object values to floats.

pingwyn.to_float64(obj)

Convert object values to numpy 64-bit floats.

pingwyn.to_int(obj)

Convert object values to integers between 0 to 255

pingwyn.to_uint8(obj)

Convert object values to numpy unsigned 8-bit integers.