diff --git a/common/src/aaredaqlib/diffraction_geometry.py b/common/src/aaredaqlib/diffraction_geometry.py index ffbcead3..3a1f1219 100644 --- a/common/src/aaredaqlib/diffraction_geometry.py +++ b/common/src/aaredaqlib/diffraction_geometry.py @@ -36,7 +36,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) / 2.0 + theta = math.atan(self.detector_radius_mm / exp_dtz_mm) return self.wavelength_angstrom / (2 * math.sin(theta)) def calc_dtz_mm(self, exp_resolution_angstrom: float) -> float: @@ -44,4 +44,4 @@ class DiffractionGeometry(BaseModel): raise ValueError("Resolution must be positive") theta = math.asin(self.wavelength_angstrom / (2 * exp_resolution_angstrom)) - return self.detector_radius_mm / math.tan(2 * theta) \ No newline at end of file + return self.detector_radius_mm / math.tan(theta) \ No newline at end of file