spym._accessors
¶
Package Contents¶
Classes¶
Filters |
Filters. |
Level |
Level. |
Plotting |
Plotting. |
-
class
spym._accessors.
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._accessors.
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’.
-
-
class
spym._accessors.
Plotting
(spym_instance)¶ Plotting.
-
plot
(self, title=None, waterfall=False, waterfall_limit=15, **kwargs)¶ Plot data with custom parameters using matplotlib.
- Args:
- title: (optional) title of the figure (string). By default gives some basic information on the data plotted. Pass an empty string to disable it. waterfall: (optional) boolean determining if plot spectrum data as waterfall (default is False). waterfall_limit: (optional) number of spectra above which spectrum data is plotted as image instead of waterfall (default is 15). **kwargs: any argument accepted by xarray.plot() function.
-