temo.analyze package

Submodules

temo.analyze.plotting module

class temo.analyze.plotting.ModelAssessmentPlotter(*, results=None, result_path=None, result_filter, allow_noresults=True, teqp_data_path='/home/docs/checkouts/readthedocs.org/user_builds/temo/conda/latest/lib/python3.12/site-packages/teqp/fluiddata')[source]

Bases: object

last_stepfile: Dict
plot_B12(*, ax, z1_comps, Trange: List[float], labels: List[str], model=None)[source]

Plot the second cross virial coefficient B_12

Parameters:
  • ax – the axis onto which to plot

  • z1_comps – the list of compositions of the first component for which B12 curves are desired

  • Trange – the two-element list of min and max temperature

  • labels (optional) – the label for each trace

  • model (optional) – the teqp.AbstractModel instance, or the default if not provided

plot_binary_VLE_isotherms(*, ax, Tvec: List[float], cmap, ipure, model=None, basemodel=None, options: Dict | None = None, plot_kwargs: Dict = {})[source]
Parameters:
  • ax – the axis onto which to plot

  • Tvec – the iterable containing the temperatures for which isotherms are desired

  • cmap – the callable with method to_rgba(T) that will be used to determine the color of the trace

  • ipure – the index, in {0,1}, that is the fluid from which the trace starts

  • model (optional) – the teqp.AbstractModel instance, or the default if not provided

  • basemodel (optional) – the teqp.AbstractModel instance for the basemodel, or the default if not provided

  • plot_kwargs (optional) – a dictionary of common arguments to be applied to liquid and vapor traces

plot_binary_critical_locus(*, ax, kind, ipure, model=None, basemodel=None, options: Dict | None = None, plot_kwargs: Dict = {})[source]
Parameters:
  • ax – the axis onto which to plot

  • kind – the variables to be plotted, one of {‘XP’,’TP’}

  • ipure – the index of the fluid, in {0,1}, from which the trace starts

  • model (optional) – the teqp.AbstractModel instance, or the default if not provided

  • basemodel (optional) – the teqp.AbstractModel instance for the basemodel, or the default if not provided

  • options (optional) – key-value pairs to overwrite sensible defaults in teqp.TCABOptions

  • plot_kwargs (optional) – a dictionary of common arguments to be applied to the trace

plot_cost_history(*, ax, stepfiles=None)[source]

Plot the history of the cost function over the course of the optimization

Parameters:
  • ax – The axis to plot onto

  • stepfiles (optional) – The stepfiles, provided as a list of JSON instances

stepfiles: List[Dict]
class temo.analyze.plotting.PairMinFilter(pair, bgindices=None)[source]

Bases: object

class temo.analyze.plotting.ResultsParser(path)[source]

Bases: object

assess_from_path(path)[source]
get_all_uid(path)[source]
get_fitdata_df(key, **kwargs)[source]

Return a selected DataFrame from the fitdataroot folder in the archive :param key: The search string that should be in the filename to be pulled from the fitdataroot folder in the archive

Usage: provide ‘SOS’ for key to obtain the DataFrame for SOS.csv file, for instance

Good options for key are: ‘VLE’,’SOS’,’PVT’, etc.

get_lowest_cost_uid(*, prefilter=None)[source]

prefilter: a function taking the dataframe, returning a mask array (for instance to throw out some solutions)

returns the uid

get_result(uid: str)[source]

Get a particular run result, given by its uid

get_stepfiles(uid)[source]
Parameters:

uid – The unique identifier for the run

to_csv(*, prefix)[source]
class temo.analyze.plotting.UidFilter(uid)[source]

Bases: object

temo.analyze.plotting.build_mutant(teqp_names: List[str], path: str, spec: dict, *, flags=None)[source]
temo.analyze.plotting.calc_critical_curves(*, model, basemodel, ipure, integration_order, polish_reltol_T=100, polish_reltol_rho=100)[source]
temo.analyze.plotting.get_rhovecLV_guess(basemodel, T, ipure)[source]
temo.analyze.plotting.isotherm(model, T, rhovecL, rhovecV, also_json=False, crit_threshold=5e-08) DataFrame | tuple[DataFrame, dict][source]
temo.analyze.plotting.plot_all_dilute_neff(z_1, *, models, aliases)[source]
temo.analyze.plotting.plot_all_reducing_functions(*, models, aliases, yvar='rho')[source]
temo.analyze.plotting.plot_critical_locus_history(basemodel, *, stepfiles, override=None, dfcr=None, ylim=None)[source]
temo.analyze.plotting.plot_criticality(*, model, Tlim: Sequence[float], rholim: Sequence[float], z_1: float, TN: int = 100, rhoN: int = 100, ax=None, show=True)[source]
temo.analyze.plotting.plot_criticality_constT(*, T, model, zlim=(0, 1), rholim, zN=100, rhoN=100, ax=None, show=True)[source]
temo.analyze.plotting.plot_px_history(*, root, uid, stepfiles, override=None)[source]

Module contents