sbmlsim.xresult

Module for encoding simulation results and processed data.

Module Contents

Classes

XResult

Data structure for storing results.

Attributes

logger

uinfo

sbmlsim.xresult.logger[source]
class sbmlsim.xresult.XResult(xdataset)[source]

Data structure for storing results.

Results is always structured data. A wrapper around xr.Dataset from xarray

Parameters

xdataset (xarray.Dataset) –

__getitem__(key)[source]

Get item.

Parameters

key (str) –

Return type

xarray.DataArray

__getattr__(attr)[source]

Provide dot access to keys.

Parameters

attr (str) –

__str__()[source]

Get string.

Return type

str

__repr__()[source]

Get string representation.

Return type

str

set_units(udict=None)[source]

Set units on attributes.

Parameters

udict (Optional[Dict[str, str]]) –

static from_dfs(dfs, scan=None, udict=None)[source]

Create XResult from DataFrames.

Structure is based on the underlying scans which were performed. An optional unit dictionary can be provided.

Parameters
Return type

XResult

to_netcdf(path)[source]

Store results as netcdf4/HDF5.

Parameters

path (pathlib.Path) –

static from_netcdf(path)[source]

Read from netCDF.

Parameters

path (pathlib.Path) –

Return type

XResult

to_mean_dataframe()[source]

Convert to DataFrame with mean data.

Return type

pandas.DataFrame

to_dataframe()[source]

Convert to DataFrame.

Only timecourse simulations without scan

Return type

pandas.DataFrame

is_scan()[source]

Check if scan.

Checks if additional dimensions besides _time exist.

Return type

bool

to_tsv(path_tsv)[source]

Write data to tsv.

mean_all_dims(key)[source]

Get mean over all dimensions.

Skips NA.

Parameters

key (str) –

Return type

xarray.Dataset

std_all_dims(key)[source]

Get standard deviation over all dimensions besides time.

Skips NA.

Parameters

key (str) –

Return type

xarray.Dataset

min_all_dims(key)[source]

Get minimum over all dimensions besides time.

Skips NA.

Parameters

key (str) –

Return type

xarray.Dataset

max_all_dims(key)[source]

Get maximum over all dimensions besides time.

Skips NA.

Parameters

key (str) –

Return type

xarray.Dataset

_redop_dims()[source]

Dimensions for reducing operations.

All dimensions besides time.

Return type

List[str]

sbmlsim.xresult.uinfo[source]