š§ API referenceļ
The full public API of the rheodata package: list the registry, load tidy
data, and plot it.
Top-level packageļ
rheodata ā curated, quality-checked rheology datasets.
Find experimental datasets for training, simulation, and benchmarking:
>>> import rheodata
>>> rheodata.list() # every dataset, one row each
>>> rheodata.search(material="carbopol") # substring filters
>>> rheodata.info("caggioni_pg_carbopol_2pct") # human-readable summary
>>> ds = rheodata.load("caggioni_pg_carbopol_2pct")
>>> ds.df.head() # tidy DataFrame
>>> fig = rheodata.plot("caggioni_pg_carbopol_2pct")
>>> rdf = rheodata.to_rheofit("caggioni_pg_carbopol_2pct", sample="carbopol_2pct")
- class rheodata.Dataset(df: DataFrame, meta: dict, id: str)[source]ļ
Bases:
objectOne loaded dataset: tidy data, metadata, and id.
- df: DataFrameļ
Tidy data as stored in
data.csv.
- id: strļ
Dataset id (directory name).
- meta: dictļ
Full parsed
dataset.yamlmetadata.
- exception rheodata.DatasetError[source]ļ
Bases:
ExceptionRaised when a dataset fails registry validation.
- rheodata.list() DataFrame[source]ļ
One row per dataset: id, title, material, experiment, samples, year, doi.
- rheodata.load(ds_id: str) Dataset[source]ļ
Load a dataset:
Dataset(df, meta, id)with the tidydata.csv.
- rheodata.load_registry(root: Path | str | None = None) dict[source]ļ
Load and validate every dataset under root.
Defaults to the packaged
rheodata/datasetsdirectory discovered viaimportlib.resources. Returns{dataset_id: {"meta": ..., "path": ...}}. RaisesDatasetErrornaming the offending dataset on failure.
- rheodata.plot(ds_id: str, sample: str | int | None = None) Figure[source]ļ
Experiment-appropriate plot; returns a
matplotlib.figure.Figure.flow_curve: log-log Ļ(x) and Ī·(x) = y/x on twin y-axes, one curve per sample
amplitude_sweep / frequency_sweep: Gā², Gā³ vs x (log-log)
shear_startup: stress vs strain (log-linear x)
creep / stress_relaxation: strain/stress vs time (log-log)