rbf_mean_combine

sofia_redux.instruments.fifi_ls.resample.rbf_mean_combine(combined, grid_info, window=None, error_weighting=True, smoothing=None, order=0, robust=None, neg_threshold=None, fit_threshold=None, edge_threshold=None, skip_uncorrected=False, **kwargs)[source]

Combines multiple datasets using radial basis functions and mean combine.

The combined data is stored in the combined dictionary, in the GRID_FLUX, GRID_ERROR, and GRID_COUNTS keys.

Parameters:
combineddict

Dictionary containing combined data

grid_infodict

Dictionary containing output grid coordinates and other necessary information.

windowfloat or array_like of float, optional

Region to consider for local polynomial fits, given as a factor of the mean FWHM, in the wavelength dimension. If three elements are passed, the third will be used. Default is 0.5.

error_weightingbool, optional

If True (default), weight polynomial fitting by the error values of each sample.

smoothingfloat or array_like of float, optional

Radius over which to smooth the input data, given as a factor of the mean FWHM, in the wavelength dimension. If three elements are passed, the third will be used. Default is 0.25.

orderint or array_like of int, optional

Maximum order of local polynomial fits.

robustfloat, optional

Rejection threshold for input data to local fits, given as a factor of the standard deviation.

neg_thresholdfloat, optional

First-pass rejection threshold for negative input data, given as a factor of the standard deviation; if None or <= 0, first-pass rejection will not be performed.

fit_thresholdfloat, optional

Rejection threshold for output fit values, given as a factor of the standard deviation in the input data. If exceeded, weighted mean value is used in place of fit.

edge_thresholdfloat or array_like or float

If set to a value > 0 and < 1, edges of the fit will be masked out according to edge_algorithm. Values close to zero will result in a high degree of edge clipping, while values close to 1 ckip edges to a lesser extent. The clipping threshold is a fraction of window. An array may be used to specify values for each dimension.

skip_uncorrected: bool, optional

If set, the uncorrected flux cube will not be computed, even if present in the input data. This option is primarily intended for testing or quicklook, when the full data product is not needed.

kwargsdict, optional

Optional keyword arguments to pass into scipy.interpolate.Rbf. Please see the options here. By default, the weighting function is a multi-quadratic sqrt(r/epsilon)**2 + 1) rather than the previous version inverse distance weighting scheme.