Model classes for signals and images (sigima.objects)#

The sigima.objects module aims at providing all the necessary classes and functions to create and manipulate Sigima scalar, signal and image objects.

Those classes and functions are defined in submodules:

  • sigima.objects.base

  • sigima.objects.scalar

  • sigima.objects.image

  • sigima.objects.signal

# Full import statement
from sigima.objects.scalar import GeometryResult, TableResult
from sigima.objects.signal import SignalObj
from sigima.objects.image import ImageObj

# Short import statement
from sigima.objects import SignalObj, ImageObj, GeometryResult, TableResult

In Sigima, computation functions take signal or image objects as input and produce signal, image or scalar objects as output. Scalar objects are represented by the GeometryResult and TableResult classes.

Note

The scalar results are not rigorously scalar as they can also represent vector of coordinates for example, but the name ‘scalar’ is retained for simplicity and by opposition to the more general ‘signal’ and ‘image’ terms).

Scalar results#

class sigima.objects.GeometryResult(title: str, kind: KindShape, coords: ndarray, roi_indices: ndarray | None = None, func_name: str | None = None, attrs: dict[str, object]=<factory>)[source]#

Geometric outputs, optionally per-ROI.

Parameters:
  • title – Human-readable title for this geometric output set.

  • kind – Shape kind (KindShape member or its string value).

  • coords – 2-D array (N, K) with coordinates per row. K depends on kind and may be NaN-padded (e.g., for polygons).

  • roi_indices – Optional 1-D array (N,) mapping rows to ROI indices. Use NO_ROI (-1) for the “full signal/image / no ROI” row.

  • func_name – Optional name of the computation function that produced this result.

  • attrs – Optional algorithmic context (e.g. thresholds, method variant).

Raises:

ValueError – If dimensions are inconsistent or fields are invalid.

Important

Coordinate System: GeometryResult coordinates are stored in physical units (e.g., mm, µm), not pixel coordinates. The conversion from pixel to physical coordinates is performed automatically when creating GeometryResult objects from image measurements using compute_geometry_from_obj().

This ensures that geometric measurements are:

  • Scale-independent: Results remain valid when images are resized

  • Physically meaningful: Measurements have real-world significance

  • Consistent: Same geometric features yield same results across different images

Note

Coordinate conventions are as follows:

  • KindShape.POINT: [x, y]

  • KindShape.SEGMENT: [x0, y0, x1, y1]

  • KindShape.RECTANGLE: [x0, y0, width, height]

  • KindShape.CIRCLE: [x0, y0, radius]

  • KindShape.ELLIPSE: [x0, y0, a, b, theta] # theta in radians

  • KindShape.POLYGON: [x0, y0, x1, y1, …, xn, yn] (rows may be NaN-padded)

All coordinate values and dimensions (width, height, radius, semi-axes) are expressed in the image’s physical units as defined by the image calibration.

See also

compute_geometry_from_obj(): Function that creates GeometryResult objects with automatic coordinate conversion from pixel to physical units.

property name: str#

Get the unique identifier name for this geometry result.

Returns:

The string value of the kind attribute, which serves as a unique

name identifier for this geometry result type.

property value: float | tuple[float, float]#

Get the value from a single-row POINT, MARKER, or SEGMENT geometry result.

This property provides convenient access to computed values:

  • For POINT: returns (x, y) coordinates as a tuple

  • For MARKER: returns (x, y) coordinates as a tuple

  • For SEGMENT: returns the length of the segment as a float

Returns:

tuple of (x, y) coordinates For SEGMENT: float length of the segment

Return type:

For POINT/MARKER

Raises:

ValueError – If the result has multiple rows or is not a POINT, MARKER, or SEGMENT kind

Examples

>>> # Get coordinates from x_at_y result (MARKER)
>>> result = proxy.compute_x_at_y(p)
>>> x, y = result.value  # Get both coordinates
>>>
>>> # Get coordinates from peak detection (POINT)
>>> result = proxy.compute_peak_detection(p)
>>> x, y = result.value  # Get peak coordinates
>>>
>>> # Get segment length (SEGMENT)
>>> result = proxy.compute_fwhm(p)
>>> length = result.value  # Get FWHM length
classmethod from_coords(title: str, kind: KindShape, coords: ndarray, roi_indices: ndarray | None = None, *, func_name: str | None = None, attrs: dict[str, object] | None = None) GeometryResult[source]#

Create a GeometryResult from raw data.

Parameters:
  • title – Human-readable title for this geometric output.

  • kind – Shape kind (e.g. “point”, “segment”).

  • coords – 2-D array (N, K) with coordinates per row.

  • roi_indices – Optional 1-D array (N,) mapping rows to ROI indices.

  • func_name – Optional name of the computation function.

  • attrs – Optional algorithmic context (e.g. thresholds, method variant).

Returns:

A GeometryResult instance.

to_dict() dict[source]#

Convert the GeometryResult to a dictionary.

static from_dict(d: dict) GeometryResult[source]#

Convert a dictionary to a GeometryResult.

property headers: list[str]#

Get column headers for the coordinates.

Returns:

List of column headers

to_dataframe(visible_only: bool = False)[source]#

Convert the result to a pandas DataFrame.

Parameters:

visible_only – If True, include only visible headers based on display preferences. Default is False.

Returns:

DataFrame with an optional ‘roi_index’ column.

If visible_only is True, only columns with visible headers are included.

get_display_preferences() dict[str, bool][source]#

Get display preferences for coordinate headers.

Returns:

Dictionary mapping header names to visibility (True=visible, False=hidden). By default, all coordinates are visible unless specified in attrs.

set_display_preferences(preferences: dict[str, bool]) None[source]#

Set display preferences for coordinate headers.

Parameters:

preferences – Dictionary mapping header names to visibility (True=visible, False=hidden)

get_visible_headers() list[str][source]#

Get list of currently visible headers based on display preferences.

Returns:

List of header names that should be displayed

rows(roi: int | None = None) ndarray[source]#

Return coords for all rows (this ROI or full-image row).

Parameters:

roi – Optional ROI index to filter rows.

Returns:

2-D array of shape (M, K) with coordinates for the selected rows.

bounding_boxes() ndarray[source]#

Return bounding boxes for each shape in the result.

Returns:

2-D array of shape (N, 4) with bounding boxes [x_min, y_min, x_max, y_max] for each shape.

centers() ndarray[source]#

Return center points for each shape in the result.

Returns:

2-D array of shape (N, 2) with center coordinates [x_center, y_center] for each shape.

segments_lengths() ndarray[source]#

For kind=’segment’: return vector of segment lengths.

circles_radii() ndarray[source]#

For kind=’circle’: return radii.

ellipse_axes_angles() tuple[ndarray, ndarray, ndarray][source]#

For kind=’ellipse’: return (a, b, theta).

to_html(obj: SignalObj | ImageObj | None = None, visible_only: bool = True, transpose_single_row: bool = True, **kwargs) str[source]#

Convert the result to HTML format.

Parameters:
  • obj – Optional SignalObj or ImageObj for ROI title extraction

  • visible_only – If True, include only visible headers based on display preferences.

  • transpose_single_row – If True, transpose when there’s only one row

  • **kwargs – Additional arguments passed to DataFrame.to_html()

Returns:

HTML representation of the result

class sigima.objects.TableResult(title: str, kind: TableKind | str = TableKind.CUSTOM, headers: Sequence[str] = <factory>, data: list[list] = <factory>, roi_indices: list[int] | None = None, func_name: str | None = None, attrs: dict[str, object]=<factory>)[source]#

Table of scalar results, optionally per-ROI.

