sup3r.preprocessing.base.Container#

class Container(data: Sup3rX | Sup3rDataset | Tuple[Sup3rX, ...] | Tuple[Sup3rDataset, ...] | None = None)[source]#

Bases: object

Basic fundamental object used to build preprocessing objects. Contains an xarray-like Dataset (Sup3rX), wrapped tuple of Sup3rX objects (Sup3rDataset), or a tuple of such objects.

Parameters:

data (Union[Sup3rX, Sup3rDataset, Tuple[Sup3rX, …],) – Tuple[Sup3rDataset, …] Can be an xr.Dataset, a Sup3rX object, a Sup3rDataset object, or a tuple of such objects.

Note

.data will return a Sup3rDataset object or tuple of such. This is a tuple when the .data attribute belongs to a Collection object like BatchHandler. Otherwise this is Sup3rDataset object, which is either a wrapped 2-tuple or 1-tuple (e.g. len(data) == 2 or len(data) == 1). This is a 2-tuple when .data belongs to a dual container object like DualSampler and a 1-tuple otherwise.

Methods

post_init_log([args_dict])

Log additional arguments after initialization.

wrap(data)

Return a Sup3rDataset object or tuple of such.

Attributes

data

Return underlying data.

shape

Get shape of underlying data.

property data#

Return underlying data.

Returns:

Sup3rDataset

See also

wrap()

wrap(data)[source]#

Return a Sup3rDataset object or tuple of such. This is a tuple when the .data attribute belongs to a Collection object like BatchHandler. Otherwise this is Sup3rDataset object, which is either a wrapped 2-tuple or 1-tuple (e.g. len(data) == 2 or len(data) == 1). This is a 2-tuple when .data belongs to a dual container object like DualSampler and a 1-tuple otherwise.

post_init_log(args_dict=None)[source]#

Log additional arguments after initialization.

property shape#

Get shape of underlying data.