diff --git a/common/src/aaredaqlib/diffraction_geometry.py b/common/src/aaredaqlib/diffraction_geometry.py index 3c541306..d91e9846 100644 --- a/common/src/aaredaqlib/diffraction_geometry.py +++ b/common/src/aaredaqlib/diffraction_geometry.py @@ -38,7 +38,7 @@ class DiffractionGeometry(BaseModel): if exp_dtz_mm <= 0: raise ValueError("Detector distance must be positive") - theta = math.atan(self.detector_radius_mm / exp_dtz_mm) + theta = math.atan(self.detector_radius_mm / exp_dtz_mm)*0.5 return self.wavelength_angstrom / (2 * math.sin(theta)) def calc_dtz_mm(self, exp_resolution_angstrom: float) -> float: @@ -48,4 +48,4 @@ class DiffractionGeometry(BaseModel): if x >= 1.0 or x <= -1.0: return 0.0 theta = math.asin(x) - return self.detector_radius_mm / math.tan(theta) \ No newline at end of file + return self.detector_radius_mm / math.tan(2*theta) \ No newline at end of file