Parameters:
  • title – Human-readable title for this table of results.

  • kind – Type of table result (e.g., TableKind.PULSE_FEATURES, TableKind.STATISTICS). Default is TableKind.CUSTOM.

  • headers – Column names (one per metric).

  • data – 2-D list of shape (N, len(headers)) with scalar values.

  • roi_indices – Optional list (N,) mapping rows to ROI indices. Use NO_ROI (-1) for the “full image / no ROI” row.

  • func_name – Optional name of the computation function that produced this result.

  • attrs – Optional algorithmic context (e.g. thresholds, method variant).

Raises:

ValueError – If dimensions are inconsistent or fields are invalid.

Notes

  • No UI/presentation concerns, no persistence schema here.

  • Use DataLab-side adapters to store results in metadata if needed.

property name: str#

Get the unique identifier name for this scalar table result.

Returns:

The string value of the kind attribute, which serves as a unique

name identifier for this scalar table result type.

classmethod from_rows(title: str, headers: Sequence[str], rows: list[list], roi_indices: list[int] | None = None, *, kind: TableKind | str = TableKind.CUSTOM, func_name: str | None = None, attrs: dict[str, object] | None = None) TableResult[source]#

Create a TableResult from raw data.

Parameters:
  • title – Human-readable title for this table of results.

  • headers – Column names (one per metric).

  • rows – 2-D list of lists of shape (N, len(headers)) with values.

  • roi_indices – Optional list (N,) mapping rows to ROI indices. Use NO_ROI (-1) for the “full image / no ROI” row.

  • kind – Type of table result (e.g., TableKind.PULSE_FEATURES).

  • func_name – Optional name of the computation function.

  • attrs – Optional algorithmic context (e.g. thresholds, method variant).

Returns:

A TableResult instance.

to_dict() dict[source]#

Convert the TableResult to a dictionary.

static from_dict(d: dict) TableResult[source]#

Convert a dictionary to a TableResult.

to_dataframe(visible_only: bool = False)[source]#

Convert the result to a pandas DataFrame.

Parameters:

visible_only – If True, include only visible headers based on display preferences. Default is False.

Returns:

DataFrame with an optional ‘roi_index’ column.

If visible_only is True, only columns with visible headers are included.

get_display_preferences() dict[str, bool][source]#

Get display preferences for metrics.

Returns:

Dictionary mapping header names to visibility (True=visible, False=hidden). By default, all metrics are visible unless specified in attrs.

set_display_preferences(preferences: dict[str, bool]) None[source]#

Set display preferences for metrics.

Parameters:

preferences – Dictionary mapping header names to visibility (True=visible, False=hidden)

get_visible_headers() list[str][source]#

Get list of currently visible headers based on display preferences.

Returns:

List of header names that should be displayed

get_column_formats() dict[str, str][source]#

Get per-column display format strings.

Returns:

Dictionary mapping column names to Python format specifiers

(e.g. {"x0": ".2e", "amplitude": ".3g"}).

set_column_formats(formats: dict[str, str]) None[source]#

Set per-column display format strings.

Parameters:

formats – Dictionary mapping column names to Python format specifiers (e.g. {"x0": ".2e", "amplitude": ".3g"}).

classmethod from_dataframe(df, title: str, kind: TableKind | str = TableKind.CUSTOM, attrs: dict = None) TableResult[source]#

Create a TableResult from a pandas DataFrame.

Parameters:
  • df – pandas DataFrame. If ‘roi_index’ column is present, it is used for roi_indices.

  • title – Title for the TableResult.

  • kind – Type of table result (e.g., TableKind.PULSE_FEATURES).

  • attrs – Optional dictionary of attributes.

Returns:

TableResult instance.

col(name: str) list[source]#

Return the column vector by name (raises KeyError if missing).

Parameters:

name – The name of the column to retrieve.

Returns:

A list containing the column data.

value(name: str, roi: int | None = None) float[source]#

Return a single scalar by column name and ROI.

Parameters:
  • name – The name of the column to retrieve.

  • roi – The region of interest (ROI) to filter by (optional). Use None for NO_ROI row.

Returns:

A single scalar value from the specified column and ROI.

as_dict(roi: int | None = None) dict[str, Any][source]#

Return a {column -> value} mapping for one row (ROI or full image).

Parameters:

roi – The region of interest (ROI) to filter by (optional). Use None for NO_ROI row.

Returns:

A dictionary mapping column names to their corresponding values.

to_html(obj: SignalObj | ImageObj | None = None, visible_only: bool = True, transpose_single_row: bool = True, **kwargs) str[source]#

Convert the result to HTML format.

Parameters:
  • obj – SignalObj or ImageObj for ROI title extraction

  • visible_only – If True, include only visible headers based on display preferences.

  • transpose_single_row – If True, transpose when there’s only one row

  • **kwargs – Additional arguments passed to DataFrame.to_html()

Returns:

HTML representation of the result

is_statistics() bool[source]#

Check if this is a statistics table.

is_pulse_features() bool[source]#

Check if this is a pulse features table.

is_custom() bool[source]#

Check if this is a custom table.

Common features of signals and images#

class sigima.objects.TypeObj#

alias of TypeVar(‘TypeObj’, bound=BaseObj)

class sigima.objects.TypeROI#

alias of TypeVar(‘TypeROI’, bound=BaseROI)

class sigima.objects.TypeROIParam#

alias of TypeVar(‘TypeROIParam’, bound=BaseROIParam)

class sigima.objects.TypeSingleROI#

alias of TypeVar(‘TypeSingleROI’, bound=BaseSingleROI)

class sigima.objects.NormalDistributionParam[source]#

Normal-distribution signal/image parameters.

seed#

Default: 1.

Type:

guidata.dataset.dataitems.IntItem

mu#

μ. Normal distribution mean. Default: 0.1.

Type:

guidata.dataset.dataitems.FloatItem

sigma#

σ. Normal distribution standard deviation. Float higher than 0.0. Default: 0.02.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(seed: int, mu: float, sigma: float) sigima.objects.base.NormalDistributionParam#

Returns a new instance of NormalDistributionParam with the fields set to the given values.

Parameters:
  • seed (int) – Default: 1.

  • mu (float) – μ. Normal distribution mean. Default: 0.1.

  • sigma (float) – σ. Normal distribution standard deviation. Float higher than 0.0. Default: 0.02.

Returns:

New instance of NormalDistributionParam.

class sigima.objects.PoissonDistributionParam[source]#

Base Poisson-distribution signal/image parameters.

seed#

Default: 1.

Type:

guidata.dataset.dataitems.IntItem

lam#

λ. Poisson distribution mean. Float higher than 0.0. Default: 0.1.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(seed: int, lam: float) sigima.objects.base.PoissonDistributionParam#

Returns a new instance of PoissonDistributionParam with the fields set to the given values.

Parameters:
  • seed (int) – Default: 1.

  • lam (float) – λ. Poisson distribution mean. Float higher than 0.0. Default: 0.1.

Returns:

New instance of PoissonDistributionParam.

class sigima.objects.UniformDistributionParam[source]#

Uniform-distribution signal/image parameters.

seed#

Default: 1.

Type:

guidata.dataset.dataitems.IntItem

vmin#

Vmin. Uniform distribution lower bound. Default: -0.5.

Type:

guidata.dataset.dataitems.FloatItem

vmax#

Vmax. Uniform distribution higher bound. Default: 0.5.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(seed: int, vmin: float, vmax: float) sigima.objects.base.UniformDistributionParam#

Returns a new instance of UniformDistributionParam with the fields set to the given values.

Parameters:
  • seed (int) – Default: 1.

  • vmin (float) – Vmin. Uniform distribution lower bound. Default: -0.5.

  • vmax (float) – Vmax. Uniform distribution higher bound. Default: 0.5.

