Maximum likelihood estimator of the mean and intrinsic rms of a time-series dataset (based on Keith Horne's avgrmsx). For a detail description of the method, see Keith Horne's lecture on the subject at http://star-www.st-and.ac.uk/~kdh1/ada/ada12.pdf
You can compile the cython code inside the folder by using the following command:
python setup.py build_ext --inplace
This will make the routine available as a standard python package.
avgrmsx measures the optimally weighted average
where the weights,
where
The routine calculates this optimal average as well as an additional dispersion
where the total variance for the model
import arx
data = [-1,2,1.5]
errors = [0.3,0.5,0.2]
avg,avg_err,rms, rms_err = arx(data,errors)