darsia.MultiphaseTimeSeriesAnalysis#
- class MultiphaseTimeSeriesAnalysis(geometry)[source]#
Bases:
objectClass for analyzing a single run of the multiphase flow experiment. Includes data tracking, time series data management, and plotting of results.
Methods
clean(threshold)Remove faulty data from tracked time series data.
load(path)Load the multiphase time series data from a csv file.
plot_contour_mass(img, mass_analysis_result, ...)Plot contours of the mass on the image.
plot_contour_signal(img, ...[, thickness])Plot contours of the aqueous and gaseous signals on the image.
plot_mass_over_time(path, **kwargs)Plot the time series mass data of gaseous and aqueous phases.
plot_result(mass_analysis_result, component, ...)Plot the result of the mass analysis for a specific component.
plot_volume_over_time(path, **kwargs)Plot the time series volume of gaseous and aqueous phases.
reset()Reset the tracking time series data to empty lists.
save(path)Save the multiphase time series data to a csv file.
track(mass_analysis_result)Track the mass analysis result and add to time series data.
Attributes
Geometry for integration of mass and volume.
Time series data for multiphase mass and volume tracking.
Color for aqueous phase in plots.
Color for gaseous phase in plots.
Color for mass in plots.
- clean(threshold)[source]#
Remove faulty data from tracked time series data.
- Parameters:
- threshold
float Threshold for cleaning the data. Data points with absolute values below this threshold will be removed.
- threshold
- load(path)[source]#
Load the multiphase time series data from a csv file.
- Parameters:
- path
Path Path to the csv file containing the time series data.
- path
- plot_contour_mass(img, mass_analysis_result, values, path, thickness=5)[source]#
Plot contours of the mass on the image.
- Parameters:
- img
darsia.Image The image on which to plot the contours.
- mass_analysis_result
darsia.MassAnalysisResults The mass analysis results containing the mass data.
- values
list[float] List of mass values to create contours for.
- path
Path Path to save the contour image.
- thickness
int,optional Thickness of the contour lines. Defaults to 5.
- img
- Returns:
darsia.ImageThe contour image with mass contours plotted.
- plot_contour_signal(img, mass_analysis_result, values_aq, values_g, path, thickness=5)[source]#
Plot contours of the aqueous and gaseous signals on the image.
- Parameters:
- img
darsia.Image The image on which to plot the contours.
- mass_analysis_result
darsia.MassAnalysisResults The mass analysis results containing the signals.
- values_aq
list[float] List of aqueous signal values to create contours for.
- values_g
list[float] List of gaseous signal values to create contours for.
- path
Path Path to save the contour image.
- thickness
int,optional Thickness of the contour lines. Defaults to 5.
- img
- Returns:
darsia.ImageThe contour image with aqueous and gaseous signal contours plotted.
- plot_mass_over_time(path, **kwargs)[source]#
Plot the time series mass data of gaseous and aqueous phases.
- Parameters:
- path
Path Path to save the plot.
- **kwargs
Additional keyword arguments, e.g., ‘upper_time_limit’ to limit the time range.
- path
- plot_result(mass_analysis_result, component, path, vmax=None)[source]#
Plot the result of the mass analysis for a specific component.
- Parameters:
- mass_analysis_result
darsia.MassAnalysisResults The mass analysis results containing the component data.
- component
str The component to plot, e.g., ‘normalized_signal_aq’, ‘normalized_signal_g’, or ‘mass’.
- path
darsia.Path Path to save the plot.
- vmax
Optional[float] Maximum value for the color scale. If None, the maximum value of the image is used.
- mass_analysis_result
- plot_volume_over_time(path, **kwargs)[source]#
Plot the time series volume of gaseous and aqueous phases.
- Parameters:
- path
Path Path to save the plot.
- **kwargs
Additional keyword arguments, e.g., ‘upper_time_limit’ to limit the time range.
- path
- save(path)[source]#
Save the multiphase time series data to a csv file.
- Parameters:
- path
Path Path to the csv file to save the time series data.
- path
- abstractmethod track(mass_analysis_result)[source]#
Track the mass analysis result and add to time series data.
Use: self.data.append(…) to add data to the time series.
- Parameters:
- mass_analysis_result
darsia.MassAnalysisResults The mass analysis results containing the component data. This should include the mass and volume data for gaseous and aqueous phases.
- mass_analysis_result
- color_aq#
Color for aqueous phase in plots.
- color_g#
Color for gaseous phase in plots.
- color_mass#
Color for mass in plots.
- data#
Time series data for multiphase mass and volume tracking.
- geometry#
Geometry for integration of mass and volume.