stoner_measurement.instruments.xray_diffractometer.XrayDiffractometer

class stoner_measurement.instruments.xray_diffractometer.XrayDiffractometer(transport, protocol, *, mechanics: DiffractometerMechanics)[source]

Bases: BaseInstrument, ABC

Contract implemented by physical and simulated X-ray controllers.

abstractmethod count(duration_s: float, *, cancel: Event | Callable[[], bool] | None = None) → CountResult[source]

Acquire detector counts for a host-timed interval.

abstractmethod disable_theta() → None[source]

Send the controller’s theta motor-disable operation.

abstractmethod disable_two_theta() → None[source]

Send the controller’s 2-theta motor-disable operation.

abstractmethod move_coupled(theta_deg: float, speed_deg_per_min: float, *, two_theta_offset_deg: float = 0.0, cancel: Event | Callable[[], bool] | None = None) → XraySnapshot[source]

Move both axes while enforcing 2theta = 2 * theta + offset.

abstractmethod move_theta(angle_deg: float, speed_deg_per_min: float, *, cancel: Event | Callable[[], bool] | None = None, backlash: bool = True) → XraySnapshot[source]

Move theta to an absolute angular coordinate.

abstractmethod move_two_theta(angle_deg: float, speed_deg_per_min: float, *, cancel: Event | Callable[[], bool] | None = None, backlash: bool = True) → XraySnapshot[source]

Move 2-theta to an absolute angular coordinate.

abstractmethod read_snapshot() → XraySnapshot[source]

Return one atomic theta, 2-theta and detector snapshot.

abstractmethod reset_limit_latch() → None[source]

Reset the controller’s hardware limit latch.

set_progress_callback(callback: Callable[[XraySnapshot], None] | None) → None[source]

Set an optional callback for intermediate motion snapshots.

abstractmethod start_count() → None[source]

Start the scalar detector counter.

abstractmethod step_theta(direction: AxisDirection, steps: int = 1, *, interval_s: float = 0.01, cancel: Event | Callable[[], bool] | None = None) → XraySnapshot[source]

Step the theta axis by an integer number of hardware steps.

abstractmethod step_two_theta(direction: AxisDirection, steps: int = 1, *, interval_s: float = 0.01, cancel: Event | Callable[[], bool] | None = None) → XraySnapshot[source]

Step the 2-theta axis by an integer number of hardware steps.

abstractmethod stop_count() → None[source]

Stop the scalar detector counter.

abstractmethod zero_theta() → None[source]

Change the hardware theta datum to zero.

abstractmethod zero_two_theta() → None[source]

Change the hardware 2-theta datum to zero.