PlasmaCalcs.tools.xarray_tools.xarray_coords.xarray_log_coords

PlasmaCalcs.tools.xarray_tools.xarray_coords.xarray_log_coords(array, coords=None, newname='log_{coord}', *, base=10, drop=True, promote=False)
return copy of array with coords replaced by log coords (& renamed to log_coord)
coords: None, str, or iterable of strs
coords to replace with log. None –> all coords.
newcoord: str
string for new (logged) coord names: newcoord.format(coord=coord).
Default: ‘log_{coord}’. To keep original names, use ‘{coord}’
base: number or ‘e’
log in this base. default 10.
if not 10, result.assign_attrs({‘log_base’: base}).
drop: bool
whether to drop original coords’ values.
True –> drop original coords.
False –> add new coords but do not adjust original coords.
promote: bool
whether to promote all non-dim new log coords to dimensions.
if True, xarray_promote_dim for all new log coords.