darsia.TracerAnalysis#

class TracerAnalysis(baseline, config, update_setup=False)[source]#

Bases: ABC, ConcentrationAnalysisBase

Manager wiring a baseline plus config into a tracer-concentration pipeline.

Subclass and implement define_tracer_analysis to specify the signal-to-concentration conversion.

Constructor for TracerAnalysis.

Parameters:
baselinestr, Path or list of such

See darsia.AnalysisBase.

configstr or Path

See darsia.AnalysisBase.

update_setupbool

See darsia.AnalysisBase.

Methods

batch_analysis(images, **kwargs)

Standard batch analysis.

define_tracer_analysis()

The main purpose of this routine is to define self.tracer_analysis, which lies at the heart of this class.

determine_tracer([return_volume])

Extract tracer from currently loaded image, based on a reference image.

load_and_process_image(path)

Load image for further analysis.

single_image_analysis(img, **kwargs)

Standard workflow to analyze CO2 phases.

Attributes

config

Config dict from file.

width

Physical width of image.

height

Physical height of image.

origin

Physical origin of origin voxel.

processed_baseline_images

List of corrected baseline images.

drift_correction

Drift correction wrt.

deformation_correction

Local deformation correction wrt.

color_correction

Color correction based on reference colors.

translation_correction

Translation correction based on fixed absolute translation.

curvature_correction

Curvature correction.

uncorrected_base

Baseline image stored as physical image but without corrections.

drift_corrected_base

Baseline image corrected for drift only.

abstractmethod define_tracer_analysis()[source]#

The main purpose of this routine is to define self.tracer_analysis, which lies at the heart of this class. It is supposed to determine tracers from image differences. Since the choice of a suitable color channel etc. may heavily depend on the situation, this method is abstract and has to be overwritten in each specific situation.

determine_tracer(return_volume=False)[source]#

Extract tracer from currently loaded image, based on a reference image.

Parameters:
return_volumebool

Flag controlling whether the volume of the fluid in the porous geometry is returned.

Returns:
darsia.Image

Image array of spatial concentration map.

float, optional

Occupied volume by the fluid in porous geometry.