Returns:

New instance of UniformDistributionParam.

Signals#

class sigima.objects.SignalObj[source]#

Signal object

title#

Signal title. Default: ‘Untitled’.

Type:

guidata.dataset.dataitems.StringItem

xydata#

Default: None.

Type:

guidata.dataset.dataitems.FloatArrayItem

metadata#

Default: {}.

Type:

guidata.dataset.dataitems.DictItem

annotations#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xlabel#

Title. Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Title. Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

autoscale#

Default: True.

Type:

guidata.dataset.dataitems.BoolItem

xscalelog#

Default: False.

Type:

guidata.dataset.dataitems.BoolItem

xscalemin#

Lower bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

xscalemax#

Upper bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

yscalelog#

Default: False.

Type:

guidata.dataset.dataitems.BoolItem

yscalemin#

Lower bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

yscalemax#

Upper bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, xydata: numpy.ndarray, metadata: dict, annotations: str, xlabel: str, xunit: str, ylabel: str, yunit: str, autoscale: bool, xscalelog: bool, xscalemin: float, xscalemax: float, yscalelog: bool, yscalemin: float, yscalemax: float) sigima.objects.signal.object.SignalObj#

Returns a new instance of SignalObj with the fields set to the given values.

Parameters:
  • title (str) – Signal title. Default: ‘Untitled’.

  • xydata (numpy.ndarray) – Default: None.

  • metadata (dict) – Default: {}.

  • annotations (str) – Default: ‘’.

  • xlabel (str) – Title. Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Title. Default: ‘’.

  • yunit (str) – Default: ‘’.

  • autoscale (bool) – Default: True.

  • xscalelog (bool) – Default: False.

  • xscalemin (float) – Lower bound. Default: None.

  • xscalemax (float) – Upper bound. Default: None.

  • yscalelog (bool) – Default: False.

  • yscalemin (float) – Lower bound. Default: None.

  • yscalemax (float) – Upper bound. Default: None.

Returns:

New instance of SignalObj.

sigima.objects.create_signal_roi(coords: ndarray | list[float] | list[list[float]], indices: bool = False, title: str = '') SignalROI[source]#

Create Signal Regions of Interest (ROI) object. More ROIs can be added to the object after creation, using the add_roi method.

Parameters:
  • coords – single ROI coordinates [xmin, xmax], or multiple ROIs coordinates [[xmin1, xmax1], [xmin2, xmax2], …] (lists or NumPy arrays)

  • indices – if True, coordinates are indices, if False, they are physical values (default to False for signals)

  • title – title

Returns:

Regions of Interest (ROI) object

Raises:

ValueError – if the number of coordinates is not even

sigima.objects.create_signal(title: str, x: ndarray | None = None, y: ndarray | None = None, dx: ndarray | None = None, dy: ndarray | None = None, metadata: dict | None = None, units: tuple[str, str] | None = None, labels: tuple[str, str] | None = None) SignalObj[source]#

Create a new Signal object.

Parameters:
  • title – signal title

  • x – X data

  • y – Y data

  • dx – dX data (optional: error bars)

  • dy – dY data (optional: error bars)

  • metadata – signal metadata

  • units – X, Y units (tuple of strings)

  • labels – X, Y labels (tuple of strings)

Returns:

Signal object

sigima.objects.create_signal_parameters(stype: SignalTypes, title: str | None = None, size: int | None = None, xmin: float | None = None, xmax: float | None = None, xlabel: str | None = None, ylabel: str | None = None, xunit: str | None = None, yunit: str | None = None, **kwargs: dict) NewSignalParam[source]#

Create parameters for a given signal type.

Parameters:
  • stype – signal type

  • title – signal title

  • size – signal size (number of points)

  • xmin – minimum x value

  • xmax – maximum x value

  • xlabel – x axis label

  • ylabel – y axis label

  • xunit – x axis unit

  • yunit – y axis unit

  • **kwargs – additional parameters (specific to the signal type)

Returns:

Parameters object for the given signal type

sigima.objects.create_signal_from_param(param: NewSignalParam) SignalObj[source]#

Create a new Signal object from parameters.

Parameters:

param – new signal parameters

Returns:

Signal object

Raises:

NotImplementedError – if the signal type is not supported

class sigima.objects.SignalTypes(value)[source]#

Signal types

ZERO = 'zero'#

Signal filled with zero

NORMAL_DISTRIBUTION = 'normal_distribution'#

Random signal (normal distribution)

POISSON_DISTRIBUTION = 'poisson_distribution'#

Random signal (Poisson distribution)

UNIFORM_DISTRIBUTION = 'uniform_distribution'#

Random signal (uniform distribution)

GAUSS = 'gauss'#

Gaussian function

LORENTZ = 'lorentz'#

Lorentzian function

VOIGT = 'voigt'#

Voigt function

PLANCK = 'planck'#

Planck function

SINE = 'sine'#

Sinusoid

COSINE = 'cosine'#

Cosinusoid

SAWTOOTH = 'sawtooth'#

Sawtooth function

TRIANGLE = 'triangle'#

Triangle function

SQUARE = 'square'#

Square function

SINC = 'sinc'#

Cardinal sine

LINEARCHIRP = 'linearchirp'#

Linear chirp

STEP = 'step'#

Step function

EXPONENTIAL = 'exponential'#

Exponential function

LOGISTIC = 'logistic'#

Logistic function

PULSE = 'pulse'#

Pulse function

STEP_PULSE = 'step_pulse'#

Step pulse function (with configurable rise time)

SQUARE_PULSE = 'square_pulse'#

Square pulse function (with configurable rise/fall times)

POLYNOMIAL = 'polynomial'#

Polynomial function

CUSTOM = 'custom'#

Custom function

class sigima.objects.NewSignalParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]#

New signal dataset.

Subclasses can optionally implement a generate_title() method to provide automatic title generation based on their parameters. This method should return a string containing the generated title, or an empty string if no title can be generated.

Example:

def generate_title(self) -> str:
    '''Generate a title based on current parameters.'''
    return f"MySignal(param1={self.param1},param2={self.param2})"
generate_x_data() ndarray[source]#

Generate x data based on current parameters.

generate_1d_data() tuple[ndarray, ndarray][source]#

Compute 1D data based on current parameters.

Returns:

Tuple of (x, y) arrays

class sigima.objects.ZeroParam[source]#

Parameters for zero signal.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type) sigima.objects.signal.creation.ZeroParam#

Returns a new instance of ZeroParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

Returns:

New instance of ZeroParam.

class sigima.objects.UniformDistribution1DParam[source]#

Uniform-distribution signal parameters.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

seed#

Default: 1.

Type:

guidata.dataset.dataitems.IntItem

vmin#

Vmin. Uniform distribution lower bound. Default: -0.5.

Type:

guidata.dataset.dataitems.FloatItem

vmax#

Vmax. Uniform distribution higher bound. Default: 0.5.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, seed: int, vmin: float, vmax: float) sigima.objects.signal.creation.UniformDistribution1DParam#

Returns a new instance of UniformDistribution1DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • seed (int) – Default: 1.

  • vmin (float) – Vmin. Uniform distribution lower bound. Default: -0.5.

  • vmax (float) – Vmax. Uniform distribution higher bound. Default: 0.5.

Returns:

New instance of UniformDistribution1DParam.

class sigima.objects.NormalDistribution1DParam[source]#

Normal-distribution signal parameters.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

seed#

Default: 1.

Type:

guidata.dataset.dataitems.IntItem

mu#

μ. Normal distribution mean. Default: 0.1.

Type:

guidata.dataset.dataitems.FloatItem

sigma#

