remove_sample_nans

sofia_redux.toolkit.utilities.func.remove_sample_nans(samples, error, mask=False)[source]

Remove any samples containing NaNs from sample points

Parameters:
samplesnumpy.ndarray (ndim + 1, npoints)
errornumpy.ndarray (npoints,), optional
maskbool, optional

If True, return a mask of valid (True) data points

Returns:
(samples, error) or mask

inputs without any NaNs if mask is False, otherwise a mask (npoints,) marking valid (True) data points.