resampler

sofia_redux.toolkit.resampling.resampler(coordinates, data, *locations, error=None, mask=None, window=None, order=1, fix_order=True, robust=None, negthresh=None, window_estimate_bins=10, window_estimate_percentile=50, window_estimate_oversample=2.0, leaf_size=40, large_data=False, smoothing=0.0, relative_smooth=False, adaptive_threshold=None, adaptive_algorithm='scaled', fit_threshold=0.0, cval=nan, edge_threshold=0.0, edge_algorithm='distribution', order_algorithm='bounded', error_weighting=True, estimate_covariance=False, is_covar=False, jobs=None, get_error=False, get_counts=False, get_weights=False, get_distance_weights=False, get_rchi2=False, get_cross_derivatives=False, get_offset_variance=False, **distance_kwargs)

ResamplePolynomial data using local polynomial fitting.

Initializes and then calls the ResamplePolynomial class. For further details on all available parameters, please see ResamplePolynomial.__init__() and ResamplePolynomial.__call__().

Parameters:
coordinates
data
locations
error
mask
window
order
fix_order
robust
negthresh
window_estimate_bins
window_estimate_percentile
window_estimate_oversample
leaf_size
large_data
smoothing
relative_smooth
adaptive_threshold
adaptive_algorithm
fit_threshold
cval
edge_threshold
edge_algorithm
order_algorithm
error_weighting
estimate_covariance
is_covar
jobs
get_error
get_counts
get_weights
get_distance_weights
get_rchi2
get_cross_derivatives
get_offset_variance
distance_kwargs
Returns:
resultsfloat or numpy.ndarray or n-tuple of (float or numpy.ndarray)

If a fit is performed at a single location, the output will consist of int or float scalar values. Multiple fits result in numpy arrays. The exact output shape depends on the number of data sets, number of fitted points, dimensions of the fit locations. Assuming that all get_* keywords are set to True, the output order is:

results[0] = fitted values results[1] = error on the fit results[2] = sample counts for each fit results[3] = total weight of all samples in fit results[4] = total distance weight sum of all samples in fit results[5] = reduced chi-squared statistic of the fit results[6] = derivative mean squared cross products results[7] = offset variance of fit from sample distribution