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:
TimeSeriesDataMethods
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 of the gaseous phase at each time point
Mass of the aqueous phase at each time point
Total mass (gaseous + aqueous) at each time point
Exact/expected total mass at each time point, if available
Volume of the gaseous phase at each time point
Volume of the aqueous phase at each time point
Total volume (gaseous + aqueous) at each time point
timeTime at each data point
nameName 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:
- time
float Time at which the data was recorded.
- name
str Name for the data point, e.g. name of raw image.
- mass_g
float Mass of the gaseous phase at this time point.
- mass_aq
float Mass of the aqueous phase at this time point.
- exact_mass_tot
Optional[float] Exact/expected total mass.
- volume_g
float Volume of the gaseous phase at this time point.
- volume_aq
float Volume of the aqueous phase at this time point.
- time
- 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:
- tol
float Absolute or relative threshold for the mass difference. Default is np.inf, which means no cleaning.
- tol
- 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.
- 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