PlasmaCalcs.addons.instability_tools.instability_theory_tools.xarray_where_nogrows

PlasmaCalcs.addons.instability_tools.instability_theory_tools.xarray_where_nogrows(growth, target=None, *, drop=UNSET)
return target where growth <= 0. Roughly: target.where(~xarray_grows(growth)).
(or, growth.where(~xarray_grows(growth)) if target is None).
growth: DataArray or Dataset
xarray object containing growth info.
real DataArray –> growth tells growth rates.
complex DataArray –> growth tells omega; rates = omega.imag.
Dataset –> growth rates = ds[‘omega’].imag
target: None, str, DataArray, or Dataset
xarray object of interest.
result tells target.where(~grows).
drop: UNSET or bool
whether to drop as many nan values as possible from the result.
see xarray_where_grows (or itAccessor.where_grows.f) for more details.