Concentration analysis#

The core scientific task: given a baseline image and a sequence of later images, turn the colour changes into a physical field – a tracer concentration, a CO2 saturation, a mass map.

The pipeline#

ConcentrationAnalysis chains four stages, each pluggable:

  1. baseline difference – subtract the pre-injection image;

  2. signal reduction – collapse the (possibly multichannel) difference to a scalar (MonochromaticReduction, SignalReduction; see Signal models);

  3. restoration – denoise the scalar signal (TVD; see Restoration);

  4. model – map the signal to a physical quantity (LinearModel, KernelInterpolation, CombinedModel, …).

import darsia

analysis = darsia.ConcentrationAnalysis(
    base=baseline,
    signal_reduction=darsia.MonochromaticReduction(color="red"),
    restoration=darsia.TVD(),
    model=darsia.CombinedModel([
        darsia.LinearModel(scaling=4.0),
        darsia.ClipModel(min_value=0.0, max_value=1.0),
    ]),
)
concentration = analysis(test_image)

Calibration#

The model’s parameters are rarely known a priori. DarSIA fits them against images with known concentrations:

Managers#

TracerAnalysis and CO2Analysis (both AnalysisBase) wire a full baseline-plus-config pipeline together for the common experiment types; subclass and override define_*_analysis to customise.

See also#