σ. Normal distribution standard deviation. Float higher than 0.0. Default: 0.02.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, seed: int, mu: float, sigma: float) sigima.objects.signal.creation.NormalDistribution1DParam#

Returns a new instance of NormalDistribution1DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • seed (int) – Default: 1.

  • mu (float) – μ. Normal distribution mean. Default: 0.1.

  • sigma (float) – σ. Normal distribution standard deviation. Float higher than 0.0. Default: 0.02.

Returns:

New instance of NormalDistribution1DParam.

class sigima.objects.PoissonDistribution1DParam[source]#

Poisson-distribution signal parameters.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

seed#

Default: 1.

Type:

guidata.dataset.dataitems.IntItem

lam#

λ. Poisson distribution mean. Float higher than 0.0. Default: 0.1.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, seed: int, lam: float) sigima.objects.signal.creation.PoissonDistribution1DParam#

Returns a new instance of PoissonDistribution1DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • seed (int) – Default: 1.

  • lam (float) – λ. Poisson distribution mean. Float higher than 0.0. Default: 0.1.

Returns:

New instance of PoissonDistribution1DParam.

class sigima.objects.GaussParam[source]#

Parameters for Gaussian function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

sigma#

σ. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

mu#

μ. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, y0: float, sigma: float, mu: float) sigima.objects.signal.creation.GaussParam#

Returns a new instance of GaussParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • y0 (float) – y0. Default: 0.0.

  • sigma (float) – σ. Default: 1.0.

  • mu (float) – μ. Default: 0.0.

Returns:

New instance of GaussParam.

class sigima.objects.LorentzParam[source]#

Parameters for Lorentzian function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

sigma#

σ. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

mu#

μ. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, y0: float, sigma: float, mu: float) sigima.objects.signal.creation.LorentzParam#

Returns a new instance of LorentzParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • y0 (float) – y0. Default: 0.0.

  • sigma (float) – σ. Default: 1.0.

  • mu (float) – μ. Default: 0.0.

Returns:

New instance of LorentzParam.

class sigima.objects.VoigtParam[source]#

Parameters for Voigt function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

sigma#

σ. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

mu#

μ. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, y0: float, sigma: float, mu: float) sigima.objects.signal.creation.VoigtParam#

Returns a new instance of VoigtParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • y0 (float) – y0. Default: 0.0.

  • sigma (float) – σ. Default: 1.0.

  • mu (float) – μ. Default: 0.0.

Returns:

New instance of VoigtParam.

class sigima.objects.SineParam[source]#

Parameters for sine function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘s’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

offset#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

freq#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

freq_unit#

Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

Type:

guidata.dataset.dataitems.ChoiceItem

phase#

φ. Float, unit: °. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, offset: float, freq: float, freq_unit: str, phase: float) sigima.objects.signal.creation.SineParam#

Returns a new instance of SineParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘s’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • offset (float) – y0. Default: 0.0.

  • freq (float) – Default: 1.0.

  • freq_unit (str) – Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

  • phase (float) – φ. Float, unit: °. Default: 0.0.

Returns:

New instance of SineParam.

class sigima.objects.CosineParam[source]#

Parameters for cosine function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘s’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

offset#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

freq#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

freq_unit#

Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

Type:

guidata.dataset.dataitems.ChoiceItem

phase#

φ. Float, unit: °. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, offset: float, freq: float, freq_unit: str, phase: float) sigima.objects.signal.creation.CosineParam#

Returns a new instance of CosineParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘s’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • offset (float) – y0. Default: 0.0.

  • freq (float) – Default: 1.0.

  • freq_unit (str) – Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

  • phase (float) – φ. Float, unit: °. Default: 0.0.

Returns:

New instance of CosineParam.

class sigima.objects.SawtoothParam[source]#

Parameters for sawtooth function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘s’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

offset#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

freq#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

freq_unit#

Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

Type:

guidata.dataset.dataitems.ChoiceItem

phase#

φ. Float, unit: °. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, offset: float, freq: float, freq_unit: str, phase: float) sigima.objects.signal.creation.SawtoothParam#

Returns a new instance of SawtoothParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘s’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • offset (float) – y0. Default: 0.0.

  • freq (float) – Default: 1.0.

  • freq_unit (str) – Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

  • phase (float) – φ. Float, unit: °. Default: 0.0.

Returns:

New instance of SawtoothParam.

class sigima.objects.TriangleParam[source]#

Parameters for triangle function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘s’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

offset#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

freq#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

freq_unit#

Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

Type:

guidata.dataset.dataitems.ChoiceItem

phase#

φ. Float, unit: °. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, offset: float, freq: float, freq_unit: str, phase: float) sigima.objects.signal.creation.TriangleParam#

Returns a new instance of TriangleParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘s’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • offset (float) – y0. Default: 0.0.

  • freq (float) – Default: 1.0.

  • freq_unit (str) – Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

  • phase (float) – φ. Float, unit: °. Default: 0.0.

Returns:

New instance of TriangleParam.

class sigima.objects.SquareParam[source]#

Parameters for square function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘s’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

offset#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

freq#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

freq_unit#

Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

Type:

guidata.dataset.dataitems.ChoiceItem

phase#

φ. Float, unit: °. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, offset: float, freq: float, freq_unit: str, phase: float) sigima.objects.signal.creation.SquareParam#

Returns a new instance of SquareParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘s’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • offset (float) – y0. Default: 0.0.

  • freq (float) – Default: 1.0.

  • freq_unit (str) – Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

  • phase (float) – φ. Float, unit: °. Default: 0.0.

Returns:

New instance of SquareParam.

class sigima.objects.SincParam[source]#

Parameters for cardinal sine function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘s’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

offset#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

freq#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

freq_unit#

Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

Type:

guidata.dataset.dataitems.ChoiceItem

phase#

φ. Float, unit: °. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, offset: float, freq: float, freq_unit: str, phase: float) sigima.objects.signal.creation.SincParam#

Returns a new instance of SincParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘s’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • offset (float) – y0. Default: 0.0.

  • freq (float) – Default: 1.0.

  • freq_unit (str) – Single choice from: ‘HZ’, ‘KHZ’, ‘MHZ’, ‘GHZ’. Default: ‘HZ’.

  • phase (float) – φ. Float, unit: °. Default: 0.0.

Returns:

New instance of SincParam.

class sigima.objects.StepParam[source]#

Parameters for step function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a1#

A1. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

a2#

A2. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

x0#

x0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a1: float, a2: float, x0: float) sigima.objects.signal.creation.StepParam#

Returns a new instance of StepParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a1 (float) – A1. Default: 0.0.

  • a2 (float) – A2. Default: 1.0.

  • x0 (float) – x0. Default: 0.0.

Returns:

New instance of StepParam.

class sigima.objects.ExponentialParam[source]#

Parameters for exponential function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

offset#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

exponent#

B. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a: float, offset: float, exponent: float) sigima.objects.signal.creation.ExponentialParam#

Returns a new instance of ExponentialParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a (float) – Default: 1.0.

  • offset (float) – y0. Default: 0.0.

  • exponent (float) – B. Default: 1.0.

Returns:

New instance of ExponentialParam.

class sigima.objects.PulseParam[source]#

Parameters for pulse function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

amp#

Amplitude. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

start#

Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

offset#

Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

stop#

End. Default: 5.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, amp: float, start: float, offset: float, stop: float) sigima.objects.signal.creation.PulseParam#

Returns a new instance of PulseParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • amp (float) – Amplitude. Default: 1.0.

  • start (float) – Default: 0.0.

  • offset (float) – Default: 10.0.

  • stop (float) – End. Default: 5.0.

Returns:

New instance of PulseParam.

class sigima.objects.PolyParam[source]#

