makeSparse

lsst.ts.wep.utils.makeSparse(values: ndarray, nollIndices: ndarray) ndarray

Down-select the values array according to requested Noll indices.

For example, if values=[1, -2, 3, -4], nollIndices=[4, 5, 7], this function returns [1, -2, -4].

Parameters

valuesnp.ndarray

Array of values to be down-selected. Selection is applied to the first axis, which must correspond to consecutive Noll indices, starting with Noll index 4.

nollIndicesnp.ndarray

Array of Noll indices to select. Must contain only indices >= 4. Note these values must be unique, ascending, and >= 4.

Returns

np.ndarray

Down-selected values