How to use
A guide to both machines of The Game of Diffraction and their panels and controls.
The workspace
- Control panel (left). Beamline parameters, sample structure and orientation, and the motor positions. Click a section’s heading to fold or open it; the less-used sections start folded.
- Instrument view (centre). The diffractometer in three dimensions, seen from upstream looking downstream along the beam. The cyan rays are the diffracted beams that reach the panel, so each one ends on its own Bragg spot.
- Detector view (right). The same detector face, seen from the sample position. The hkl table button above it lists the reflections on the detector, strongest first; point at a row to ring its spot.
Seeing a reflection
- Rock the crystal. Drag omega. Reflections light up and fade as lattice planes pass through the Bragg condition.
- Drive to a named reflection. Enter Miller indices, say
2 1 1, under Drive to a reflection and press Find omega. You get every omega that satisfies the Bragg condition with the other three circles held, which is what rocking one motor does at a beamline. Choose a solution, press Drive there, then Aim detector to swing the arm onto the diffracted beam. - Blind cones. If no omega reaches a reflection, a limitation of rotating about a single axis rather than a bug, the page says so and offers a chi that brings it within range.
- Why there is a pattern at the start. The crystal opens axis-aligned, which is a zone axis, and the beam opens at 19.010 keV, where the wavelength is exactly a/9 for the CsPbBr3 cell it starts on. Twelve reflections then sit exactly on the Ewald sphere. Detune the energy and they go out.
Goniometer and detector circles
The simulator follows the six-circle convention of H. You (1999).
| Circle | Moves | Rotation |
|---|---|---|
| mu, omega, chi, phi | Sample | Nested goniometer rotations that orient the lattice in space |
| delta | Detector | Swings the arm through the vertical arc |
| gamma | Detector | Swings the arm through the horizontal arc |
The second machine: pitch–phi
The Diffractometer selector at the top of the control panel switches the floor to a surface machine: a pitch cradle carrying a φ spindle for the sample, and a detector placed by a scattering angle 2θ and an azimuth about the beam. Structure, energy, detector model and the panel are shared; only the angle set changes.
| Angle | Moves | Meaning |
|---|---|---|
| pitch | Sample | Incidence angle from the surface: 0° grazing, 90° normal |
| φ | Sample | Right-handed about the sample normal at pitch 0 |
| roll | Sample | About the beam; shifts the azimuth only, never the Bragg condition |
| 2θ | Detector | Scattering angle from the beam |
| az | Detector | Position around the beam: 0 is up, positive to the right looking downstream |
- Find pitch & φ. Three modes: fix the pitch and solve φ, fix φ and solve pitch, or explore freely with the excitation error shown. Solutions list the dial read-outs, 2θ and azimuth; Drive there applies the exact angles and Point detector there swings the panel onto wherever the reflection scatters.
- What shows. The machine works on a surface: a reflection appears only when the incident and diffracted beams both stay above it, and the cards say when one would not.
- Dials. The read-outs section maps geometry angles onto your instrument’s dials (sign and offset): readout = s·angle + offset.
- Mounting. The mounting block sends a chosen surface normal to the vertical at pitch = φ = 0 and prints the UB matrix in this machine’s native frame — different from the six-circle panel’s frame, which stays its own.
Each machine keeps its own mount, angles and detector position; switching back and forth does not reinterpret either.
Beam and detector
- Set the energy or wavelength.
- Distance and detector model set how much of reciprocal space you collect. A shorter distance or a larger panel buys angular range at the cost of spatial resolution.
- Preview bin trades detector pixels for frame rate. Raise it while dragging a motor; set it to 1 for a full-resolution frame once the setting is worth keeping.
Sample and mosaicity
- Structure. Here you can select a crystallographic structure. Structure factors are available for the crystal lattices offered.
- Load CIF. You can also read your own CIF straight in the browser: the file never leaves your machine. The reader applies the symmetry operators the file lists, so a normal database CIF giving only the asymmetric unit is expanded to the full cell before any intensity is computed. A file it cannot use safely is refused with the reason, rather than quietly giving you the wrong intensities.
- Peak width is the size of a Bragg peak in reciprocal space. Widening it keeps reflections lit further from the exact condition, which is what mosaic spread does to a real crystal.
Orientation and geometry of the crystal
- Manual alignment. The rx, ry and rz sliders tilt the crystal on its mount.
- Automated alignment. Point a crystal direction puts a chosen direction along a laboratory axis: send (1 1 1) along the beam, then bring a second direction toward the vertical to remove the rotation that is still free about the first.
- Transmission and reflection. In reflection geometry the sample carries a surface normal: reflections pointing into the bulk are blocked and the angle of incidence is reported. Tick Rays that miss to see which reflections never reach the panel, and why.