Parameters for polynomial function.

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

a0#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

a3#

Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

a1#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

a4#

Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

a2#

Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

a5#

Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, a0: float, a3: float, a1: float, a4: float, a2: float, a5: float) sigima.objects.signal.creation.PolyParam#

Returns a new instance of PolyParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Total number of points in the signal. Integer higher than 1. Default: 500.

  • xmin (float) – xmin. Default: -10.0.

  • xmax (float) – xmax. Default: 10.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • a0 (float) – Default: 1.0.

  • a3 (float) – Default: 0.0.

  • a1 (float) – Default: 1.0.

  • a4 (float) – Default: 0.0.

  • a2 (float) – Default: 0.0.

  • a5 (float) – Default: 0.0.

Returns:

New instance of PolyParam.

class sigima.objects.CustomSignalParam[source]#

Parameters for custom signal (e.g. manually defined experimental data).

title#

Default: ‘Untitled signal’.

Type:

guidata.dataset.dataitems.StringItem

size#

Npoints. Default: 10.

Type:

guidata.dataset.dataitems.IntItem

xmin#

xmin. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

sep#

Default: None.

Type:

guidata.dataset.datatypes.SeparatorItem

xyarray#

XY Values. Default: None.

Type:

guidata.dataset.dataitems.FloatArrayItem

classmethod create(title: str, size: int, xmin: float, xmax: float, xlabel: str, xunit: str, ylabel: str, yunit: str, sep: type, xyarray: numpy.ndarray) sigima.objects.signal.creation.CustomSignalParam#

Returns a new instance of CustomSignalParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled signal’.

  • size (int) – Npoints. Default: 10.

  • xmin (float) – xmin. Default: 0.0.

  • xmax (float) – xmax. Default: 1.0.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • sep (type) – Default: None.

  • xyarray (numpy.ndarray) – XY Values. Default: None.

Returns:

New instance of CustomSignalParam.

class sigima.objects.ROI1DParam[source]#

Signal ROI parameters

title#

ROI title. Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xmin#

First point coordinate. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

Last point coordinate. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, xmin: float, xmax: float) sigima.objects.signal.roi.ROI1DParam#

Returns a new instance of ROI1DParam with the fields set to the given values.

Parameters:
  • title (str) – ROI title. Default: ‘’.

  • xmin (float) – First point coordinate. Default: 0.0.

  • xmax (float) – Last point coordinate. Default: 1.0.

Returns:

New instance of ROI1DParam.

class sigima.objects.SignalROI[source]#

Signal Regions of Interest

Parameters:

inverse – if True, ROI is outside the region

PREFIX = 's'#

Class attribute that defines a string prefix used for identifying ROI types in object metadata. This prefix is used when serializing and deserializing ROIs, allowing the system to determine the appropriate ROI class for reconstruction. Each ROI subclass should override this with a unique string identifier.

union() SignalROI[source]#

Return union of ROIs

clipped(x_min: float, x_max: float) SignalROI[source]#

Remove parts of ROIs outside the signal range

Parameters:
  • x_min – signal minimum X value

  • x_max – signal maximum X value

Returns:

SignalROI object containing ROIs clipped to the specified signal range.

inverted(x_min: float, x_max: float) SignalROI[source]#

Return inverted ROI (inside/outside).

Parameters:
  • x_min – signal minimum X value

  • x_max – signal maximum X value

Returns:

Inverted ROI

static get_compatible_single_roi_classes() list[Type[SegmentROI]][source]#

Return compatible single ROI classes

to_mask(obj: SignalObj) np.ndarray[source]#

Create mask from ROI

Parameters:

obj – signal object

Returns:

Mask (boolean array where True values are inside the ROI)

Images#

class sigima.objects.ImageObj[source]#

Image object

data#

Default: None.

Type:

guidata.dataset.dataitems.FloatArrayItem

metadata#

Default: {}.

Type:

guidata.dataset.dataitems.DictItem

annotations#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

is_uniform_coords#

Default: True.

Type:

guidata.dataset.dataitems.BoolItem

x0#

X0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

Y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

dx#

Δx. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

dy#

Δy. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

xmin#

XMIN. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

XMAX. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

ymin#

YMIN. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

ymax#

YMAX. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

xcoords#

X coordinates. Default: array([], dtype=float64).

Type:

guidata.dataset.dataitems.FloatArrayItem

ycoords#

Y coordinates. Default: array([], dtype=float64).

Type:

guidata.dataset.dataitems.FloatArrayItem

title#

Image title. Default: ‘Untitled’.

Type:

guidata.dataset.dataitems.StringItem

xlabel#

Title. Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Title. Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Title. Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

autoscale#

Default: True.

Type:

guidata.dataset.dataitems.BoolItem

xscalelog#

Default: False.

Type:

guidata.dataset.dataitems.BoolItem

xscalemin#

Lower bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

xscalemax#

Upper bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

yscalelog#

Default: False.

Type:

guidata.dataset.dataitems.BoolItem

yscalemin#

Lower bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

yscalemax#

Upper bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

zscalemin#

Lower bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

zscalemax#

Upper bound. Default: None.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(data: numpy.ndarray, metadata: dict, annotations: str, is_uniform_coords: bool, x0: float, y0: float, dx: float, dy: float, xmin: float, xmax: float, ymin: float, ymax: float, xcoords: numpy.ndarray, ycoords: numpy.ndarray, title: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, autoscale: bool, xscalelog: bool, xscalemin: float, xscalemax: float, yscalelog: bool, yscalemin: float, yscalemax: float, zscalemin: float, zscalemax: float) sigima.objects.image.object.ImageObj#

Returns a new instance of ImageObj with the fields set to the given values.

Parameters:
  • data (numpy.ndarray) – Default: None.

  • metadata (dict) – Default: {}.

  • annotations (str) – Default: ‘’.

  • is_uniform_coords (bool) – Default: True.

  • x0 (float) – X0. Default: 0.0.

  • y0 (float) – Y0. Default: 0.0.

  • dx (float) – Δx. Default: 1.0.

  • dy (float) – Δy. Default: 1.0.

  • xmin (float) – XMIN. Default: None.

  • xmax (float) – XMAX. Default: None.

  • ymin (float) – YMIN. Default: None.

  • ymax (float) – YMAX. Default: None.

  • xcoords (numpy.ndarray) – X coordinates. Default: array([], dtype=float64).

  • ycoords (numpy.ndarray) – Y coordinates. Default: array([], dtype=float64).

  • title (str) – Image title. Default: ‘Untitled’.

  • xlabel (str) – Title. Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Title. Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Title. Default: ‘’.

  • zunit (str) – Default: ‘’.

  • autoscale (bool) – Default: True.

  • xscalelog (bool) – Default: False.

  • xscalemin (float) – Lower bound. Default: None.

  • xscalemax (float) – Upper bound. Default: None.

  • yscalelog (bool) – Default: False.

  • yscalemin (float) – Lower bound. Default: None.

  • yscalemax (float) – Upper bound. Default: None.

  • zscalemin (float) – Lower bound. Default: None.

  • zscalemax (float) – Upper bound. Default: None.

Returns:

New instance of ImageObj.

sigima.objects.create_image_roi(geometry: Literal['rectangle', 'circle', 'polygon'], coords: ndarray | list[float] | list[list[float]], indices: bool = False, title: str = '', inverse: bool | list[bool] = False) ImageROI[source]#

Create Image Regions of Interest (ROI) object. More ROIs can be added to the object after creation, using the add_roi method.

