colorview2d.mods package

Submodules

colorview2d.mods.Absolute module

This mod replaces the negative values with their positive counterparts.

class colorview2d.mods.Absolute.Absolute[source]

Bases: colorview2d.imod.IMod

The mod class to calculate the absolute value of the data.

do_apply(data, modargs)[source]

Replace the array by its absolute valued version.

colorview2d.mods.Adaptive_Threshold module

Adaptive_Threshold

A mod to extract prominent features from the data. The widget provides two FloatSpin controls to specify the size of the region where the peak value is compared to and a minimum height of a possible peak.

class colorview2d.mods.Adaptive_Threshold.Adaptive_Threshold[source]

Bases: colorview2d.imod.IMod

The mod class. The apply routine contains the logic for applying the adaptive threshold filter to the data.

Variables:args – A tuple containing the blocksize and the offset.
do_apply(data, modargs)[source]

To apply the mod we use the adaptive threshold routine of the :module:`skimage.filter`. The threshold is calculated from

threshold = (1+offset)*mean

where offset is the value defined via the widget. Note that the result is a binary image with values 0 and 1.

Args

data (colorview2d.Data): The data. modargs (tuple): First argument is the blocksize (integer), second

argument ist the offset for the threshold (float)

colorview2d.mods.Crop module

Crop

A mod to crop the data. The widget provides four FloatSpin controls to specify the window (xleft, xright, ybottom, ytop). A button can be used to specify set the original size in the controls.

class colorview2d.mods.Crop.Crop[source]

Bases: colorview2d.imod.IMod

The mod class. The apply routine contains the logic for cropping the data array to the new size

Variables:args – A 4-tuple containing the corners of the cropped region.
do_apply(data, modargs)[source]

To apply the mod we use the builtin crop routine of the data, a gpfile.

Parameters:data (colorview2d.Data) – The datafile.

colorview2d.mods.Derive module

This mod performs a derivation of the data with respect to the y-axis.

class colorview2d.mods.Derive.Derive[source]

Bases: colorview2d.imod.IMod

The mod class to apply the derivative of the data array with respect to the y-axis.

do_apply(data, modargs)[source]

colorview2d.mods.Flip module

This mod flips the the data along x or y direction.

class colorview2d.mods.Flip.Flip[source]

Bases: colorview2d.imod.IMod

The mod class to flip the data.

do_apply(data, modargs)[source]

colorview2d.mods.Log module

This mod calculates the logarithm of the data.zdata array.

class colorview2d.mods.Log.Log[source]

Bases: colorview2d.imod.IMod

The mod class to apply the derivative of the data array with respect to the y-axis.

do_apply(data, modargs)[source]

Calculate the natural logarithm of the data. Please make sure the data array does not contain negative values.

colorview2d.mods.Median module

This mod performs a median filter on the data. The window size for the filter is specified by wx.lib.masked.NumCtrl widgets.

class colorview2d.mods.Median.Median[source]

Bases: colorview2d.imod.IMod

Median filter class.

do_apply(data, modargs)[source]

Applies a median filter to the data.

colorview2d.mods.Rotate module

This mod performs a 90 deg clockwise or anti-clockwise rotation of the data.

class colorview2d.mods.Rotate.Rotate[source]

Bases: colorview2d.imod.IMod

The mod class to apply the rotation.

do_apply(data, modargs)[source]

Apply a clockwise or anti-clockwise rotation of the data.

Parameters:modargs (tuple) – Supply a boolean value, if True, rotate clockwise. otherwise counter-clockwise.

colorview2d.mods.Scale module

A mod to scale the data.

class colorview2d.mods.Scale.Scale[source]

Bases: colorview2d.imod.IMod

The mod class to scale the values in the 2d data array according to the value entered in the widget:

args (float): The float that is multiplied with the data array.

do_apply(data, args)[source]

colorview2d.mods.Smooth module

This mod performs a gaussian filter on the data. The window size for the filter is specified by wx.lib.masked.NumCtrl widgets.

class colorview2d.mods.Smooth.Smooth[source]

Bases: colorview2d.imod.IMod

The modification class. Convolutes a gaussian window of size

args = (xsize, ysize)

with the data array.

do_apply(data, args)[source]

Module contents