pyhrs:docs

calc_weights

pyhrs.calc_weights(x, y, m, yerr=None)[source] [edit on github]

Calculate weights for each value based on deviation from best fit model

Parameters:

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

Returns:

weights: numpy.ndarray

Weights for each parameter

Page Contents