weighted binning of the data with uncertainties

33 Views Asked by At

I need help with binning observational data that have uncertainties. I have an .csv file of data (X,Y) with the errors delta_Y. I need to bin the data as a weighted average of two adjacent values of the data column Y (i.e., by pairs - the first and second value, the third and fourth, etc.), where the "weight" will calculated from the measurement errors (sigma - delta_Y) of corresponding values.

Anyone knows how to do this? Is there a Python function available that could do this?

All help would be highly appreciated:) Many thanks!

I'm a beginner in python, but I understand the basic syntax. I understand how I could calculate it manually, but a large amount of data (several hundred rows) requires automated processing.

0

There are 0 best solutions below