makeDense#
- lsst.ts.wep.utils.makeDense(values, nollIndices, jmax=None)#
Inserts sparse values into dense array of Zeroes.
For example, if values=[1, -2, -4], nollIndices=[4, 5, 7], this function returns [1, -2, 0, -4].
- Parameters:
values (np.ndarray) – Array of sparse values that will be inserted into the dense array.
nollIndices (np.ndarray) – Array of Noll indices to select. Must contain only indices >= 4. Note these values must be unique, ascending, and >= 4.
jmax (int or None, optional) – The maximum Noll index of the dense array. If None, the max value of nollIndices is used. (the default is None)
- Returns:
A dense array of values, corresponding to Noll indices 4 - jmax. Missing values are zero.
- Return type:
np.ndarray