darsia.MultiphaseTimeSeriesData#

class MultiphaseTimeSeriesData(time: List[float] = <factory>, name: List[str] = <factory>, mass_g: List[float] = <factory>, mass_aq: List[float] = <factory>, mass_tot: List[float] = <factory>, exact_mass_tot: List[float | None] = <factory>, volume_g: List[float] = <factory>, volume_aq: List[float] = <factory>, volume_tot: List[float] = <factory>)[source]#

Bases: TimeSeriesData

Methods

append(time, name, mass_g, mass_aq, ...)

Append a new data point to the multiphase data.

clean([tol])

Remove data points outside a absolute/relative mass difference threshold.

load(path)

Load the multiphase data from a csv file.

plot_mass_over_time([time_max, show, path])

Plot mass of gaseous, aqueous and total phases over time.

plot_volume_over_time([time_max, show, path])

Plot volume of gaseous, aqueous and total phases over time.

reset()

Reset the multiphase data to empty lists.

save(path)

Save the multiphase data to a csv file.

Attributes

mass_g

Mass of the gaseous phase at each time point

mass_aq

Mass of the aqueous phase at each time point

mass_tot

Total mass (gaseous + aqueous) at each time point

exact_mass_tot

Exact/expected total mass at each time point, if available

volume_g

Volume of the gaseous phase at each time point

volume_aq

Volume of the aqueous phase at each time point

volume_tot

Total volume (gaseous + aqueous) at each time point

time

Time at each data point

name

Name for each data point, e.g. name of raw image.

append(time, name, mass_g, mass_aq, exact_mass_tot, volume_g, volume_aq)[source]#

Append a new data point to the multiphase data.

Parameters:
timefloat

Time at which the data was recorded.

namestr

Name for the data point, e.g. name of raw image.

mass_gfloat

Mass of the gaseous phase at this time point.

mass_aqfloat

Mass of the aqueous phase at this time point.

exact_mass_totOptional[float]

Exact/expected total mass.

volume_gfloat

Volume of the gaseous phase at this time point.

volume_aqfloat

Volume of the aqueous phase at this time point.

clean(tol=inf)[source]#

Remove data points outside a absolute/relative mass difference threshold.

The comparison is drawn based on the total and exact mass (reference).

Parameters:
tolfloat

Absolute or relative threshold for the mass difference. Default is np.inf, which means no cleaning.

load(path)[source]#

Load the multiphase data from a csv file.

plot_mass_over_time(time_max=None, show=False, path=None)[source]#

Plot mass of gaseous, aqueous and total phases over time.

plot_volume_over_time(time_max=None, show=False, path=None)[source]#

Plot volume of gaseous, aqueous and total phases over time.

reset()[source]#

Reset the multiphase data to empty lists.

save(path)[source]#

Save the multiphase data to a csv file.

exact_mass_tot#

Exact/expected total mass at each time point, if available

mass_aq#

Mass of the aqueous phase at each time point

mass_g#

Mass of the gaseous phase at each time point

mass_tot#

Total mass (gaseous + aqueous) at each time point

volume_aq#

Volume of the aqueous phase at each time point

volume_g#

Volume of the gaseous phase at each time point

volume_tot#

Total volume (gaseous + aqueous) at each time point