classmethod foxes.core.Data.from_dataset(ds, *args, callback=None, s_states=None, copy=True, **kwargs)[source]

Create Data object from a dataset

Parameters

ds: xarray.Dataset

The dataset

args: tuple, optional

Additional parameters for the constructor

callback: Function, optional

Function f(data, dims) that manipulates the data and dims dicts before construction

s_states: slice, optional

Slice object for states

copy: bool

Flag for copying data

kwargs: dict, optional

Additional parameters for the constructor

Returns

data: Data

The data object