scaled_adaptive_weight_matrices

sofia_redux.toolkit.resampling.scaled_adaptive_weight_matrices(sigma, rchi2_values, fixed=None)[source]

Wrapper for scaled_adaptive_weight_matrix over multiple values.

Please see scaled_adaptive_weight_matrix() for details on how the weighting kernel is modified using a single scaling factor. This function performs the calculation for multiple scaling factors (\(\chi_r^2\)).

Parameters:
sigmanumpy.ndarray (n_dimensions,)

The standard deviations of the Gaussian for each dimensional component used for the distance weighting of each sample in the initial fit.

rchi2_valuesnumpy.ndarray (n_data_sets, fit_shape)

The reduced chi-squared statistics of the fit for each data set. Here, fit_shape is an arbitrary array shape which depends upon the shape of the output fit coordinates defined by the user.

fixednumpy.ndarray of bool (n_dimensions,), optional

If supplied, True values indicate that the width of the Gaussian along the corresponding axis should not be altered in the output result.

Returns:
scaled_matricesnumpy.ndarray

The scaled weighting kernel with shape (n_data_sets, fit_shape, 1, n_dimensions) where fit_shape is determined by the shape of the output fit coordinates supplied by the user, and n_data_sets is the number of data sets to be fit. The third axis (of size 1), is a dummy dimension required for Numba to compile successfully. The last dimension contains the new scaled inverse \(\alpha_{scaled,k}^{-1}\) values as described in scaled_adaptive_weight_matrix().