darsia.InjectionProtocol#

class InjectionProtocol(path)[source]#

Bases: object

Injection protocol: the sequence of injection events and their rates.

The rates are mass rates (kg/s) and/or volume rates (m3/s), depending on the columns of the protocol file.

Methods

injected_mass([date, time, roi])

Get the cumulative injected mass until the given date.

injected_volume([date, time, roi])

Get the cumulative injected volume until the given date.

Attributes

has_mass

Whether the protocol defines a mass rate for every injection.

has_volume

Whether the protocol defines a volume rate for every injection.

df

DataFrame containing the protocol.

num_injections

Number of injections in the protocol.

injected_mass(date=None, time=None, roi=None)[source]#

Get the cumulative injected mass until the given date.

Parameters:
datedatetime

Date to get the cumulative injected mass for.

timefloat

Time (in hours) to get the cumulative injected mass for.

roiOptional[darsia.Image]

Region of interest for the mass calculation.

Returns:
float

Cumulative injected mass [kg] until the given date.

injected_volume(date=None, time=None, roi=None)[source]#

Get the cumulative injected volume until the given date.

Parameters:
datedatetime

Date to get the cumulative injected volume for.

timefloat

Time (in hours) to get the cumulative injected volume for.

roiOptional[darsia.Image]

Region of interest for the volume calculation.

Returns:
float

Cumulative injected volume [m3] until the given date.

df#

DataFrame containing the protocol.

property has_mass#

Whether the protocol defines a mass rate for every injection.

property has_volume#

Whether the protocol defines a volume rate for every injection.

num_injections#

Number of injections in the protocol.