spym.process

Package Contents

Classes

Filters Filters.
Level Level.
class spym.process.Filters(spym_instance)

Filters.

gauss(self, **kwargs)

Apply Gaussian smoothing filter.

Args:
size: size of the filter in pixels.
median(self, **kwargs)

Apply median smoothing filter.

Args:
size: size of the filter in pixels.
mean(self, **kwargs)

Apply mean smoothing filter.

Args:
size: size of the filter in pixels.
sharpen(self, **kwargs)

Apply a sharpening filter.

Args:
size: size of the filter in pixels. alpha: weight.
destripe(self, **kwargs)

Find and remove scan stripes by averaging neighbourhood lines.

Args:
min_length: only scars that are as long or longer than this value (in pixels) will be marked. hard_threshold: the minimum difference of the value from the neighbouring upper and lower lines to be considered a defect. soft_threshold: values differing at least this much do not form defects themselves, but they are attached to defects obtained from the hard threshold if they touch one. sign: whether mark stripes with positive values, negative values or both. rel_threshold: the minimum difference of the value from the neighbouring upper and lower lines to be considered a defect (in physical values). Overwrite hard_threshold.
Returns:
destriped 2d array.
class spym.process.Level(spym_instance)

Level.

fixzero(self, **kwargs)

Add a constant to all the data to move the minimum (or the mean value) to zero.

Args:
to_mean: bool, optional. If true move mean value to zero, if false move mimimum to zero (default).
plane(self, **kwargs)

Corrects for sample tilting by subtraction of a plane.

align(self, **kwargs)

Align rows.

Args:
baseline: defines how baselines are estimated; ‘mean’ (default), ‘median’, ‘poly’. axis: axis along wich calculate the baselines. poly_degree: polnomial degree if baseline=’poly’.