makeSparse#

lsst.ts.wep.utils.makeSparse(values, nollIndices)#

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:
  • values (np.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.

  • nollIndices (np.ndarray) – Array of Noll indices to select. Must contain only indices >= 4. Note these values must be unique, ascending, and >= 4.

Returns:

Down-selected values

Return type:

np.ndarray