Parameters:
  • geometry – ROI type (‘rectangle’, ‘circle’, ‘polygon’)

  • coords – ROI coords (physical coordinates), [x0, y0, dx, dy] for a rectangle, [xc, yc, r] for a circle, or [x0, y0, x1, y1, …] for a polygon (lists or NumPy arrays are accepted). For multiple ROIs, nested lists or NumPy arrays are accepted but with a common geometry type (e.g. [[xc1, yc1, r1], [xc2, yc2, r2], …] for circles).

  • indices – if True, coordinates are indices, if False, they are physical values (default to False)

  • title – title

  • inverse – ROI logic behavior. Controls whether the ROI logic is inversed (default: False, meaning normal ROI that focuses on data inside the shape). When True, the ROI logic is inversed to focus on data outside the shape. Can be a single boolean (applied to all ROIs) or a list of booleans (one per ROI for individual control).

Returns:

Regions of Interest (ROI) object

Raises:

ValueError – if ROI type is unknown, if the number of coordinates is invalid, or if the number of inverse values doesn’t match the number of ROIs

Examples

Create a single rectangle ROI (defaults to normal behavior): >>> roi = create_image_roi(“rectangle”, [10, 20, 30, 40])

Create a single rectangle ROI with inverse logic explicitly: >>> roi = create_image_roi(“rectangle”, [10, 20, 30, 40], inverse=True)

Create multiple rectangles with global inverse parameter: >>> coords = [[10, 20, 30, 40], [50, 60, 70, 80]] >>> roi = create_image_roi(“rectangle”, coords, inverse=False)

Create multiple rectangles with individual inverse parameters: >>> coords = [[10, 20, 30, 40], [50, 60, 70, 80]] >>> inverse_values = [True, False] # First inside, second outside >>> roi = create_image_roi( … “rectangle”, coords, inverse=inverse_values … )

Create polygons with varying vertex counts: >>> polygon_coords = [[0, 0, 10, 0, 5, 8], [20, 20, 30, 20, 30, 30, 20, 30]] >>> inverse_values = [False, True] # First outside, second inside >>> roi = create_image_roi( … “polygon”, polygon_coords, inverse=inverse_values … )

sigima.objects.create_image(title: str, data: ndarray | None = None, metadata: dict | None = None, units: tuple | None = None, labels: tuple | None = None) ImageObj[source]#

Create a new Image object

Parameters:
  • title – image title

  • data – image data

  • metadata – image metadata

  • units – X, Y, Z units (tuple of strings)

  • labels – X, Y, Z labels (tuple of strings)

Returns:

Image object

sigima.objects.create_image_parameters(itype: ImageTypes, title: str | None = None, height: int | None = None, width: int | None = None, idtype: ImageDatatypes | None = None, xlabel: str | None = None, ylabel: str | None = None, zlabel: str | None = None, xunit: str | None = None, yunit: str | None = None, zunit: str | None = None, **kwargs: dict) NewImageParam[source]#

Create parameters for a given image type.

Parameters:
  • itype – image type

  • title – image title

  • height – image height (number of rows)

  • width – image width (number of columns)

  • idtype – image data type (ImageDatatypes member)

  • xlabel – X axis label

  • ylabel – Y axis label

  • zlabel – Z axis label

  • xunit – X axis unit

  • yunit – Y axis unit

  • zunit – Z axis unit

  • **kwargs – additional parameters (specific to the image type)

Returns:

Parameters object for the given image type

sigima.objects.create_image_from_param(param: NewImageParam) ImageObj[source]#

Create a new Image object from parameters.

Parameters:

param – new image parameters

Returns:

Image object

Raises:

NotImplementedError – if the image type is not supported

class sigima.objects.ImageTypes(value)[source]#

Image types.

ZEROS = 'zero'#

Image filled with zero

NORMAL_DISTRIBUTION = 'normal_distribution'#

Image filled with random data (normal distribution)

POISSON_DISTRIBUTION = 'poisson_distribution'#

Image filled with random data (Poisson distribution)

UNIFORM_DISTRIBUTION = 'uniform_distribution'#

Image filled with random data (uniform distribution)

GAUSS = 'gauss'#

2D Gaussian image

RAMP = 'ramp'#

Bilinear form image

CHECKERBOARD = 'checkerboard'#

Checkerboard pattern

SINUSOIDAL_GRATING = 'sinusoidal_grating'#

Sinusoidal grating pattern

RING = 'ring'#

Ring/circular pattern

SIEMENS_STAR = 'siemens_star'#

Siemens star pattern

SINC = 'sinc'#

2D sinc function

class sigima.objects.NewImageParam(title: str | None = None, comment: str | None = None, icon: str = '', readonly: bool = False, skip_defaults: bool = False)[source]#

New image dataset.

Subclasses can optionally implement a generate_title() method to provide automatic title generation based on their parameters. This method should return a string containing the generated title, or an empty string if no title can be generated.

Example:

def generate_title(self) -> str:
    '''Generate a title based on current parameters.'''
    return f"MyImage(param1={self.param1},param2={self.param2})"
generate_2d_data(shape: tuple[int, int]) ndarray[source]#

Generate 2D data based on current parameters.

Parameters:

shape – Tuple (height, width) for the output array.

Returns:

2D data array

class sigima.objects.Zero2DParam[source]#

Image parameters for a 2D image filled with zero.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str) sigima.objects.image.creation.Zero2DParam#

Returns a new instance of Zero2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

Returns:

New instance of Zero2DParam.

class sigima.objects.UniformDistribution2DParam[source]#

Uniform-distribution image parameters.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

seed#

Default: 1.

Type:

guidata.dataset.dataitems.IntItem

vmin#

Vmin. Uniform distribution lower bound. Default: -0.5.

Type:

guidata.dataset.dataitems.FloatItem

vmax#

Vmax. Uniform distribution higher bound. Default: 0.5.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, seed: int, vmin: float, vmax: float) sigima.objects.image.creation.UniformDistribution2DParam#

Returns a new instance of UniformDistribution2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • seed (int) – Default: 1.

  • vmin (float) – Vmin. Uniform distribution lower bound. Default: -0.5.

  • vmax (float) – Vmax. Uniform distribution higher bound. Default: 0.5.

Returns:

New instance of UniformDistribution2DParam.

class sigima.objects.NormalDistribution2DParam[source]#

Normal-distribution image parameters.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

seed#

Default: 1.

Type:

guidata.dataset.dataitems.IntItem

mu#

μ. Normal distribution mean. Default: 0.1.

Type:

guidata.dataset.dataitems.FloatItem

sigma#

σ. Normal distribution standard deviation. Float higher than 0.0. Default: 0.02.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, seed: int, mu: float, sigma: float) sigima.objects.image.creation.NormalDistribution2DParam#

Returns a new instance of NormalDistribution2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • seed (int) – Default: 1.

  • mu (float) – μ. Normal distribution mean. Default: 0.1.

  • sigma (float) – σ. Normal distribution standard deviation. Float higher than 0.0. Default: 0.02.

Returns:

New instance of NormalDistribution2DParam.

class sigima.objects.PoissonDistribution2DParam[source]#

Poisson-distribution image parameters.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

seed#

Default: 1.

Type:

guidata.dataset.dataitems.IntItem

lam#

λ. Poisson distribution mean. Float higher than 0.0. Default: 0.1.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, seed: int, lam: float) sigima.objects.image.creation.PoissonDistribution2DParam#

Returns a new instance of PoissonDistribution2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • seed (int) – Default: 1.

  • lam (float) – λ. Poisson distribution mean. Float higher than 0.0. Default: 0.1.

Returns:

New instance of PoissonDistribution2DParam.

class sigima.objects.Gauss2DParam[source]#

2D Gaussian parameters.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

a#

Default: None.

Type:

guidata.dataset.dataitems.FloatItem

xmin#

xmin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

sigma#

σ. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

