no_fit_solution¶
- sofia_redux.toolkit.resampling.no_fit_solution(set_index, point_index, fit_out, error_out, counts_out, weights_out, distance_weights_out, rchi2_out, offset_variance_out, get_error=True, get_counts=True, get_weights=True, get_distance_weights=True, get_rchi2=True, get_offset_variance=True, cval=nan)[source]¶
Fill output arrays with set values on fit failure.
On fit failure, the output arrays are filled with certain values indicating that a fit is not possible. Count, and weight arrays contain zeros; the error, reduced chi-squared and offset variance are set to NaN; finally, the data array is set to
cval
, a user set float value.- Parameters:
- set_indexint
An integer representing the data set for which a fit cannot be performed.
- point_indexint
An integer representing the index of the fit coordinate at which the fit cannot be performed.
- fit_outnumpy.ndarray (n_sets, n_coordinates)
The output fit values.
- error_outnumpy.ndarray (n_sets, n_coordinates)
The output error values on the fit.
- counts_outnumpy.ndarray (n_sets, n_coordinates)
The number of samples used to create the fit.
- weights_outnumpy.ndarray (n_sets, n_coordinates)
The sum of full weights applied to samples in the fit.
- distance_weights_outnumpy.ndarray (n_sets, n_coordinates)
The sum of only the distance weights applied to samples in the fit.
- rchi2_outnumpy.ndarray (n_sets, n_coordinates)
The reduced chi-squared statistic of the fit.
- offset_variance_outnumpy.ndarray (n_sets, n_coordinates)
The variance as derived from the offset of the fit coordinate from the sample distribution.
- get_errorbool, optional
If
False
do not updateerror_out
.- get_countsbool, optional
If ‘False’ do not update
counts_out
.- get_weightsbool, optional
If
False
do not updateweights_out
.- get_distance_weightsbool, optional
If
False
do not updatedistance_weights_out
.- get_rchi2bool, optional
If
False
do not updaterchi2_out
.- get_offset_variancebool, optional
If
False
do not updateoffset_variance_out
.- cvalfloat, optional
The fill value for
data_out
on fit failure.
- Returns:
- None
All arrays are updated in-place.