Calculation of Sample Detector distance