mu#

μ. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

ymin#

ymin. Default: -10.0.

Type:

guidata.dataset.dataitems.FloatItem

x0#

x0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

ymax#

ymax. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, a: float, xmin: float, sigma: float, xmax: float, mu: float, ymin: float, x0: float, ymax: float, y0: float) sigima.objects.image.creation.Gauss2DParam#

Returns a new instance of Gauss2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • a (float) – Default: None.

  • xmin (float) – xmin. Default: -10.0.

  • sigma (float) – σ. Default: 1.0.

  • xmax (float) – xmax. Default: 10.0.

  • mu (float) – μ. Default: 0.0.

  • ymin (float) – ymin. Default: -10.0.

  • x0 (float) – x0. Default: 0.0.

  • ymax (float) – ymax. Default: 10.0.

  • y0 (float) – y0. Default: 0.0.

Returns:

New instance of Gauss2DParam.

class sigima.objects.Ramp2DParam[source]#

Define the parameters of a 2D ramp (planar ramp).

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

a#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

b#

Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

c#

Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

x0#

x0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

y0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

xmin#

xmin. Default: -1.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

ymin#

ymin. Default: -1.0.

Type:

guidata.dataset.dataitems.FloatItem

ymax#

ymax. Default: 1.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, a: float, b: float, c: float, x0: float, y0: float, xmin: float, xmax: float, ymin: float, ymax: float) sigima.objects.image.creation.Ramp2DParam#

Returns a new instance of Ramp2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • a (float) – Default: 1.0.

  • b (float) – Default: 1.0.

  • c (float) – Default: 0.0.

  • x0 (float) – x0. Default: 0.0.

  • y0 (float) – y0. Default: 0.0.

  • xmin (float) – xmin. Default: -1.0.

  • xmax (float) – xmax. Default: 1.0.

  • ymin (float) – ymin. Default: -1.0.

  • ymax (float) – ymax. Default: 1.0.

Returns:

New instance of Ramp2DParam.

class sigima.objects.Checkerboard2DParam[source]#

Checkerboard pattern parameters.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

square_size#

Size of each square in pixels. Integer higher than 1. Default: 64.

Type:

guidata.dataset.dataitems.IntItem

x0#

x0. X offset. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

y0. Y offset. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

vmin#

Minimum value. Value for dark squares. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

vmax#

Maximum value. Value for light squares. Default: 255.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, square_size: int, x0: float, y0: float, vmin: float, vmax: float) sigima.objects.image.creation.Checkerboard2DParam#

Returns a new instance of Checkerboard2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • square_size (int) – Size of each square in pixels. Integer higher than 1. Default: 64.

  • x0 (float) – x0. X offset. Default: 0.0.

  • y0 (float) – y0. Y offset. Default: 0.0.

  • vmin (float) – Minimum value. Value for dark squares. Default: 0.0.

  • vmax (float) – Maximum value. Value for light squares. Default: 255.0.

Returns:

New instance of Checkerboard2DParam.

class sigima.objects.SinusoidalGrating2DParam[source]#

Sinusoidal grating parameters.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

a#

Amplitude. Default: 100.0.

Type:

guidata.dataset.dataitems.FloatItem

c#

Dc offset. Default: 128.0.

Type:

guidata.dataset.dataitems.FloatItem

fx#

fx. Spatial frequency in x direction. Default: 0.1.

Type:

guidata.dataset.dataitems.FloatItem

fy#

fy. Spatial frequency in y direction. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

phase#

φ. Phase. Float, unit: rad. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

xmin#

xmin. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 100.0.

Type:

guidata.dataset.dataitems.FloatItem

ymin#

ymin. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

ymax#

ymax. Default: 100.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, a: float, c: float, fx: float, fy: float, phase: float, xmin: float, xmax: float, ymin: float, ymax: float) sigima.objects.image.creation.SinusoidalGrating2DParam#

Returns a new instance of SinusoidalGrating2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • a (float) – Amplitude. Default: 100.0.

  • c (float) – Dc offset. Default: 128.0.

  • fx (float) – fx. Spatial frequency in x direction. Default: 0.1.

  • fy (float) – fy. Spatial frequency in y direction. Default: 0.0.

  • phase (float) – φ. Phase. Float, unit: rad. Default: 0.0.

  • xmin (float) – xmin. Default: 0.0.

  • xmax (float) – xmax. Default: 100.0.

  • ymin (float) – ymin. Default: 0.0.

  • ymax (float) – ymax. Default: 100.0.

Returns:

New instance of SinusoidalGrating2DParam.

class sigima.objects.Ring2DParam[source]#

Ring pattern parameters.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

x0#

x0. Center x coordinate. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

y0. Center y coordinate. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

period#

Distance between ring centers. Float higher than 0.1. Default: 50.0.

Type:

guidata.dataset.dataitems.FloatItem

ring_width#

Width of each ring. Float higher than 0.1. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

vmin#

Minimum value. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

vmax#

Maximum value. Default: 255.0.

Type:

guidata.dataset.dataitems.FloatItem

xmin#

xmin. Default: -100.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 100.0.

Type:

guidata.dataset.dataitems.FloatItem

ymin#

ymin. Default: -100.0.

Type:

guidata.dataset.dataitems.FloatItem

ymax#

ymax. Default: 100.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, x0: float, y0: float, period: float, ring_width: float, vmin: float, vmax: float, xmin: float, xmax: float, ymin: float, ymax: float) sigima.objects.image.creation.Ring2DParam#

Returns a new instance of Ring2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • x0 (float) – x0. Center x coordinate. Default: 0.0.

  • y0 (float) – y0. Center y coordinate. Default: 0.0.

  • period (float) – Distance between ring centers. Float higher than 0.1. Default: 50.0.

  • ring_width (float) – Width of each ring. Float higher than 0.1. Default: 10.0.

  • vmin (float) – Minimum value. Default: 0.0.

  • vmax (float) – Maximum value. Default: 255.0.

  • xmin (float) – xmin. Default: -100.0.

  • xmax (float) – xmax. Default: 100.0.

  • ymin (float) – ymin. Default: -100.0.

  • ymax (float) – ymax. Default: 100.0.

Returns:

New instance of Ring2DParam.

class sigima.objects.SiemensStar2DParam[source]#

Siemens star pattern parameters.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

x0#

x0. Center x coordinate. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

y0. Center y coordinate. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

n_spokes#

Number of spokes. Number of spoke pairs. Integer higher than 2. Default: 36.

Type:

guidata.dataset.dataitems.IntItem

inner_radius#

Inner radius (hole in center). Float higher than 0.0. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

outer_radius#

Outer radius (edge of pattern). Float higher than 0.1. Default: 100.0.

Type:

guidata.dataset.dataitems.FloatItem

vmin#

Minimum value. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

vmax#

Maximum value. Default: 255.0.

Type:

guidata.dataset.dataitems.FloatItem

xmin#

xmin. Default: -100.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 100.0.

Type:

guidata.dataset.dataitems.FloatItem

ymin#

ymin. Default: -100.0.

Type:

guidata.dataset.dataitems.FloatItem

ymax#

ymax. Default: 100.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, x0: float, y0: float, n_spokes: int, inner_radius: float, outer_radius: float, vmin: float, vmax: float, xmin: float, xmax: float, ymin: float, ymax: float) sigima.objects.image.creation.SiemensStar2DParam#

