darsia.SimpleMultiphaseTimeSeriesData#

class SimpleMultiphaseTimeSeriesData(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>)[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.

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

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)[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.

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.

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