TraTT
TraTT is a time-dependent Takagi–Taupin solver. It computes what an X-ray rocking curve of a perfect crystal looks like while a GHz sound wave is still entering the crystal, before the wave has filled it: how the acoustic satellites of the Bragg peak build up between the moment the wave is launched and its transit time
The results so far are calculations only; no experiment has been compared yet. They were presented as poster P2.17 at the KPS 2026 Fall Meeting. The README's Results section lists them with the notebook entries that hold the numbers: the formation time of each satellite, the overshoot under a gradual turn-on, where the independent-satellite approximation holds, and a first-order transfer function between the strain spectrum and the reflectivity.
Work toward a paper (the transfer function in more detail, its dependence on the measurement window, and the conditions a real beam's divergence and bandwidth put on it) is on the branch research/paper-viability, TraTT#16. It is a draft and its conclusions are being verified; they are not summarized on this site.
Install
Python 3.12 or later.
uv venv
uv pip install trattpip install tratt works as well. The README's Setup section covers a clone with the analysis scripts and tests.
First run
Satellite
import numpy as np
from scipy.special import jv
from tratt import Drive, rocking
alpha = 0.5 # crystal thickness L in Pendelloesung lengths
drive = Drive(S=1.5, alpha_ac=10.0) # modulation strength, L in acoustic wavelengths
eta1 = drive.eta_channel(1) # centre of the first satellite on the eta axis
print(" t/t_tr satellite 1 sin^2(pi alpha |J1(S)| t)")
for t in (0.25, 0.5, 0.75, 1.0):
intensity = rocking(alpha, eta1, phi=drive.phi(t), geometry="laue", n_z=2048)
predicted = np.sin(np.pi * alpha * abs(jv(1, drive.S)) * t) ** 2
print(f" {t:6.2f} {float(intensity):11.4f} {predicted:11.4f}")Output with tratt 0.1.0 from PyPI (Python 3.13):
t/t_tr satellite 1 sin^2(pi alpha |J1(S)| t)
0.25 0.0489 0.0472
0.50 0.1789 0.1800
0.75 0.3744 0.3733
1.00 0.5891 0.5905drive.phi(t) is the frozen phase profile at time
Where to go next
- Equations, on this site: the Laue and Bragg equations, the drive and the satellite channels as the solver implements them.
- DESIGN.md: the physics conventions, every assumption and what it discards, and the analytic limits used as tests.
- Lineage, on this site: where TraTT came from, which script produced which notebook entry, and which claims stand or were withdrawn.
- The lab notebook,
notes/lab_notebook.md, holds every entry the results cite. - The Python API page lists the public functions and classes of the
trattpackage with their docstrings.