PlasmaCalcs.addons.instability_tools.instability_theory_tools.xarray_at_growmax

PlasmaCalcs.addons.instability_tools.instability_theory_tools.xarray_at_growmax(array, growth=None)
returns array where growth rate is maxxed across k dims from array.
array: xarray.DataArray, or xarray.Dataset
result == array.isel(location where growth is maxxed across k dims).
if growth is None, array also tells growth rates via array.it.growth.
growth: None, xarray.DataArray or xarray.Dataset
None –> use array.it.growth
DataArray –> growth rates (if real) or omega (if complex).
Dataset –> get growth from ds[‘omega’].imag.