SiLab-Bonn / testbeam_analysis

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

Alpha, beta correction for alignment rorations is alway positive number #32

Open laborleben opened 8 years ago

laborleben commented 8 years ago

I never observed a negative number for alpha and beta correction. Thus the angle is increased every iteration and makes the residuals worse.

DavidLP commented 8 years ago

It is mathematically only possible to determine the sign of alpha * beta. Practically maybe not even that due to finite resolution in the slope fit. Thats why I recommended to optimize the slopes to 0 with a generic minimizer.

DavidLP commented 8 years ago

The fourth formular can be used to determine the sign, as it is also implemented here.

capture

DavidLP commented 8 years ago

BTW: if only one angle is rotated the result is the same independent of the alpha, beta sign. It is not the goal to reconstruct correct angles, but to get angles that minimize the residuals.

laborleben commented 8 years ago

so the minimizer should not get a alpha and beta prediction as a start value since this would bias the result. It should just guess which is the minimum residual for alpha and beta (and z) for each iteration and return the result whether it is positive or negative.

In my opinion the angles are very much under control since I fixed the binning to give good fit results. But still then, alpha and beta are always positive which gives me some worries.

DavidLP commented 8 years ago

Sure, 0s as start values are better than wrong start values. To write this minimizer is very straight forward but I have to measure right now.