DAQ: Fix resolution to dtz routines
This commit is contained in:
@@ -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)
|
||||
return self.detector_radius_mm / math.tan(theta)
|
||||
Reference in New Issue
Block a user