darsia.ConcentrationAnalysis#

class ConcentrationAnalysis(base=None, signal_reduction=None, balancing=None, restoration=None, model=None, labels=None, **kwargs)[source]#

Bases: object

Class providing the capabilities to determine concentration/saturation profiles based on image comparison, and interpretation of intensity maps.

Set up a concentration analysis.

Each processing stage defaults to the identity when its argument is None.

Parameters:
basedarsia.Image or list of darsia.Image, optional

Baseline image(s); several images define a cleaning filter.

signal_reductiondarsia.SignalReduction, optional

Reduction from multi-channel to scalar data.

balancingdarsia.Model, optional

Operator balancing the signal, e.g. across facies.

restorationdarsia.TVD, optional

Regulariser applied to the scalar signal.

modeldarsia.Model, optional

Conversion of the signal to a physical quantity.

labelsdarsia.Image, optional

Labelled image of the domain; None means a homogeneous medium.

**kwargs

Tuning parameters:

"diff option"          "positive" | "negative" | "absolute"
                       | "plain"   (how image differences are
                       formed)
"restoration -> model" if True, restoration runs before the
                       model conversion
"verbosity"            0 (none) | 1 (final only) | 2 (all
                       intermediate results)

Methods

find_cleaning_filter([baseline_images])

Determine structural noise by studying a series of baseline images.

read_cleaning_filter_from_file(path)

Read cleaning filter from file.

update([base, mask])

Update of the baseline image or parameters.

write_cleaning_filter_to_file(path_to_filter)

Store cleaning filter to file.

Attributes

base

Baseline image.

signal_reduction

Reduction to scalar signal.

balancing

Balancing for heterogeneous signals.

model

Signal to data conversion model.

restoration

Restoration model.

labels

Indicator for heterogeneous image.

first_restoration_then_model

Option for defining order of routines.

mask

Mask.

verbosity

Fetch verbosity.

find_cleaning_filter(baseline_images=None)[source]#

Determine structural noise by studying a series of baseline images. The resulting cleaning filter will be used prior to the conversion of signal to concentration. The cleaning filter should be understood as thresholding mask.

Parameters:
baseline_imageslist of images

Series of baseline_images; default: use internally available baseline images.

read_cleaning_filter_from_file(path)[source]#

Read cleaning filter from file.

Parameters:
pathstr or Path

Path to cleaning filter array.

update(base=None, mask=None)[source]#

Update of the baseline image or parameters.

Parameters:
baseImage, optional

Image array.

masknp.ndarray, optional

Boolean mask, detecting which pixels will be considered, all other will be ignored in the analysis.

write_cleaning_filter_to_file(path_to_filter)[source]#

Store cleaning filter to file.

Parameters:
path_to_filterstr or Path

Path for storage of the cleaning filter.

balancing#

Balancing for heterogeneous signals.

base#

Baseline image.

first_restoration_then_model#

Option for defining order of routines.

labels#

Indicator for heterogeneous image.

mask#

Mask.

model#

Signal to data conversion model.

restoration#

Restoration model.

signal_reduction#

Reduction to scalar signal.

verbosity#

Fetch verbosity. With increasing number, more intermediate results are displayed. Useful for parameter tuning.