FluidSingleValueSpecifier

class PlasmaCalcs.dimensions.fluids.FluidSingleValueSpecifier(getter, checker, name=None, *args_super, iseler=None, **kw_super)

Bases: Sentinel, DimensionSingleValueSpecifier

class to specify single values for FluidDimension.

E.g. fluids.get(ION) is equivalent to fluids.get_ion().
E.g. (fluid_dim.v = ION) is equivalent to (fluid_dim.v = fluid_dim.values.get_ion())
getter: str
self specifies to use the value(s): fluids.get_{getter}().
name: str
name of this object; will only be used in repr.
iseler: None or str
self specifies to use (during xarray_isel or xarray_sel) indexes: fluids.{iseler}()
additional args & kw go to Sentinel.__new__

Methods

_checker_as_str()

returns str representation of self.checker.

_checker_from_str(value)

check if value is a match for str self.checker.

_getter_as_str()

returns str representation of self.getter.

_getter_from_str(dlist)

get the value from dlist specified by str self.getter.

_iseler_as_str()

returns str representation of self.iseler.

_iseler_from_str(dvals)

get the indexes from dlist specified by str self.iseler.

_iseler_when_none(dvals)

crash, because self was passed to xarray_isel or xarray_sel but self.iseler is None.

_repr_contents()

contents for repr; used by __repr__.

_checker_as_str()

returns str representation of self.checker.

Use self.init_checker if it exists, else self.checker if it exists, else ‘UNKNOWN_CHECKER’.
_checker_from_str(value)

check if value is a match for str self.checker.

_getter_as_str()

returns str representation of self.getter.

Use self.init_getter if it exists, else self.getter if it exists, else ‘UNKNOWN_GETTER’.
_getter_from_str(dlist)

get the value from dlist specified by str self.getter.

_iseler_as_str()

returns str representation of self.iseler.

Use self.init_iseler if it exists, else self.iseler if it exists, else ‘UNKNOWN_ISELER’.
_iseler_from_str(dvals)

get the indexes from dlist specified by str self.iseler.

_iseler_when_none(dvals)

crash, because self was passed to xarray_isel or xarray_sel but self.iseler is None.

_repr_contents()

contents for repr; used by __repr__.

isel_cls

alias of FluidList