remove_sparse_data

tessilator.lc_analysis.remove_sparse_data(x_first, x_last, min_crit_frac=0.05, min_crit_num=50)[source]

Removes very sparse data groups, when there are 3 or more groups.

Calculate the mean (mean_group) and standard deviation (std_group) for the number of data points in each group (n_points). If std_group > “std_crit”, then only keep groups with n_points > std_crit.

Parameters:
x_firstIterable

The index values of the first element in each group

x_lastIterable

The index values of the last element each group

min_crit_fracfloat, optional, default=.05

The minimum relative size of a flux component when correcting for sparse data in the cleaning functions.

min_crit_numint, optional, default=50

The minimum number of data points required for a flux component in the sparse data cleaning functions.

Returns:
y_firstnp.array

The index values of the first element of the new arrays

y_lastnp.array

The index values of the last element of the new arrays