4.1.2.7. pamtra2.helpers¶
4.1.2.7.1. Module Contents¶
4.1.2.7.1.1. Classes¶
Dictionary accesible through attributes |
4.1.2.7.1.2. Functions¶
|
To do: move this routine into separte module together with t-matrix, |
|
Provide all arguments and keyword arguments of a function. Does not |
|
concatenate (ordered) dicts |
|
Swap i1 and i2 of li. |
|
|
|
|
|
Decorator to merge multiple outputs of a function's result |
|
Extended version of xarray's xr.apply_ufunc which can handle with |
|
Wrapper for np.gradient which is not available in xarray |
|
Faster version of xarray's unstack. Required until |
- rayleigh(diameter, K2, frequency)[source]¶
To do: move this routine into separte module together with t-matrix, mie etc code.
- provideArgKwargNames(func)[source]¶
Provide all arguments and keyword arguments of a function. Does not work with *arg and **kwarg
- class AttrDict(*args, **kwargs)[source]¶
Bases:
collections.OrderedDictDictionary accesible through attributes
- mergeFlattResults(core_shapes=None)[source]¶
Decorator to merge multiple outputs of a function’s result into one joined array. Dimensions NOT in core_shapes are preserved.
- apply_ufunc_extended(func, *args, **kwargs)[source]¶
Extended version of xarray’s xr.apply_ufunc which can handle with multiple output of a functions and dask. New keyword output_names required with a list of the names of the returned variables. Note that different types in the results are not preserved.
- xrFastUnstack(dataset, dim)[source]¶
Faster version of xarray’s unstack. Required until https://github.com/pydata/xarray/issues/1560 is closed.
Unstack an existing dimension corresponding to a MultiIndex into multiple new dimensions. New dimensions will be added at the end. :param dim: Name of the existing dimension to unstack. :type dim: str
- Returns
unstacked – Dataset with unstacked data.
- Return type
Dataset
See also
Dataset.stack