sparseKePeAxis
Sparse kenetic-potential energy ratio Axis.
Declaration
[kePeAxis,bins_kepe] = sparseKePeAxis(self)
Parameters
selfWVDiagnostics object
Returns
kePeAxisoutput valuekePeAxisbins_kepeoutput valuebins_kepe
Discussion
This function is used by create1DMirrorFluxes to create an efficient ke-pe axis.
The bin assignments, bins_kepe, can be used to create sparse matrices for efficient binning operations.
valid = ~isnan(bins_0);
S_0 = sparse(find(valid), bins_0(valid), 1, numel(wvt.Ap), numel(kp), nnz(valid));
F_wwg_kp_val = reshape(E0(:).' * S_0,[],1);