Parameters (sigima.params)#
The sigima.params module provides all the dataset parameter classes used by
sigima.proc processing functions and DataLab’s GUI.
Tip
Always import parameters from sigima.params. While parameter classes
are defined in various submodules (e.g., sigima.proc.signal.fourier), they are
all re-exported here for convenience. This avoids confusion about where to import
from.
# ✅ Recommended: import from sigima.params
import sigima.params
param = sigima.params.ZeroPadding1DParam.create(strategy="next_pow2")
# ❌ Avoid: importing from internal modules (works but less clear)
from sigima.proc.signal.fourier import ZeroPadding1DParam
Introduction to DataSet Parameters#
The datasets listed in the following sections define the parameters necessary for
computation and processing operations in Sigima. Each dataset is a subclass of
guidata.dataset.datatypes.DataSet and needs to be instantiated before use.
Creating Parameter Instances#
Parameter classes provide a create() class method for easy instantiation:
import sigima.params
# Create with default values
param = sigima.params.NormalizeParam.create()
# Create with custom values
param = sigima.params.NormalizeParam.create(method="maximum")
Parameters Requiring Signal/Image Context#
Some parameters need to know about the signal or image they will process in order
to compute their values. For example, ZeroPadding1DParam needs to know
the signal size to calculate how many points to add for the “next_pow2” strategy.
These parameters provide an update_from_obj() method that must be called
before using the parameters:
import sigima.params
import sigima.proc.signal as sips
# Create the parameter object
param = sigima.params.ZeroPadding1DParam.create(strategy="next_pow2")
# ⚠️ At this point, param.n is still the default value (1)
# because the parameter doesn't know the signal size yet
# IMPORTANT: Update parameters from the signal
param.update_from_obj(signal)
# ✅ Now param.n is computed (e.g., 24 for a 1000-point signal)
result = sips.zero_padding(signal, param)
Parameter classes that require update_from_obj():
ZeroPadding1DParam: Computesnbased on strategy and signal sizeZeroPadding2DParam: Computes padding based on strategy and image sizeResampling1DParam: Updates bounds based on signal rangeResampling2DParam: Updates bounds based on signal rangeResizeParam: Updates bounds based on image dimensionsTranslateParam: Updates bounds based on image dimensionsLineProfileParam: Updates line coordinates based on image dimensionsBandPassFilterParam,BandStopFilterParam,HighPassFilterParam,LowPassFilterParam: Update frequency bounds
Note
Not all parameters require update_from_obj(). Simple parameters like
NormalizeParam or GaussianParam work with fixed values and
don’t need signal/image context.
Complete Example#
Here is a complete example of how to instantiate a dataset and access its parameters
with the sigima.params.BinningParam dataset:
- class sigima.params.BinningParam[source]
Binning parameters.
- sx
Cluster size (X). Number of adjacent pixels to be combined together along x-axis. Integer higher than 2. Default: 2.
- sy
Cluster size (Y). Number of adjacent pixels to be combined together along y-axis. Integer higher than 2. Default: 2.
- operation
Single choice from: ‘SUM’, ‘AVERAGE’, ‘MEDIAN’, ‘MIN’, ‘MAX’. Default: ‘SUM’.
- dtype_str
Data type. Output image data type. Single choice from: ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
- change_pixel_size
If checked, pixel size is updated according to binning factors. Users who prefer to work with pixel coordinates may want to uncheck this. Default: True.
- classmethod create(sx: int, sy: int, operation: str, dtype_str: str, change_pixel_size: bool) sigima.proc.image.preprocessing.BinningParam
Returns a new instance of
BinningParamwith the fields set to the given values.
- Parameters:
sx (int) – Cluster size (X). Number of adjacent pixels to be combined together along x-axis. Integer higher than 2. Default: 2.
sy (int) – Cluster size (Y). Number of adjacent pixels to be combined together along y-axis. Integer higher than 2. Default: 2.
operation (str) – Single choice from: ‘SUM’, ‘AVERAGE’, ‘MEDIAN’, ‘MIN’, ‘MAX’. Default: ‘SUM’.
dtype_str (str) – Data type. Output image data type. Single choice from: ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
change_pixel_size (bool) – If checked, pixel size is updated according to binning factors. Users who prefer to work with pixel coordinates may want to uncheck this. Default: True.
- Returns:
New instance of
BinningParam.Note
To instanciate a new
BinningParamdataset, you can use the classmethodBinningParam.create()like this:BinningParam.create(sx=2, sy=2, operation='SUM', dtype_str='dtype', change_pixel_size=True)You can also first instanciate a default
BinningParamand then set the fields like this:param = BinningParam() param.sx = 2 param.sy = 2 param.operation = 'SUM' param.dtype_str = 'dtype' param.change_pixel_size = True
I/O parameters#
- class sigima.io.convenience.SaveToDirectoryParam[source]
Save to directory parameters.
- directory
Default: None.
- basename
Basename pattern. Pattern accepts a python format string. standard python formatting fields may be used, including: {title}, {index}, {count}, {xlabel}, {xunit}, {ylabel}, {yunit}, {metadata}, {metadata[key]}. Default: ‘{title}’.
- extension
File extension with leading dot (e.g. .txt or .csv). String, regexp:
^\.\w+$. Default: None.
- overwrite
Overwrite existing files. Default: False.
- classmethod create(directory: str, basename: str, extension: str, overwrite: bool) sigima.io.convenience.SaveToDirectoryParam
Returns a new instance of
SaveToDirectoryParamwith the fields set to the given values.- Parameters:
directory (str) – Default: None.
basename (str) – Basename pattern. Pattern accepts a python format string. standard python formatting fields may be used, including: {title}, {index}, {count}, {xlabel}, {xunit}, {ylabel}, {yunit}, {metadata}, {metadata[key]}. Default: ‘{title}’.
extension (str) – File extension with leading dot (e.g. .txt or .csv). String, regexp:
^\.\w+$. Default: None.overwrite (bool) – Overwrite existing files. Default: False.
- Returns:
New instance of
SaveToDirectoryParam.
Common parameters#
- class sigima.params.ArithmeticParam[source]
Arithmetic parameters
- operator
Single choice from: ‘ADD’, ‘SUBTRACT’, ‘MULTIPLY’, ‘DIVIDE’. Default: ‘ADD’.
- factor
Default: 1.0.
- constant
Default: 0.0.
- operation
Default: ‘’.
- restore_dtype
Result. Default: True.
- class sigima.params.ClipParam[source]
Data clipping parameters
- lower
Lower clipping value. Default: None.
- upper
Upper clipping value. Default: None.
- class sigima.params.ConstantParam[source]
Parameter used to set a constant value to used in operations
- value
Constant value. Default: None.
- class sigima.params.FFTParam[source]
FFT parameters
- shift
Shift zero frequency to center. Default: None.
- class sigima.params.GaussianParam[source]
Gaussian filter parameters.
- sigma
σ. Standard deviation of the gaussian filter. Float higher than 0.0. Default: 1.0.
- class sigima.params.HistogramParam[source]
Histogram parameters
- bins
Number of bins. Integer higher than 1. Default: 256.
- lower
Lower limit. Default: None.
- upper
Upper limit. Default: None.
- class sigima.params.MovingAverageParam[source]
Moving average parameters
- n
Size of the moving window. Integer higher than 1. Default: 3.
- mode
Mode of the filter: - ‘reflect’: reflect the data at the boundary - ‘constant’: pad with a constant value - ‘nearest’: pad with the nearest value - ‘mirror’: reflect the data at the boundary with the data itself - ‘wrap’: circular boundary. Single choice from: ‘REFLECT’, ‘CONSTANT’, ‘NEAREST’, ‘MIRROR’, ‘WRAP’. Default: ‘REFLECT’.
- classmethod create(n: int, mode: str) sigima.proc.base.MovingAverageParam
Returns a new instance of
MovingAverageParamwith the fields set to the given values.- Parameters:
n (int) – Size of the moving window. Integer higher than 1. Default: 3.
mode (str) – Mode of the filter: - ‘reflect’: reflect the data at the boundary - ‘constant’: pad with a constant value - ‘nearest’: pad with the nearest value - ‘mirror’: reflect the data at the boundary with the data itself - ‘wrap’: circular boundary. Single choice from: ‘REFLECT’, ‘CONSTANT’, ‘NEAREST’, ‘MIRROR’, ‘WRAP’. Default: ‘REFLECT’.
- Returns:
New instance of
MovingAverageParam.
- class sigima.params.MovingMedianParam[source]
Moving median parameters
- n
Size of the moving window. Integer higher than 1, odd. Default: 3.
- mode
Mode of the filter: - ‘reflect’: reflect the data at the boundary - ‘constant’: pad with a constant value - ‘nearest’: pad with the nearest value - ‘mirror’: reflect the data at the boundary with the data itself - ‘wrap’: circular boundary. Single choice from: ‘REFLECT’, ‘CONSTANT’, ‘NEAREST’, ‘MIRROR’, ‘WRAP’. Default: ‘NEAREST’.
- classmethod create(n: int, mode: str) sigima.proc.base.MovingMedianParam
Returns a new instance of
MovingMedianParamwith the fields set to the given values.- Parameters:
n (int) – Size of the moving window. Integer higher than 1, odd. Default: 3.
mode (str) – Mode of the filter: - ‘reflect’: reflect the data at the boundary - ‘constant’: pad with a constant value - ‘nearest’: pad with the nearest value - ‘mirror’: reflect the data at the boundary with the data itself - ‘wrap’: circular boundary. Single choice from: ‘REFLECT’, ‘CONSTANT’, ‘NEAREST’, ‘MIRROR’, ‘WRAP’. Default: ‘NEAREST’.
- Returns:
New instance of
MovingMedianParam.
- class sigima.params.NormalizeParam[source]
Normalize parameters
- method
Normalize with respect to. Single choice from: ‘MAXIMUM’, ‘AMPLITUDE’, ‘AREA’, ‘ENERGY’, ‘RMS’. Default: ‘MAXIMUM’.
- classmethod create(method: str) sigima.proc.base.NormalizeParam
Returns a new instance of
NormalizeParamwith the fields set to the given values.- Parameters:
method (str) – Normalize with respect to. Single choice from: ‘MAXIMUM’, ‘AMPLITUDE’, ‘AREA’, ‘ENERGY’, ‘RMS’. Default: ‘MAXIMUM’.
- Returns:
New instance of
NormalizeParam.
- class sigima.params.SpectrumParam[source]
Spectrum parameters.
- decibel
Default: False.
Signal parameters#
- class sigima.params.AllanVarianceParam[source]
Allan variance parameters
- max_tau
Max τ. Integer higher than 1, unit: pts. Default: 100.
- classmethod create(max_tau: int) sigima.proc.signal.stability.AllanVarianceParam
Returns a new instance of
AllanVarianceParamwith the fields set to the given values.- Parameters:
max_tau (int) – Max τ. Integer higher than 1, unit: pts. Default: 100.
- Returns:
New instance of
AllanVarianceParam.
- class sigima.params.AngleUnitParam[source]
Choice of angle unit.
- unit
Angle unit. Unit of angle measurement. Single choice from: ‘RADIAN’, ‘DEGREE’. Default: ‘RADIAN’.
- classmethod create(unit: str) sigima.proc.base.AngleUnitParam
Returns a new instance of
AngleUnitParamwith the fields set to the given values.- Parameters:
unit (str) – Angle unit. Unit of angle measurement. Single choice from: ‘RADIAN’, ‘DEGREE’. Default: ‘RADIAN’.
- Returns:
New instance of
AngleUnitParam.
- class sigima.params.BandPassFilterParam[source]
Band-pass filter parameters
- method
Filter method. Single choice from: ‘butterworth’, ‘bessel’, ‘chebyshev1’, ‘chebyshev2’, ‘elliptic’, ‘brickwall’. Default: ‘butterworth’.
- order
Filter order. Integer higher than 1. Default: 3.
- cut0
Low cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
- cut1
High cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
- rp
Passband ripple. Float higher than 0.0, non zero, unit: db. Default: 1.0.
- rs
Stopband attenuation. Float higher than 0.0, non zero, unit: db. Default: 60.0.
- zero_padding
Default: True.
- nfft
Minimum FFT points number. Default: 0.
- classmethod create(method: sigima.enums.FrequencyFilterMethod, order: int, cut0: float, cut1: float, rp: float, rs: float, zero_padding: bool, nfft: int) sigima.proc.signal.filtering.BandPassFilterParam
Returns a new instance of
BandPassFilterParamwith the fields set to the given values.- Parameters:
method (sigima.enums.FrequencyFilterMethod) – Filter method. Single choice from: ‘butterworth’, ‘bessel’, ‘chebyshev1’, ‘chebyshev2’, ‘elliptic’, ‘brickwall’. Default: ‘butterworth’.
order (int) – Filter order. Integer higher than 1. Default: 3.
cut0 (float) – Low cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
cut1 (float) – High cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
rp (float) – Passband ripple. Float higher than 0.0, non zero, unit: db. Default: 1.0.
rs (float) – Stopband attenuation. Float higher than 0.0, non zero, unit: db. Default: 60.0.
zero_padding (bool) – Default: True.
nfft (int) – Minimum FFT points number. Default: 0.
- Returns:
New instance of
BandPassFilterParam.
- class sigima.params.BandStopFilterParam[source]
Band-stop filter parameters
- method
Filter method. Single choice from: ‘butterworth’, ‘bessel’, ‘chebyshev1’, ‘chebyshev2’, ‘elliptic’, ‘brickwall’. Default: ‘butterworth’.
- order
Filter order. Integer higher than 1. Default: 3.
- cut0
Low cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
- cut1
High cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
- rp
Passband ripple. Float higher than 0.0, non zero, unit: db. Default: 1.0.
- rs
Stopband attenuation. Float higher than 0.0, non zero, unit: db. Default: 60.0.
- zero_padding
Default: True.
- nfft
Minimum FFT points number. Default: 0.
- classmethod create(method: sigima.enums.FrequencyFilterMethod, order: int, cut0: float, cut1: float, rp: float, rs: float, zero_padding: bool, nfft: int) sigima.proc.signal.filtering.BandStopFilterParam
Returns a new instance of
BandStopFilterParamwith the fields set to the given values.- Parameters:
method (sigima.enums.FrequencyFilterMethod) – Filter method. Single choice from: ‘butterworth’, ‘bessel’, ‘chebyshev1’, ‘chebyshev2’, ‘elliptic’, ‘brickwall’. Default: ‘butterworth’.
order (int) – Filter order. Integer higher than 1. Default: 3.
cut0 (float) – Low cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
cut1 (float) – High cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
rp (float) – Passband ripple. Float higher than 0.0, non zero, unit: db. Default: 1.0.
rs (float) – Stopband attenuation. Float higher than 0.0, non zero, unit: db. Default: 60.0.
zero_padding (bool) – Default: True.
nfft (int) – Minimum FFT points number. Default: 0.
- Returns:
New instance of
BandStopFilterParam.
- class sigima.params.DataTypeSParam[source]
Convert signal data type parameters
- dtype_str
Destination data type. Output image data type. Single choice from: ‘float32’, ‘float64’, ‘complex128’. Default: ‘float32’.
- classmethod create(dtype_str: str) sigima.proc.signal.mathops.DataTypeSParam
Returns a new instance of
DataTypeSParamwith the fields set to the given values.- Parameters:
dtype_str (str) – Destination data type. Output image data type. Single choice from: ‘float32’, ‘float64’, ‘complex128’. Default: ‘float32’.
- Returns:
New instance of
DataTypeSParam.
- class sigima.params.DetrendingParam[source]
Detrending parameters
- method
Detrending method. Single choice from: ‘linear’, ‘constant’. Default: ‘linear’.
- classmethod create(method: str) sigima.proc.signal.processing.DetrendingParam
Returns a new instance of
DetrendingParamwith the fields set to the given values.- Parameters:
method (str) – Detrending method. Single choice from: ‘linear’, ‘constant’. Default: ‘linear’.
- Returns:
New instance of
DetrendingParam.
- class sigima.params.DynamicParam[source]
Parameters for dynamic range computation (ENOB, SNR, SINAD, THD, SFDR)
- full_scale
Float higher than 0.0, unit: v. Default: 0.16.
- unit
Unit for sinad. Single choice from: ‘dBc’, ‘dBFS’. Default: ‘dBc’.
- nb_harm
Number of harmonics. Number of harmonics to consider for thd. Integer higher than 1. Default: 5.
- classmethod create(full_scale: float, unit: sigima.enums.PowerUnit, nb_harm: int) sigima.proc.signal.features.DynamicParam
Returns a new instance of
DynamicParamwith the fields set to the given values.- Parameters:
- Returns:
New instance of
DynamicParam.
- class sigima.params.AbscissaParam[source]
Abscissa parameter.
- x
Default: 0.0.
- classmethod create(x: float) sigima.proc.signal.features.AbscissaParam
Returns a new instance of
AbscissaParamwith the fields set to the given values.- Parameters:
x (float) – Default: 0.0.
- Returns:
New instance of
AbscissaParam.
- class sigima.params.OrdinateParam[source]
Ordinate parameter.
- y
Default: 0.0.
- classmethod create(y: float) sigima.proc.signal.features.OrdinateParam
Returns a new instance of
OrdinateParamwith the fields set to the given values.- Parameters:
y (float) – Default: 0.0.
- Returns:
New instance of
OrdinateParam.
- class sigima.params.FWHMParam[source]
FWHM parameters
- method
Single choice from: ‘zero-crossing’, ‘gauss’, ‘lorentz’, ‘voigt’. Default: ‘zero-crossing’.
- xmin
XMIN. Lower x boundary (empty for no limit, i.e. Start of the signal). Default: None.
- xmax
XMAX. Upper x boundary (empty for no limit, i.e. End of the signal). Default: None.
- classmethod create(method: str, xmin: float, xmax: float) sigima.proc.signal.features.FWHMParam
Returns a new instance of
FWHMParamwith the fields set to the given values.- Parameters:
method (str) – Single choice from: ‘zero-crossing’, ‘gauss’, ‘lorentz’, ‘voigt’. Default: ‘zero-crossing’.
xmin (float) – XMIN. Lower x boundary (empty for no limit, i.e. Start of the signal). Default: None.
xmax (float) – XMAX. Upper x boundary (empty for no limit, i.e. End of the signal). Default: None.
- Returns:
New instance of
FWHMParam.
- class sigima.params.HighPassFilterParam[source]
High-pass filter parameters
- method
Filter method. Single choice from: ‘butterworth’, ‘bessel’, ‘chebyshev1’, ‘chebyshev2’, ‘elliptic’, ‘brickwall’. Default: ‘butterworth’.
- order
Filter order. Integer higher than 1. Default: 3.
- cut0
Cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- cut1
High cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
- rp
Passband ripple. Float higher than 0.0, non zero, unit: db. Default: 1.0.
- rs
Stopband attenuation. Float higher than 0.0, non zero, unit: db. Default: 60.0.
- zero_padding
Default: True.
- nfft
Minimum FFT points number. Default: 0.
- classmethod create(method: sigima.enums.FrequencyFilterMethod, order: int, cut0: float, cut1: float, rp: float, rs: float, zero_padding: bool, nfft: int) sigima.proc.signal.filtering.HighPassFilterParam
Returns a new instance of
HighPassFilterParamwith the fields set to the given values.- Parameters:
method (sigima.enums.FrequencyFilterMethod) – Filter method. Single choice from: ‘butterworth’, ‘bessel’, ‘chebyshev1’, ‘chebyshev2’, ‘elliptic’, ‘brickwall’. Default: ‘butterworth’.
order (int) – Filter order. Integer higher than 1. Default: 3.
cut0 (float) – Cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
cut1 (float) – High cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
rp (float) – Passband ripple. Float higher than 0.0, non zero, unit: db. Default: 1.0.
rs (float) – Stopband attenuation. Float higher than 0.0, non zero, unit: db. Default: 60.0.
zero_padding (bool) – Default: True.
nfft (int) – Minimum FFT points number. Default: 0.
- Returns:
New instance of
HighPassFilterParam.
- class sigima.params.InterpolationParam[source]
Interpolation parameters
- method
Interpolation method. Single choice from: ‘linear’, ‘spline’, ‘quadratic’, ‘cubic’, ‘barycentric’, ‘pchip’. Default: ‘linear’.
- fill_value
Value to use for points outside the interpolation domain (used only with linear, cubic and pchip methods). Default: None.
- classmethod create(method: sigima.enums.Interpolation1DMethod, fill_value: float) sigima.proc.signal.processing.InterpolationParam
Returns a new instance of
InterpolationParamwith the fields set to the given values.- Parameters:
method (sigima.enums.Interpolation1DMethod) – Interpolation method. Single choice from: ‘linear’, ‘spline’, ‘quadratic’, ‘cubic’, ‘barycentric’, ‘pchip’. Default: ‘linear’.
fill_value (float) – Value to use for points outside the interpolation domain (used only with linear, cubic and pchip methods). Default: None.
- Returns:
New instance of
InterpolationParam.
- class sigima.params.LowPassFilterParam[source]
Low-pass filter parameters
- method
Filter method. Single choice from: ‘butterworth’, ‘bessel’, ‘chebyshev1’, ‘chebyshev2’, ‘elliptic’, ‘brickwall’. Default: ‘butterworth’.
- order
Filter order. Integer higher than 1. Default: 3.
- cut0
Cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- cut1
High cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
- rp
Passband ripple. Float higher than 0.0, non zero, unit: db. Default: 1.0.
- rs
Stopband attenuation. Float higher than 0.0, non zero, unit: db. Default: 60.0.
- zero_padding
Default: True.
- nfft
Minimum FFT points number. Default: 0.
- classmethod create(method: sigima.enums.FrequencyFilterMethod, order: int, cut0: float, cut1: float, rp: float, rs: float, zero_padding: bool, nfft: int) sigima.proc.signal.filtering.LowPassFilterParam
Returns a new instance of
LowPassFilterParamwith the fields set to the given values.- Parameters:
method (sigima.enums.FrequencyFilterMethod) – Filter method. Single choice from: ‘butterworth’, ‘bessel’, ‘chebyshev1’, ‘chebyshev2’, ‘elliptic’, ‘brickwall’. Default: ‘butterworth’.
order (int) – Filter order. Integer higher than 1. Default: 3.
cut0 (float) – Cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
cut1 (float) – High cutoff frequency. Float higher than 0.0, non zero, unit: hz. Default: None.
rp (float) – Passband ripple. Float higher than 0.0, non zero, unit: db. Default: 1.0.
rs (float) – Stopband attenuation. Float higher than 0.0, non zero, unit: db. Default: 60.0.
zero_padding (bool) – Default: True.
nfft (int) – Minimum FFT points number. Default: 0.
- Returns:
New instance of
LowPassFilterParam.
- class sigima.params.PeakDetectionParam[source]
Peak detection parameters
- threshold
Float higher than 0.0. Default: 0.1.
- min_dist
Minimum distance. Integer higher than 1. Default: 1.
- classmethod create(threshold: float, min_dist: int) sigima.proc.signal.features.PeakDetectionParam
Returns a new instance of
PeakDetectionParamwith the fields set to the given values.
- class sigima.params.PolynomialFitParam[source]
Polynomial fitting parameters
- degree
Integer between 1 and 10. Default: 3.
- classmethod create(degree: int) sigima.proc.signal.fitting.PolynomialFitParam
Returns a new instance of
PolynomialFitParamwith the fields set to the given values.- Parameters:
degree (int) – Integer between 1 and 10. Default: 3.
- Returns:
New instance of
PolynomialFitParam.
- class sigima.params.PowerParam[source]
Power parameters
- power
Default: 2.0.
- classmethod create(power: float) sigima.proc.signal.mathops.PowerParam
Returns a new instance of
PowerParamwith the fields set to the given values.- Parameters:
power (float) – Default: 2.0.
- Returns:
New instance of
PowerParam.
- class sigima.params.PulseFeaturesParam[source]
Pulse features parameters.
- signal_shape
Signal type: auto-detect, step, or square. Single choice from: None, ‘step’, ‘square’. Default: None.
- xstartmin
Start baseline min. Lower x boundary for the start baseline. Default: 0.0.
- xstartmax
Start baseline max. Upper x boundary for the start baseline. Default: 0.0.
- xendmin
End baseline min. Lower x boundary for the end baseline. Default: 1.0.
- xendmax
End baseline max. Upper x boundary for the end baseline. Default: 1.0.
- reference_levels
Rise/Fall time. Reference levels for rise/fall time measurement. 10%-90% is the ieee standard for digital signal analysis. Single choice from: (5, 95), (10, 90), (20, 80), (25, 75). Default: (10, 90).
- classmethod create(signal_shape: str | NoneType, xstartmin: float, xstartmax: float, xendmin: float, xendmax: float, reference_levels: tuple) sigima.proc.signal.analysis.PulseFeaturesParam
Returns a new instance of
PulseFeaturesParamwith the fields set to the given values.- Parameters:
signal_shape (Union[str, NoneType]) – Signal type: auto-detect, step, or square. Single choice from: None, ‘step’, ‘square’. Default: None.
xstartmin (float) – Start baseline min. Lower x boundary for the start baseline. Default: 0.0.
xstartmax (float) – Start baseline max. Upper x boundary for the start baseline. Default: 0.0.
xendmin (float) – End baseline min. Lower x boundary for the end baseline. Default: 1.0.
xendmax (float) – End baseline max. Upper x boundary for the end baseline. Default: 1.0.
reference_levels (tuple) – Rise/Fall time. Reference levels for rise/fall time measurement. 10%-90% is the ieee standard for digital signal analysis. Single choice from: (5, 95), (10, 90), (20, 80), (25, 75). Default: (10, 90).
- Returns:
New instance of
PulseFeaturesParam.
- class sigima.params.Resampling1DParam[source]
Resample parameters for 1D signals
- method
Interpolation method. Single choice from: ‘linear’, ‘spline’, ‘quadratic’, ‘cubic’, ‘barycentric’, ‘pchip’. Default: ‘linear’.
- fill_value
Value to use for points outside the interpolation domain (used only with linear, cubic and pchip methods). Default: None.
- xmin
Xmin. Default: None.
- xmax
Xmax. Default: None.
- mode
Single choice from: ‘dx’, ‘nbpts’. Default: ‘nbpts’.
- dx
ΔX. Default: None.
- nbpts
Number of points. Default: None.
- classmethod create(method: sigima.enums.Interpolation1DMethod, fill_value: float, xmin: float, xmax: float, mode: str, dx: float, nbpts: int) sigima.proc.signal.processing.Resampling1DParam
Returns a new instance of
Resampling1DParamwith the fields set to the given values.- Parameters:
method (sigima.enums.Interpolation1DMethod) – Interpolation method. Single choice from: ‘linear’, ‘spline’, ‘quadratic’, ‘cubic’, ‘barycentric’, ‘pchip’. Default: ‘linear’.
fill_value (float) – Value to use for points outside the interpolation domain (used only with linear, cubic and pchip methods). Default: None.
xmin (float) – Xmin. Default: None.
xmax (float) – Xmax. Default: None.
mode (str) – Single choice from: ‘dx’, ‘nbpts’. Default: ‘nbpts’.
dx (float) – ΔX. Default: None.
nbpts (int) – Number of points. Default: None.
- Returns:
New instance of
Resampling1DParam.
- class sigima.params.Resampling2DParam[source]
Resample parameters for 2D images
- xmin
Xmin. Minimum x-coordinate of the output image. Default: None.
- xmax
Xmax. Maximum x-coordinate of the output image. Default: None.
- ymin
Ymin. Minimum y-coordinate of the output image. Default: None.
- ymax
Ymax. Maximum y-coordinate of the output image. Default: None.
- mode
Single choice from: ‘dxy’, ‘shape’. Default: ‘shape’.
- dx
ΔX. Pixel size in x direction. Default: None.
- dy
ΔY. Pixel size in y direction. Default: None.
- width
Output image width in pixels. Default: None.
- height
Output image height in pixels. Default: None.
- method
Interpolation method. Single choice from: ‘NEAREST’, ‘LINEAR’, ‘CUBIC’. Default: ‘LINEAR’.
- fill_value
Value to use for points outside the input image domain. If none, uses nan for extrapolation. Default: None.
- classmethod create(xmin: float, xmax: float, ymin: float, ymax: float, mode: str, dx: float, dy: float, width: int, height: int, method: str, fill_value: float) sigima.proc.image.geometry.Resampling2DParam
Returns a new instance of
Resampling2DParamwith the fields set to the given values.- Parameters:
xmin (float) – Xmin. Minimum x-coordinate of the output image. Default: None.
xmax (float) – Xmax. Maximum x-coordinate of the output image. Default: None.
ymin (float) – Ymin. Minimum y-coordinate of the output image. Default: None.
ymax (float) – Ymax. Maximum y-coordinate of the output image. Default: None.
mode (str) – Single choice from: ‘dxy’, ‘shape’. Default: ‘shape’.
dx (float) – ΔX. Pixel size in x direction. Default: None.
dy (float) – ΔY. Pixel size in y direction. Default: None.
width (int) – Output image width in pixels. Default: None.
height (int) – Output image height in pixels. Default: None.
method (str) – Interpolation method. Single choice from: ‘NEAREST’, ‘LINEAR’, ‘CUBIC’. Default: ‘LINEAR’.
fill_value (float) – Value to use for points outside the input image domain. If none, uses nan for extrapolation. Default: None.
- Returns:
New instance of
Resampling2DParam.
- class sigima.params.WindowingParam[source]
Windowing parameters.
- method
Single choice from: ‘BARTHANN’, ‘BARTLETT’, ‘BLACKMAN’, ‘BLACKMAN_HARRIS’, ‘BOHMAN’, ‘BOXCAR’, ‘COSINE’, ‘EXPONENTIAL’, ‘FLAT_TOP’, ‘GAUSSIAN’, ‘HAMMING’, ‘HANN’, ‘KAISER’, ‘LANCZOS’, ‘NUTTALL’, ‘PARZEN’, ‘TAYLOR’, ‘TUKEY’. Default: ‘HAMMING’.
- alpha
Shape parameter of the tukey windowing function. Default: 0.5.
- beta
Shape parameter of the kaiser windowing function. Default: 14.0.
- sigma
Shape parameter of the gaussian windowing function. Default: 0.5.
- classmethod create(method: str, alpha: float, beta: float, sigma: float) sigima.proc.signal.processing.WindowingParam
Returns a new instance of
WindowingParamwith the fields set to the given values.- Parameters:
method (str) – Single choice from: ‘BARTHANN’, ‘BARTLETT’, ‘BLACKMAN’, ‘BLACKMAN_HARRIS’, ‘BOHMAN’, ‘BOXCAR’, ‘COSINE’, ‘EXPONENTIAL’, ‘FLAT_TOP’, ‘GAUSSIAN’, ‘HAMMING’, ‘HANN’, ‘KAISER’, ‘LANCZOS’, ‘NUTTALL’, ‘PARZEN’, ‘TAYLOR’, ‘TUKEY’. Default: ‘HAMMING’.
alpha (float) – Shape parameter of the tukey windowing function. Default: 0.5.
beta (float) – Shape parameter of the kaiser windowing function. Default: 14.0.
sigma (float) – Shape parameter of the gaussian windowing function. Default: 0.5.
- Returns:
New instance of
WindowingParam.
- class sigima.params.XYCalibrateParam[source]
Signal calibration parameters
- axis
Calibrate. Single choice from: ‘x’, ‘y’. Default: ‘y’.
- a
Default: 1.0.
- b
Default: 0.0.
- classmethod create(axis: str, a: float, b: float) sigima.proc.signal.processing.XYCalibrateParam
Returns a new instance of
XYCalibrateParamwith the fields set to the given values.
- class sigima.params.ZeroPadding1DParam[source]
Zero-padding parameters for signals.
This class manages parameters for applying zero-padding to signals, commonly used to improve FFT resolution or prepare signals for convolution.
Important
For strategies other than “custom”, the number of points to add (
n) is automatically calculated based on the signal size. However, this calculation requires knowledge of the signal, so you must callupdate_from_obj()before using the parameters.Example usage:
import sigima.params import sigima.proc.signal as sips # Create the parameter object param = sigima.params.ZeroPadding1DParam.create(strategy="next_pow2") # IMPORTANT: Update parameters from the signal to compute 'n' param.update_from_obj(signal) # Now the parameters are ready to use result = sips.zero_padding(signal, param)
Attributes:
strategies: Available strategies (“next_pow2”, “double”, “triple”, “custom”).
strategy: Choice item for selecting the zero-padding strategy.
"next_pow2": Pad to the next power of 2 (optimal for FFT)"double": Double the signal length"triple": Triple the signal length"custom": Use a user-specified number of points
location: Where to add the padding (“append”, “prepend”, or “both”).
n: Number of points to add as padding. For “custom” strategy, this is user-specified. For other strategies, it is computed automatically by
update_from_obj().
- strategy
Single choice from: ‘next_pow2’, ‘double’, ‘triple’, ‘custom’. Default: ‘next_pow2’.
- location
Where to add the padding. Single choice from: ‘APPEND’, ‘PREPEND’, ‘BOTH’. Default: ‘APPEND’.
- n
Number of points. Number of points to add. Integer higher than 1. Default: 1.
- classmethod create(strategy: str, location: str, n: int) sigima.proc.signal.fourier.ZeroPadding1DParam
Returns a new instance of
ZeroPadding1DParamwith the fields set to the given values.- Parameters:
strategy (str) – Single choice from: ‘next_pow2’, ‘double’, ‘triple’, ‘custom’. Default: ‘next_pow2’.
location (str) – Where to add the padding. Single choice from: ‘APPEND’, ‘PREPEND’, ‘BOTH’. Default: ‘APPEND’.
n (int) – Number of points. Number of points to add. Integer higher than 1. Default: 1.
- Returns:
New instance of
ZeroPadding1DParam.
Image parameters#
Base image parameters#
- class sigima.params.GridParam[source]
Grid parameters
- direction
Distribute over. Single choice from: ‘col’, ‘row’. Default: ‘col’.
- cols
Columns. Integer, non zero. Default: 1.
- rows
Integer, non zero. Default: 1.
- colspac
Column spacing. Float higher than 0.0. Default: 0.0.
- rowspac
Row spacing. Float higher than 0.0. Default: 0.0.
- classmethod create(direction: str, cols: int, rows: int, colspac: float, rowspac: float) sigima.proc.image.GridParam
Returns a new instance of
GridParamwith the fields set to the given values.- Parameters:
direction (str) – Distribute over. Single choice from: ‘col’, ‘row’. Default: ‘col’.
cols (int) – Columns. Integer, non zero. Default: 1.
rows (int) – Integer, non zero. Default: 1.
colspac (float) – Column spacing. Float higher than 0.0. Default: 0.0.
rowspac (float) – Row spacing. Float higher than 0.0. Default: 0.0.
- Returns:
New instance of
GridParam.
Detection parameters#
- class sigima.params.BlobDOGParam[source]
Blob detection using Difference of Gaussian method
- create_rois
Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
- roi_geometry
Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
- min_sigma
σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 10.0.
- max_sigma
σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
- threshold_rel
Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
- overlap
If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
- exclude_border
If true, exclude blobs from the border of the image. Default: True.
- classmethod create(create_rois: bool, roi_geometry: str, min_sigma: float, max_sigma: float, threshold_rel: float, overlap: float, exclude_border: bool) sigima.proc.image.detection.BlobDOGParam
Returns a new instance of
BlobDOGParamwith the fields set to the given values.- Parameters:
create_rois (bool) – Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
roi_geometry (str) – Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
min_sigma (float) – σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 10.0.
max_sigma (float) – σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
threshold_rel (float) – Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
overlap (float) – If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
exclude_border (bool) – If true, exclude blobs from the border of the image. Default: True.
- Returns:
New instance of
BlobDOGParam.
- class sigima.params.BlobDOHParam[source]
Blob detection using Determinant of Hessian method
- create_rois
Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
- roi_geometry
Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
- min_sigma
σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 10.0.
- max_sigma
σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
- threshold_rel
Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
- overlap
If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
- log_scale
If set intermediate values of standard deviations are interpolated using a logarithmic scale to the base 10. If not, linear interpolation is used. Default: False.
- classmethod create(create_rois: bool, roi_geometry: str, min_sigma: float, max_sigma: float, threshold_rel: float, overlap: float, log_scale: bool) sigima.proc.image.detection.BlobDOHParam
Returns a new instance of
BlobDOHParamwith the fields set to the given values.- Parameters:
create_rois (bool) – Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
roi_geometry (str) – Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
min_sigma (float) – σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 10.0.
max_sigma (float) – σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
threshold_rel (float) – Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
overlap (float) – If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
log_scale (bool) – If set intermediate values of standard deviations are interpolated using a logarithmic scale to the base 10. If not, linear interpolation is used. Default: False.
- Returns:
New instance of
BlobDOHParam.
- class sigima.params.BlobLOGParam[source]
Blob detection using Laplacian of Gaussian method
- min_sigma
σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 10.0.
- max_sigma
σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
- threshold_rel
Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
- overlap
If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
- create_rois
Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
- roi_geometry
Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
- log_scale
If set intermediate values of standard deviations are interpolated using a logarithmic scale to the base 10. If not, linear interpolation is used. Default: False.
- exclude_border
If true, exclude blobs from the border of the image. Default: True.
- classmethod create(min_sigma: float, max_sigma: float, threshold_rel: float, overlap: float, create_rois: bool, roi_geometry: str, log_scale: bool, exclude_border: bool) sigima.proc.image.detection.BlobLOGParam
Returns a new instance of
BlobLOGParamwith the fields set to the given values.- Parameters:
min_sigma (float) – σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 10.0.
max_sigma (float) – σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
threshold_rel (float) – Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
overlap (float) – If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
create_rois (bool) – Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
roi_geometry (str) – Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
log_scale (bool) – If set intermediate values of standard deviations are interpolated using a logarithmic scale to the base 10. If not, linear interpolation is used. Default: False.
exclude_border (bool) – If true, exclude blobs from the border of the image. Default: True.
- Returns:
New instance of
BlobLOGParam.
- class sigima.params.BlobOpenCVParam[source]
Blob detection using OpenCV
- create_rois
Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
- roi_geometry
Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
- min_threshold
Min. threshold. The minimum threshold between local maxima and minima. This parameter does not affect the quality of the blobs, only the quantity. Lower thresholds result in larger numbers of blobs. Float higher than 0.0. Default: 10.0.
- max_threshold
Max. threshold. The maximum threshold between local maxima and minima. This parameter does not affect the quality of the blobs, only the quantity. Lower thresholds result in larger numbers of blobs. Float higher than 0.0. Default: 200.0.
- min_repeatability
Min. repeatability. The minimum number of times a blob needs to be detected in a sequence of images to be considered valid. Integer higher than 1. Default: 2.
- min_dist_between_blobs
Min. distance between blobs. The minimum distance between two blobs. If blobs are found closer together than this distance, the smaller blob is removed. Float higher than 0.0, non zero. Default: 10.0.
- filter_by_color
If true, the image is filtered by color instead of intensity. Default: True.
- blob_color
The color of the blobs to detect (0 for dark blobs, 255 for light blobs). Default: 0.
- filter_by_area
If true, the image is filtered by blob area. Default: True.
- min_area
Min. area. The minimum blob area. Float higher than 0.0. Default: 25.0.
- max_area
Max. area. The maximum blob area. Float higher than 0.0. Default: 500.0.
- filter_by_circularity
If true, the image is filtered by blob circularity. Default: False.
- min_circularity
Min. circularity. The minimum circularity of the blobs. Float between 0.0 and 1.0. Default: 0.8.
- max_circularity
Max. circularity. The maximum circularity of the blobs. Float between 0.0 and 1.0. Default: 1.0.
- filter_by_inertia
If true, the image is filtered by blob inertia. Default: False.
- min_inertia_ratio
Min. inertia ratio. The minimum inertia ratio of the blobs. Float between 0.0 and 1.0. Default: 0.6.
- max_inertia_ratio
Max. inertia ratio. The maximum inertia ratio of the blobs. Float between 0.0 and 1.0. Default: 1.0.
- filter_by_convexity
If true, the image is filtered by blob convexity. Default: False.
- min_convexity
Min. convexity. The minimum convexity of the blobs. Float between 0.0 and 1.0. Default: 0.8.
- max_convexity
Max. convexity. The maximum convexity of the blobs. Float between 0.0 and 1.0. Default: 1.0.
- classmethod create(create_rois: bool, roi_geometry: str, min_threshold: float, max_threshold: float, min_repeatability: int, min_dist_between_blobs: float, filter_by_color: bool, blob_color: int, filter_by_area: bool, min_area: float, max_area: float, filter_by_circularity: bool, min_circularity: float, max_circularity: float, filter_by_inertia: bool, min_inertia_ratio: float, max_inertia_ratio: float, filter_by_convexity: bool, min_convexity: float, max_convexity: float) sigima.proc.image.detection.BlobOpenCVParam
Returns a new instance of
BlobOpenCVParamwith the fields set to the given values.- Parameters:
create_rois (bool) – Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
roi_geometry (str) – Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
min_threshold (float) – Min. threshold. The minimum threshold between local maxima and minima. This parameter does not affect the quality of the blobs, only the quantity. Lower thresholds result in larger numbers of blobs. Float higher than 0.0. Default: 10.0.
max_threshold (float) – Max. threshold. The maximum threshold between local maxima and minima. This parameter does not affect the quality of the blobs, only the quantity. Lower thresholds result in larger numbers of blobs. Float higher than 0.0. Default: 200.0.
min_repeatability (int) – Min. repeatability. The minimum number of times a blob needs to be detected in a sequence of images to be considered valid. Integer higher than 1. Default: 2.
min_dist_between_blobs (float) – Min. distance between blobs. The minimum distance between two blobs. If blobs are found closer together than this distance, the smaller blob is removed. Float higher than 0.0, non zero. Default: 10.0.
filter_by_color (bool) – If true, the image is filtered by color instead of intensity. Default: True.
blob_color (int) – The color of the blobs to detect (0 for dark blobs, 255 for light blobs). Default: 0.
filter_by_area (bool) – If true, the image is filtered by blob area. Default: True.
min_area (float) – Min. area. The minimum blob area. Float higher than 0.0. Default: 25.0.
max_area (float) – Max. area. The maximum blob area. Float higher than 0.0. Default: 500.0.
filter_by_circularity (bool) – If true, the image is filtered by blob circularity. Default: False.
min_circularity (float) – Min. circularity. The minimum circularity of the blobs. Float between 0.0 and 1.0. Default: 0.8.
max_circularity (float) – Max. circularity. The maximum circularity of the blobs. Float between 0.0 and 1.0. Default: 1.0.
filter_by_inertia (bool) – If true, the image is filtered by blob inertia. Default: False.
min_inertia_ratio (float) – Min. inertia ratio. The minimum inertia ratio of the blobs. Float between 0.0 and 1.0. Default: 0.6.
max_inertia_ratio (float) – Max. inertia ratio. The maximum inertia ratio of the blobs. Float between 0.0 and 1.0. Default: 1.0.
filter_by_convexity (bool) – If true, the image is filtered by blob convexity. Default: False.
min_convexity (float) – Min. convexity. The minimum convexity of the blobs. Float between 0.0 and 1.0. Default: 0.8.
max_convexity (float) – Max. convexity. The maximum convexity of the blobs. Float between 0.0 and 1.0. Default: 1.0.
- Returns:
New instance of
BlobOpenCVParam.
- class sigima.params.ContourShapeParam[source]
Contour shape parameters
- threshold
Relative threshold. Detection threshold, relative to difference between data maximum and minimum. Float between 0.1 and 0.9. Default: 0.5.
- shape
Single choice from: ‘ELLIPSE’, ‘CIRCLE’, ‘POLYGON’. Default: ‘ELLIPSE’.
- classmethod create(threshold: float, shape: str) sigima.proc.image.detection.ContourShapeParam
Returns a new instance of
ContourShapeParamwith the fields set to the given values.- Parameters:
- Returns:
New instance of
ContourShapeParam.
- class sigima.params.Peak2DDetectionParam[source]
Peak detection parameters
- create_rois
Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
- roi_geometry
Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
- threshold
Relative threshold. Detection threshold, relative to difference between data maximum and minimum. Float between 0.1 and 0.9. Default: 0.5.
- size
Neighborhoods size. Size of the sliding window used in maximum/minimum filtering algorithm (if no value is provided, the algorithm will use a default size based on the image size). . Integer higher than 1, unit: pixels. Default: None.
- classmethod create(create_rois: bool, roi_geometry: str, threshold: float, size: int) sigima.proc.image.detection.Peak2DDetectionParam
Returns a new instance of
Peak2DDetectionParamwith the fields set to the given values.- Parameters:
create_rois (bool) – Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
roi_geometry (str) – Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
threshold (float) – Relative threshold. Detection threshold, relative to difference between data maximum and minimum. Float between 0.1 and 0.9. Default: 0.5.
size (int) – Neighborhoods size. Size of the sliding window used in maximum/minimum filtering algorithm (if no value is provided, the algorithm will use a default size based on the image size). . Integer higher than 1, unit: pixels. Default: None.
- Returns:
New instance of
Peak2DDetectionParam.
- class sigima.params.HoughCircleParam[source]
Circle Hough transform parameters
- create_rois
Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
- roi_geometry
Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
- min_radius
Radiusmin. Integer higher than 0, non zero, unit: pixels. Default: None.
- max_radius
Radiusmax. Integer higher than 0, non zero, unit: pixels. Default: None.
- min_distance
Minimal distance. Integer higher than 0. Default: None.
- classmethod create(create_rois: bool, roi_geometry: str, min_radius: int, max_radius: int, min_distance: int) sigima.proc.image.detection.HoughCircleParam
Returns a new instance of
HoughCircleParamwith the fields set to the given values.- Parameters:
create_rois (bool) – Regions of interest will be created around detected features, if at least two features are detected. roi size is optimized based on feature spacing. Default: False.
roi_geometry (str) – Single choice from: ‘CIRCLE’, ‘RECTANGLE’. Default: ‘RECTANGLE’.
min_radius (int) – Radiusmin. Integer higher than 0, non zero, unit: pixels. Default: None.
max_radius (int) – Radiusmax. Integer higher than 0, non zero, unit: pixels. Default: None.
min_distance (int) – Minimal distance. Integer higher than 0. Default: None.
- Returns:
New instance of
HoughCircleParam.
Edge detection parameters#
- class sigima.params.CannyParam[source]
Canny filter parameters.
- sigma
Standard deviation of the gaussian filter. Float higher than 0.0, non zero, unit: pixels. Default: 1.0.
- low_threshold
Lower bound for hysteresis thresholding (linking edges). Float higher than 0.0. Default: 0.1.
- high_threshold
Upper bound for hysteresis thresholding (linking edges). Float higher than 0.0. Default: 0.9.
- use_quantiles
If true then treat low_threshold and high_threshold as quantiles of the edge magnitude image, rather than absolute edge magnitude values. If true then the thresholds must be in the range [0, 1]. Default: True.
- mode
Single choice from: ‘REFLECT’, ‘CONSTANT’, ‘NEAREST’, ‘MIRROR’, ‘WRAP’. Default: ‘CONSTANT’.
- cval
Value to fill past edges of input if mode is constant. Default: 0.0.
- classmethod create(sigma: float, low_threshold: float, high_threshold: float, use_quantiles: bool, mode: str, cval: float) sigima.proc.image.edges.CannyParam
Returns a new instance of
CannyParamwith the fields set to the given values.- Parameters:
sigma (float) – Standard deviation of the gaussian filter. Float higher than 0.0, non zero, unit: pixels. Default: 1.0.
low_threshold (float) – Lower bound for hysteresis thresholding (linking edges). Float higher than 0.0. Default: 0.1.
high_threshold (float) – Upper bound for hysteresis thresholding (linking edges). Float higher than 0.0. Default: 0.9.
use_quantiles (bool) – If true then treat low_threshold and high_threshold as quantiles of the edge magnitude image, rather than absolute edge magnitude values. If true then the thresholds must be in the range [0, 1]. Default: True.
mode (str) – Single choice from: ‘REFLECT’, ‘CONSTANT’, ‘NEAREST’, ‘MIRROR’, ‘WRAP’. Default: ‘CONSTANT’.
cval (float) – Value to fill past edges of input if mode is constant. Default: 0.0.
- Returns:
New instance of
CannyParam.
Exposure correction parameters#
- class sigima.params.AdjustGammaParam[source]
Gamma adjustment parameters
- gamma
Gamma correction factor (higher values give more contrast). Float higher than 0.0. Default: 1.0.
- gain
Gain factor (higher values give more contrast). Float higher than 0.0. Default: 1.0.
- classmethod create(gamma: float, gain: float) sigima.proc.image.exposure.AdjustGammaParam
Returns a new instance of
AdjustGammaParamwith the fields set to the given values.
- class sigima.params.AdjustLogParam[source]
Logarithmic adjustment parameters
- gain
Gain factor (higher values give more contrast). Float higher than 0.0. Default: 1.0.
- inv
If true, apply inverse logarithmic transformation. Default: False.
- classmethod create(gain: float, inv: bool) sigima.proc.image.exposure.AdjustLogParam
Returns a new instance of
AdjustLogParamwith the fields set to the given values.
- class sigima.params.AdjustSigmoidParam[source]
Sigmoid adjustment parameters
- cutoff
Cutoff value (higher values give more contrast). Float between 0.0 and 1.0. Default: 0.5.
- gain
Gain factor (higher values give more contrast). Float higher than 0.0. Default: 10.0.
- inv
If true, apply inverse sigmoid transformation. Default: False.
- classmethod create(cutoff: float, gain: float, inv: bool) sigima.proc.image.exposure.AdjustSigmoidParam
Returns a new instance of
AdjustSigmoidParamwith the fields set to the given values.- Parameters:
- Returns:
New instance of
AdjustSigmoidParam.
- class sigima.params.EqualizeAdaptHistParam[source]
Adaptive histogram equalization parameters
- nbins
Number of bins. Number of bins for image histogram. Integer higher than 1. Default: 256.
- clip_limit
Clipping limit. Clipping limit (higher values give more contrast). Float between 0.0 and 1.0. Default: 0.01.
- classmethod create(nbins: int, clip_limit: float) sigima.proc.image.exposure.EqualizeAdaptHistParam
Returns a new instance of
EqualizeAdaptHistParamwith the fields set to the given values.
- class sigima.params.EqualizeHistParam[source]
Histogram equalization parameters
- nbins
Number of bins. Number of bins for image histogram. Integer higher than 1. Default: 256.
- classmethod create(nbins: int) sigima.proc.image.exposure.EqualizeHistParam
Returns a new instance of
EqualizeHistParamwith the fields set to the given values.- Parameters:
nbins (int) – Number of bins. Number of bins for image histogram. Integer higher than 1. Default: 256.
- Returns:
New instance of
EqualizeHistParam.
- class sigima.params.RescaleIntensityParam[source]
Intensity rescaling parameters
- in_range
Input range. Min and max intensity values of input image (‘image’ refers to input image min/max levels, ‘dtype’ refers to input image data type range). Single choice from: ‘image’, ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘image’.
- out_range
Output range. Min and max intensity values of output image (‘image’ refers to input image min/max levels, ‘dtype’ refers to input image data type range).. Single choice from: ‘image’, ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
- classmethod create(in_range: str, out_range: str) sigima.proc.image.exposure.RescaleIntensityParam
Returns a new instance of
RescaleIntensityParamwith the fields set to the given values.- Parameters:
in_range (str) – Input range. Min and max intensity values of input image (‘image’ refers to input image min/max levels, ‘dtype’ refers to input image data type range). Single choice from: ‘image’, ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘image’.
out_range (str) – Output range. Min and max intensity values of output image (‘image’ refers to input image min/max levels, ‘dtype’ refers to input image data type range).. Single choice from: ‘image’, ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
- Returns:
New instance of
RescaleIntensityParam.
- class sigima.params.FlatFieldParam[source]
Flat-field parameters
- threshold
Default: 0.0.
- classmethod create(threshold: float) sigima.proc.image.exposure.FlatFieldParam
Returns a new instance of
FlatFieldParamwith the fields set to the given values.- Parameters:
threshold (float) – Default: 0.0.
- Returns:
New instance of
FlatFieldParam.
- class sigima.params.XYZCalibrateParam[source]
Image polynomial calibration parameters
- axis
Calibrate. Single choice from: ‘x’, ‘y’, ‘z’. Default: ‘z’.
- a0
a0. Constant term. Default: 0.0.
- a1
a1. Linear term. Default: 1.0.
- a2
a2. Quadratic term. Default: 0.0.
- a3
a3. Cubic term. Default: 0.0.
Extraction parameters#
- class sigima.params.AverageProfileParam[source]
Average horizontal or vertical profile parameters
- direction
Single choice from: ‘horizontal’, ‘vertical’. Default: ‘horizontal’.
- row1
Integer higher than 0. Default: 0.
- row2
Integer higher than -1. Default: -1.
- col1
Column 1. Integer higher than 0. Default: 0.
- col2
Column 2. Integer higher than -1. Default: -1.
- classmethod create(direction: str, row1: int, row2: int, col1: int, col2: int) sigima.proc.image.extraction.AverageProfileParam
Returns a new instance of
AverageProfileParamwith the fields set to the given values.- Parameters:
direction (str) – Single choice from: ‘horizontal’, ‘vertical’. Default: ‘horizontal’.
row1 (int) – Integer higher than 0. Default: 0.
row2 (int) – Integer higher than -1. Default: -1.
col1 (int) – Column 1. Integer higher than 0. Default: 0.
col2 (int) – Column 2. Integer higher than -1. Default: -1.
- Returns:
New instance of
AverageProfileParam.
- class sigima.params.LineProfileParam[source]
Horizontal or vertical profile parameters
- direction
Single choice from: ‘horizontal’, ‘vertical’. Default: ‘horizontal’.
- row
Integer higher than 0. Default: 0.
- col
Column. Integer higher than 0. Default: 0.
- classmethod create(direction: str, row: int, col: int) sigima.proc.image.extraction.LineProfileParam
Returns a new instance of
LineProfileParamwith the fields set to the given values.
- class sigima.params.RadialProfileParam[source]
Radial profile parameters
- center
Center position. Single choice from: ‘centroid’, ‘center’, ‘user’. Default: ‘centroid’.
- x0
XCenter. Float, unit: pixel. Default: 0.0.
- y0
YCenter. Float, unit: pixel. Default: 0.0.
- classmethod create(center: str, x0: float, y0: float) sigima.proc.image.extraction.RadialProfileParam
Returns a new instance of
RadialProfileParamwith the fields set to the given values.
- class sigima.params.SegmentProfileParam[source]
Segment profile parameters
- row1
Start row. Integer higher than 0. Default: 0.
- col1
Start column. Integer higher than 0. Default: 0.
- row2
End row. Integer higher than 0. Default: 0.
- col2
End column. Integer higher than 0. Default: 0.
- classmethod create(row1: int, col1: int, row2: int, col2: int) sigima.proc.image.extraction.SegmentProfileParam
Returns a new instance of
SegmentProfileParamwith the fields set to the given values.
- class sigima.params.Direction(value)[source]
Direction choice
- class sigima.params.ROIGridParam[source]
ROI Grid parameters
- ny
Ny (rows). Integer, non zero. Default: 3.
- nx
Nx (columns). Integer, non zero. Default: 3.
- xtranslation
Integer between 0 and 100, unit: %. Default: 50.
- ytranslation
Integer between 0 and 100, unit: %. Default: 50.
- xsize
X size (column size). Integer between 0 and 100, unit: %. Default: 50.
- ysize
Y size (row size). Integer between 0 and 100, unit: %. Default: 50.
- xstep
X step (column spacing). Horizontal spacing between roi centers, as a percentage of the automatically computed cell width (100% = evenly distributed grid). Integer between 1 and 200, unit: %. Default: 100.
- ystep
Y step (row spacing). Vertical spacing between roi centers, as a percentage of the automatically computed cell height (100% = evenly distributed grid). Integer between 1 and 200, unit: %. Default: 100.
- base_name
Default: ‘ROI’.
- name_pattern
Default: ‘{base}({r},{c})’.
- xdirection
Single choice from: ‘INCREASING’, ‘DECREASING’. Default: ‘INCREASING’.
- ydirection
Single choice from: ‘INCREASING’, ‘DECREASING’. Default: ‘INCREASING’.
- classmethod create(ny: int, nx: int, xtranslation: int, ytranslation: int, xsize: int, ysize: int, xstep: int, ystep: int, base_name: str, name_pattern: str, xdirection: str, ydirection: str) sigima.proc.image.extraction.ROIGridParam
Returns a new instance of
ROIGridParamwith the fields set to the given values.- Parameters:
ny (int) – Ny (rows). Integer, non zero. Default: 3.
nx (int) – Nx (columns). Integer, non zero. Default: 3.
xtranslation (int) – Integer between 0 and 100, unit: %. Default: 50.
ytranslation (int) – Integer between 0 and 100, unit: %. Default: 50.
xsize (int) – X size (column size). Integer between 0 and 100, unit: %. Default: 50.
ysize (int) – Y size (row size). Integer between 0 and 100, unit: %. Default: 50.
xstep (int) – X step (column spacing). Horizontal spacing between roi centers, as a percentage of the automatically computed cell width (100% = evenly distributed grid). Integer between 1 and 200, unit: %. Default: 100.
ystep (int) – Y step (row spacing). Vertical spacing between roi centers, as a percentage of the automatically computed cell height (100% = evenly distributed grid). Integer between 1 and 200, unit: %. Default: 100.
base_name (str) – Default: ‘ROI’.
name_pattern (str) – Default: ‘{base}({r},{c})’.
xdirection (str) – Single choice from: ‘INCREASING’, ‘DECREASING’. Default: ‘INCREASING’.
ydirection (str) – Single choice from: ‘INCREASING’, ‘DECREASING’. Default: ‘INCREASING’.
- Returns:
New instance of
ROIGridParam.
Filtering parameters#
- class sigima.params.ButterworthParam[source]
Butterworth filter parameters.
- cut_off
Cut-off frequency ratio. Cut-off frequency ratio. Float between 0.0 and 0.5. Default: 0.005.
- high_pass
If true, apply high-pass filter instead of low-pass. Default: False.
- order
Order of the butterworth filter. Integer higher than 1. Default: 2.
- classmethod create(cut_off: float, high_pass: bool, order: int) sigima.proc.image.filtering.ButterworthParam
Returns a new instance of
ButterworthParamwith the fields set to the given values.- Parameters:
- Returns:
New instance of
ButterworthParam.
Fourier analysis parameters#
- class sigima.params.ZeroPadding2DParam[source]
Zero padding parameters for 2D images
- strategy
Padding strategy. Single choice from: ‘next_pow2’, ‘multiple_of_64’, ‘custom’. Default: ‘custom’.
- rows
Rows to add. Integer higher than 0. Default: 0.
- cols
Columns to add. Integer higher than 0. Default: 0.
- position
Padding position. Single choice from: ‘BOTTOM_RIGHT’, ‘AROUND’. Default: ‘BOTTOM_RIGHT’.
- classmethod create(strategy: str, rows: int, cols: int, position: str) sigima.proc.image.preprocessing.ZeroPadding2DParam
Returns a new instance of
ZeroPadding2DParamwith the fields set to the given values.- Parameters:
strategy (str) – Padding strategy. Single choice from: ‘next_pow2’, ‘multiple_of_64’, ‘custom’. Default: ‘custom’.
rows (int) – Rows to add. Integer higher than 0. Default: 0.
cols (int) – Columns to add. Integer higher than 0. Default: 0.
position (str) – Padding position. Single choice from: ‘BOTTOM_RIGHT’, ‘AROUND’. Default: ‘BOTTOM_RIGHT’.
- Returns:
New instance of
ZeroPadding2DParam.
Geometry parameters#
- class sigima.params.BinningParam[source]
Binning parameters.
- sx
Cluster size (X). Number of adjacent pixels to be combined together along x-axis. Integer higher than 2. Default: 2.
- sy
Cluster size (Y). Number of adjacent pixels to be combined together along y-axis. Integer higher than 2. Default: 2.
- operation
Single choice from: ‘SUM’, ‘AVERAGE’, ‘MEDIAN’, ‘MIN’, ‘MAX’. Default: ‘SUM’.
- dtype_str
Data type. Output image data type. Single choice from: ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
- change_pixel_size
If checked, pixel size is updated according to binning factors. Users who prefer to work with pixel coordinates may want to uncheck this. Default: True.
- classmethod create(sx: int, sy: int, operation: str, dtype_str: str, change_pixel_size: bool) sigima.proc.image.preprocessing.BinningParam
Returns a new instance of
BinningParamwith the fields set to the given values.- Parameters:
sx (int) – Cluster size (X). Number of adjacent pixels to be combined together along x-axis. Integer higher than 2. Default: 2.
sy (int) – Cluster size (Y). Number of adjacent pixels to be combined together along y-axis. Integer higher than 2. Default: 2.
operation (str) – Single choice from: ‘SUM’, ‘AVERAGE’, ‘MEDIAN’, ‘MIN’, ‘MAX’. Default: ‘SUM’.
dtype_str (str) – Data type. Output image data type. Single choice from: ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
change_pixel_size (bool) – If checked, pixel size is updated according to binning factors. Users who prefer to work with pixel coordinates may want to uncheck this. Default: True.
- Returns:
New instance of
BinningParam.
- class sigima.params.ResizeParam[source]
Resize parameters
- zoom
Default: 1.0.
- mode
Single choice from: ‘CONSTANT’, ‘NEAREST’, ‘REFLECT’, ‘WRAP’, ‘MIRROR’. Default: ‘CONSTANT’.
- cval
Value used for points outside the boundaries of the input if mode is ‘constant’. Default: 0.0.
- prefilter
Default: True.
- order
Spline interpolation order. Integer between 0 and 5. Default: 3.
- classmethod create(zoom: float, mode: str, cval: float, prefilter: bool, order: int) sigima.proc.image.geometry.ResizeParam
Returns a new instance of
ResizeParamwith the fields set to the given values.- Parameters:
zoom (float) – Default: 1.0.
mode (str) – Single choice from: ‘CONSTANT’, ‘NEAREST’, ‘REFLECT’, ‘WRAP’, ‘MIRROR’. Default: ‘CONSTANT’.
cval (float) – Value used for points outside the boundaries of the input if mode is ‘constant’. Default: 0.0.
prefilter (bool) – Default: True.
order (int) – Spline interpolation order. Integer between 0 and 5. Default: 3.
- Returns:
New instance of
ResizeParam.
- class sigima.params.RotateParam[source]
Rotate parameters
- angle
Angle (°). Default: 0.0.
- mode
Single choice from: ‘CONSTANT’, ‘NEAREST’, ‘REFLECT’, ‘WRAP’, ‘MIRROR’. Default: ‘CONSTANT’.
- cval
Value used for points outside the boundaries of the input if mode is ‘constant’. Default: 0.0.
- reshape
Reshape the output array so that the input array is contained completely in the output. Default: False.
- prefilter
Default: True.
- order
Spline interpolation order. Integer between 0 and 5. Default: 3.
- classmethod create(angle: float, mode: str, cval: float, reshape: bool, prefilter: bool, order: int) sigima.proc.image.geometry.RotateParam
Returns a new instance of
RotateParamwith the fields set to the given values.- Parameters:
angle (float) – Angle (°). Default: 0.0.
mode (str) – Single choice from: ‘CONSTANT’, ‘NEAREST’, ‘REFLECT’, ‘WRAP’, ‘MIRROR’. Default: ‘CONSTANT’.
cval (float) – Value used for points outside the boundaries of the input if mode is ‘constant’. Default: 0.0.
reshape (bool) – Reshape the output array so that the input array is contained completely in the output. Default: False.
prefilter (bool) – Default: True.
order (int) – Spline interpolation order. Integer between 0 and 5. Default: 3.
- Returns:
New instance of
RotateParam.
- class sigima.params.TranslateParam[source]
Translate parameters
- dx
X translation. Default: 0.0.
- dy
Y translation. Default: 0.0.
- classmethod create(dx: float, dy: float) sigima.proc.image.geometry.TranslateParam
Returns a new instance of
TranslateParamwith the fields set to the given values.
Mathematical operation parameters#
- class sigima.params.DataTypeIParam[source]
Convert image data type parameters
- dtype_str
Destination data type. Output image data type. Single choice from: ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘float32’.
- classmethod create(dtype_str: str) sigima.proc.image.mathops.DataTypeIParam
Returns a new instance of
DataTypeIParamwith the fields set to the given values.- Parameters:
dtype_str (str) – Destination data type. Output image data type. Single choice from: ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘float32’.
- Returns:
New instance of
DataTypeIParam.
- class sigima.params.Log10ZPlusNParam[source]
Log10(z+n) parameters
- n
Default: None.
- classmethod create(n: float) sigima.proc.image.mathops.Log10ZPlusNParam
Returns a new instance of
Log10ZPlusNParamwith the fields set to the given values.- Parameters:
n (float) – Default: None.
- Returns:
New instance of
Log10ZPlusNParam.
Morphological parameters#
- class sigima.params.MorphologyParam[source]
White Top-Hat parameters
- radius
Footprint (disk) radius. Integer higher than 1. Default: 1.
- classmethod create(radius: int) sigima.proc.image.morphology.MorphologyParam
Returns a new instance of
MorphologyParamwith the fields set to the given values.- Parameters:
radius (int) – Footprint (disk) radius. Integer higher than 1. Default: 1.
- Returns:
New instance of
MorphologyParam.
Restoration parameters#
- class sigima.params.DenoiseBilateralParam[source]
Bilateral filter denoising parameters
- sigma_spatial
σspatial. Standard deviation for range distance. A larger value results in averaging of pixels with larger spatial differences. Float higher than 0, non zero, unit: pixels. Default: 1.0.
- mode
Single choice from: ‘CONSTANT’, ‘EDGE’, ‘SYMMETRIC’, ‘REFLECT’, ‘WRAP’. Default: ‘CONSTANT’.
- cval
Used in conjunction with mode ‘constant’, the value outside the image boundaries. Default: 0.0.
- classmethod create(sigma_spatial: float, mode: str, cval: float) sigima.proc.image.restoration.DenoiseBilateralParam
Returns a new instance of
DenoiseBilateralParamwith the fields set to the given values.- Parameters:
sigma_spatial (float) – σspatial. Standard deviation for range distance. A larger value results in averaging of pixels with larger spatial differences. Float higher than 0, non zero, unit: pixels. Default: 1.0.
mode (str) – Single choice from: ‘CONSTANT’, ‘EDGE’, ‘SYMMETRIC’, ‘REFLECT’, ‘WRAP’. Default: ‘CONSTANT’.
cval (float) – Used in conjunction with mode ‘constant’, the value outside the image boundaries. Default: 0.0.
- Returns:
New instance of
DenoiseBilateralParam.
- class sigima.params.DenoiseTVParam[source]
Total Variation denoising parameters
- weight
Denoising weight. The greater weight, the more denoising (at the expense of fidelity to input). Float higher than 0, non zero. Default: 0.1.
- eps
Epsilon. Relative difference of the value of the cost function that determines the stop criterion. The algorithm stops when: (e_(n-1) - e_n) < eps * e_0. Float higher than 0, non zero. Default: 0.0002.
- max_num_iter
Max. iterations. Maximal number of iterations used for the optimization. Integer higher than 0, non zero. Default: 200.
- classmethod create(weight: float, eps: float, max_num_iter: int) sigima.proc.image.restoration.DenoiseTVParam
Returns a new instance of
DenoiseTVParamwith the fields set to the given values.- Parameters:
weight (float) – Denoising weight. The greater weight, the more denoising (at the expense of fidelity to input). Float higher than 0, non zero. Default: 0.1.
eps (float) – Epsilon. Relative difference of the value of the cost function that determines the stop criterion. The algorithm stops when: (e_(n-1) - e_n) < eps * e_0. Float higher than 0, non zero. Default: 0.0002.
max_num_iter (int) – Max. iterations. Maximal number of iterations used for the optimization. Integer higher than 0, non zero. Default: 200.
- Returns:
New instance of
DenoiseTVParam.
- class sigima.params.DenoiseWaveletParam[source]
Wavelet denoising parameters
- wavelet
Single choice from: ‘bior1.1’, ‘bior1.3’, ‘bior1.5’, ‘bior2.2’, ‘bior2.4’, ‘bior2.6’, ‘bior2.8’, ‘bior3.1’, ‘bior3.3’, ‘bior3.5’, ‘bior3.7’, ‘bior3.9’, ‘bior4.4’, ‘bior5.5’, ‘bior6.8’, ‘cgau1’, ‘cgau2’, ‘cgau3’, ‘cgau4’, ‘cgau5’, ‘cgau6’, ‘cgau7’, ‘cgau8’, ‘cmor’, ‘coif1’, ‘coif2’, ‘coif3’, ‘coif4’, ‘coif5’, ‘coif6’, ‘coif7’, ‘coif8’, ‘coif9’, ‘coif10’, ‘coif11’, ‘coif12’, ‘coif13’, ‘coif14’, ‘coif15’, ‘coif16’, ‘coif17’, ‘db1’, ‘db2’, ‘db3’, ‘db4’, ‘db5’, ‘db6’, ‘db7’, ‘db8’, ‘db9’, ‘db10’, ‘db11’, ‘db12’, ‘db13’, ‘db14’, ‘db15’, ‘db16’, ‘db17’, ‘db18’, ‘db19’, ‘db20’, ‘db21’, ‘db22’, ‘db23’, ‘db24’, ‘db25’, ‘db26’, ‘db27’, ‘db28’, ‘db29’, ‘db30’, ‘db31’, ‘db32’, ‘db33’, ‘db34’, ‘db35’, ‘db36’, ‘db37’, ‘db38’, ‘dmey’, ‘fbsp’, ‘gaus1’, ‘gaus2’, ‘gaus3’, ‘gaus4’, ‘gaus5’, ‘gaus6’, ‘gaus7’, ‘gaus8’, ‘haar’, ‘mexh’, ‘morl’, ‘rbio1.1’, ‘rbio1.3’, ‘rbio1.5’, ‘rbio2.2’, ‘rbio2.4’, ‘rbio2.6’, ‘rbio2.8’, ‘rbio3.1’, ‘rbio3.3’, ‘rbio3.5’, ‘rbio3.7’, ‘rbio3.9’, ‘rbio4.4’, ‘rbio5.5’, ‘rbio6.8’, ‘shan’, ‘sym2’, ‘sym3’, ‘sym4’, ‘sym5’, ‘sym6’, ‘sym7’, ‘sym8’, ‘sym9’, ‘sym10’, ‘sym11’, ‘sym12’, ‘sym13’, ‘sym14’, ‘sym15’, ‘sym16’, ‘sym17’, ‘sym18’, ‘sym19’, ‘sym20’. Default: ‘sym9’.
- mode
Single choice from: ‘SOFT’, ‘HARD’. Default: ‘SOFT’.
- method
Single choice from: ‘BAYES_SHRINK’, ‘VISU_SHRINK’. Default: ‘VISU_SHRINK’.
- classmethod create(wavelet: str, mode: str, method: str) sigima.proc.image.restoration.DenoiseWaveletParam
Returns a new instance of
DenoiseWaveletParamwith the fields set to the given values.- Parameters:
wavelet (str) – Single choice from: ‘bior1.1’, ‘bior1.3’, ‘bior1.5’, ‘bior2.2’, ‘bior2.4’, ‘bior2.6’, ‘bior2.8’, ‘bior3.1’, ‘bior3.3’, ‘bior3.5’, ‘bior3.7’, ‘bior3.9’, ‘bior4.4’, ‘bior5.5’, ‘bior6.8’, ‘cgau1’, ‘cgau2’, ‘cgau3’, ‘cgau4’, ‘cgau5’, ‘cgau6’, ‘cgau7’, ‘cgau8’, ‘cmor’, ‘coif1’, ‘coif2’, ‘coif3’, ‘coif4’, ‘coif5’, ‘coif6’, ‘coif7’, ‘coif8’, ‘coif9’, ‘coif10’, ‘coif11’, ‘coif12’, ‘coif13’, ‘coif14’, ‘coif15’, ‘coif16’, ‘coif17’, ‘db1’, ‘db2’, ‘db3’, ‘db4’, ‘db5’, ‘db6’, ‘db7’, ‘db8’, ‘db9’, ‘db10’, ‘db11’, ‘db12’, ‘db13’, ‘db14’, ‘db15’, ‘db16’, ‘db17’, ‘db18’, ‘db19’, ‘db20’, ‘db21’, ‘db22’, ‘db23’, ‘db24’, ‘db25’, ‘db26’, ‘db27’, ‘db28’, ‘db29’, ‘db30’, ‘db31’, ‘db32’, ‘db33’, ‘db34’, ‘db35’, ‘db36’, ‘db37’, ‘db38’, ‘dmey’, ‘fbsp’, ‘gaus1’, ‘gaus2’, ‘gaus3’, ‘gaus4’, ‘gaus5’, ‘gaus6’, ‘gaus7’, ‘gaus8’, ‘haar’, ‘mexh’, ‘morl’, ‘rbio1.1’, ‘rbio1.3’, ‘rbio1.5’, ‘rbio2.2’, ‘rbio2.4’, ‘rbio2.6’, ‘rbio2.8’, ‘rbio3.1’, ‘rbio3.3’, ‘rbio3.5’, ‘rbio3.7’, ‘rbio3.9’, ‘rbio4.4’, ‘rbio5.5’, ‘rbio6.8’, ‘shan’, ‘sym2’, ‘sym3’, ‘sym4’, ‘sym5’, ‘sym6’, ‘sym7’, ‘sym8’, ‘sym9’, ‘sym10’, ‘sym11’, ‘sym12’, ‘sym13’, ‘sym14’, ‘sym15’, ‘sym16’, ‘sym17’, ‘sym18’, ‘sym19’, ‘sym20’. Default: ‘sym9’.
mode (str) – Single choice from: ‘SOFT’, ‘HARD’. Default: ‘SOFT’.
method (str) – Single choice from: ‘BAYES_SHRINK’, ‘VISU_SHRINK’. Default: ‘VISU_SHRINK’.
- Returns:
New instance of
DenoiseWaveletParam.
Threshold parameters#
- class sigima.params.ThresholdParam[source]
Histogram threshold parameters
- method
Threshold method. Single choice from: ‘manual’, ‘isodata’, ‘li’, ‘mean’, ‘minimum’, ‘otsu’, ‘triangle’, ‘yen’. Default: ‘manual’.
- bins
Number of bins. Integer higher than 1. Default: 256.
- value
Threshold value. Default: 0.0.
- operation
Single choice from: ‘>’, ‘<’. Default: ‘>’.
- classmethod create(method: str, bins: int, value: float, operation: str) sigima.proc.image.threshold.ThresholdParam
Returns a new instance of
ThresholdParamwith the fields set to the given values.- Parameters:
method (str) – Threshold method. Single choice from: ‘manual’, ‘isodata’, ‘li’, ‘mean’, ‘minimum’, ‘otsu’, ‘triangle’, ‘yen’. Default: ‘manual’.
bins (int) – Number of bins. Integer higher than 1. Default: 256.
value (float) – Threshold value. Default: 0.0.
operation (str) – Single choice from: ‘>’, ‘<’. Default: ‘>’.
- Returns:
New instance of
ThresholdParam.