Returns a new instance of SiemensStar2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • x0 (float) – x0. Center x coordinate. Default: 0.0.

  • y0 (float) – y0. Center y coordinate. Default: 0.0.

  • n_spokes (int) – Number of spokes. Number of spoke pairs. Integer higher than 2. Default: 36.

  • inner_radius (float) – Inner radius (hole in center). Float higher than 0.0. Default: 0.0.

  • outer_radius (float) – Outer radius (edge of pattern). Float higher than 0.1. Default: 100.0.

  • vmin (float) – Minimum value. Default: 0.0.

  • vmax (float) – Maximum value. Default: 255.0.

  • xmin (float) – xmin. Default: -100.0.

  • xmax (float) – xmax. Default: 100.0.

  • ymin (float) – ymin. Default: -100.0.

  • ymax (float) – ymax. Default: 100.0.

Returns:

New instance of SiemensStar2DParam.

class sigima.objects.Sinc2DParam[source]#

2D sinc function parameters.

title#

Default: ‘Untitled image’.

Type:

guidata.dataset.dataitems.StringItem

height#

Image height: number of rows. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

width#

Image width: number of columns. Integer higher than 1. Default: 1024.

Type:

guidata.dataset.dataitems.IntItem

dtype#

Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

Type:

guidata.dataset.dataitems.ChoiceItem

xlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

xunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

ylabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

yunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zlabel#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

zunit#

Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

a#

Amplitude. Default: 100.0.

Type:

guidata.dataset.dataitems.FloatItem

c#

Dc offset. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

x0#

x0. Center x coordinate. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

y0. Center y coordinate. Default: 0.0.

Type:

guidata.dataset.dataitems.FloatItem

sigma#

σ. Scale factor. Float higher than 0.1. Default: 10.0.

Type:

guidata.dataset.dataitems.FloatItem

xmin#

xmin. Default: -50.0.

Type:

guidata.dataset.dataitems.FloatItem

xmax#

xmax. Default: 50.0.

Type:

guidata.dataset.dataitems.FloatItem

ymin#

ymin. Default: -50.0.

Type:

guidata.dataset.dataitems.FloatItem

ymax#

ymax. Default: 50.0.

Type:

guidata.dataset.dataitems.FloatItem

classmethod create(title: str, height: int, width: int, dtype: str, xlabel: str, xunit: str, ylabel: str, yunit: str, zlabel: str, zunit: str, a: float, c: float, x0: float, y0: float, sigma: float, xmin: float, xmax: float, ymin: float, ymax: float) sigima.objects.image.creation.Sinc2DParam#

Returns a new instance of Sinc2DParam with the fields set to the given values.

Parameters:
  • title (str) – Default: ‘Untitled image’.

  • height (int) – Image height: number of rows. Integer higher than 1. Default: 1024.

  • width (int) – Image width: number of columns. Integer higher than 1. Default: 1024.

  • dtype (str) – Image data type. Single choice from: ‘UINT8’, ‘UINT16’, ‘INT16’, ‘FLOAT32’, ‘FLOAT64’. Default: ‘FLOAT64’.

  • xlabel (str) – Default: ‘’.

  • xunit (str) – Default: ‘’.

  • ylabel (str) – Default: ‘’.

  • yunit (str) – Default: ‘’.

  • zlabel (str) – Default: ‘’.

  • zunit (str) – Default: ‘’.

  • a (float) – Amplitude. Default: 100.0.

  • c (float) – Dc offset. Default: 0.0.

  • x0 (float) – x0. Center x coordinate. Default: 0.0.

  • y0 (float) – y0. Center y coordinate. Default: 0.0.

  • sigma (float) – σ. Scale factor. Float higher than 0.1. Default: 10.0.

  • xmin (float) – xmin. Default: -50.0.

  • xmax (float) – xmax. Default: 50.0.

  • ymin (float) – ymin. Default: -50.0.

  • ymax (float) – ymax. Default: 50.0.

Returns:

New instance of Sinc2DParam.

class sigima.objects.ROI2DParam[source]#

Image ROI parameters

title#

ROI title. Default: ‘’.

Type:

guidata.dataset.dataitems.StringItem

geometry#

Single choice from: ‘rectangle’, ‘circle’, ‘polygon’. Default: ‘rectangle’.

Type:

guidata.dataset.dataitems.ChoiceItem

x0#

X0. Default: 0.

Type:

guidata.dataset.dataitems.FloatItem

y0#

Y0. Default: 0.

Type:

guidata.dataset.dataitems.FloatItem

dx#

ΔX. Default: 0.

Type:

guidata.dataset.dataitems.FloatItem

dy#

ΔY. Default: 0.

Type:

guidata.dataset.dataitems.FloatItem

xc#

XC. Default: 0.

Type:

guidata.dataset.dataitems.FloatItem

yc#

YC. Default: 0.

Type:

guidata.dataset.dataitems.FloatItem

r#

Radius. Default: 0.

Type:

guidata.dataset.dataitems.FloatItem

points#

Coordinates. Default: None.

Type:

guidata.dataset.dataitems.FloatArrayItem

inverse#

When disabled (default), the roi defines an area inside the shape on which to focus (masking data outside). when enabled, the roi logic is inverted to focus on data outside the shape (masking data inside). Default: False.

Type:

guidata.dataset.dataitems.BoolItem

classmethod create(title: str, geometry: str, x0: float, y0: float, dx: float, dy: float, xc: float, yc: float, r: float, points: numpy.ndarray, inverse: bool) sigima.objects.image.roi.ROI2DParam#

Returns a new instance of ROI2DParam with the fields set to the given values.

Parameters:
  • title (str) – ROI title. Default: ‘’.

  • geometry (str) – Single choice from: ‘rectangle’, ‘circle’, ‘polygon’. Default: ‘rectangle’.

  • x0 (float) – X0. Default: 0.

  • y0 (float) – Y0. Default: 0.

  • dx (float) – ΔX. Default: 0.

  • dy (float) – ΔY. Default: 0.

  • xc (float) – XC. Default: 0.

  • yc (float) – YC. Default: 0.

  • r (float) – Radius. Default: 0.

  • points (numpy.ndarray) – Coordinates. Default: None.

  • inverse (bool) – When disabled (default), the roi defines an area inside the shape on which to focus (masking data outside). when enabled, the roi logic is inverted to focus on data outside the shape (masking data inside). Default: False.

Returns:

New instance of ROI2DParam.

class sigima.objects.ImageROI[source]#

Image Regions of Interest

Parameters:

inverse – if True, ROI is outside the region

PREFIX = 'i'#

Class attribute that defines a string prefix used for identifying ROI types in object metadata. This prefix is used when serializing and deserializing ROIs, allowing the system to determine the appropriate ROI class for reconstruction. Each ROI subclass should override this with a unique string identifier.

static get_compatible_single_roi_classes() list[Type[BaseSingleImageROI]][source]#

Return compatible single ROI classes

to_mask(obj: ImageObj) np.ndarray[source]#

Create mask from ROI

Parameters:

obj – image object

Returns:

Mask (boolean array where True values are inside the ROI)

class sigima.objects.ImageDatatypes(value)[source]#

Image data types

classmethod from_numpy_dtype(dtype: dtype) ImageDatatypes[source]#

Return ImageDatatypes member from NumPy dtype

Parameters:

dtype – NumPy dtype object

Returns:

Corresponding ImageDatatypes member

to_numpy_dtype() dtype[source]#

Return the corresponding NumPy dtype object.

This is the symmetrical counterpart to from_numpy_dtype().

Returns:

NumPy dtype object that can be used directly with numpy functions.

classmethod check() None[source]#

Check if data types are valid

UINT8 = 'uint8'#

Unsigned integer number stored with 8 bits

UINT16 = 'uint16'#

Unsigned integer number stored with 16 bits

INT16 = 'int16'#

Signed integer number stored with 16 bits

FLOAT32 = 'float32'#

Float number stored with 32 bits

FLOAT64 = 'float64'#

Float number stored with 64 bits