SiLab-Bonn / testbeam_analysis

A powerful and adaptable analysis software in Python for beam test data
MIT License
0 stars 6 forks source link

[dut_alignment] Binning in residuals vs. position hists #60

Open DavidLP opened 7 years ago

DavidLP commented 7 years ago

The binning shows very strong ´Moiré effects and should be optimized: grafik

laborleben commented 7 years ago

There is the possibility to adjust the binning: https://github.com/SiLab-Bonn/testbeam_analysis/blob/af3bb1bb7b70e5bd8b097baf8d341c1d3a843030/testbeam_analysis/dut_alignment.py#L1080. The coarse binning helps to improve the fit. The effect the plot is showing is by far not the worst.

The effect is probably both, a cobination of a binning effect (plotting) and a pixelized telescope and DUT.

DavidLP commented 7 years ago

If the fit result depends on the binnig then this is not correct and missuses the bin width as a frequency filter. Also I do not want to optimize bin width by hand for each device. Choosing the "best" bin size is a science itself (paper) and I was hoping scipy.binned_stat does that, but apparently only np.histogram has fancy algos for autobinning,

laborleben commented 7 years ago

We use "auto" binning if no binning value is given. The "auto" binning is part of numpy 1.11.

DavidLP commented 7 years ago

And auto uses Freedman Diaconis Estimator and sturges auto bin method , where I guess somebody thought about that.

DavidLP commented 7 years ago

Sorry Firefox missclicked