sparseOmegaAxis
Sparse Omega Axis.
Declaration
[omegaAxis,bins_omega] = sparseOmegaAxis(self)
Parameters
selfWVDiagnostics object
Returns
omegaAxisoutput valueomegaAxisbins_omegaoutput valuebins_omega
Discussion
This function is used by create1DMirrorFluxes to create an efficient omega axis.
The bin assignments, bins_omega, 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);