Calculate weights for each value based on deviation from best fit model
x: numpy.ndarray
Arrray of x-values
y: numpy.ndarray
Arrray of y-values
model: ~astropy.modeling.model
A model to be fit
yerr: numpy.ndarray
[Optional] Array of uncertainties for the y-value
weights: numpy.ndarray
Weights for each parameter