Skip to content

Conventions

hr2d reads and writes RELION's STAR files, so its angles, origins and CTF follow RELION's conventions. These were read from RELION 5's source code.

In-plane angle and origin

Inside hr2d, image \(i\) is modelled as the class mean rotated by \(\psi_i\) (counter-clockwise, with x along columns and y along rows) and then translated so that the particle centre is at \(s_i\) pixels from the box centre. In the STAR files:

RELION column value
rlnAnglePsi \(-\psi_i\) (degrees)
rlnOriginXAngst, rlnOriginYAngst \(-s_i \times\) pixel size (Å)
rlnClassNumber class, from 1
rlnAngleRot, rlnAngleTilt 0

RELION rotates its reference by rlnAnglePsi in the opposite sense, and moves the particle centre by the origin, hence the two minus signs.

CTF

The CTF is RELION's (CTF::getCTF in src/ctf.h):

\[ \mathrm{CTF}(\mathbf{k}) = -\sin\gamma(\mathbf{k}), \qquad \gamma = K_1\,\Delta f(\varphi)\,u^2 + K_2\,u^4 - \phi_{\text{shift}} - \arcsin Q_0, \]

with \(u = \lvert\mathbf{k}\rvert\) the spatial frequency, \(\varphi\) its angle, \(\Delta f(\varphi) = -\tfrac{1}{2}(\Delta f_U + \Delta f_V) - \tfrac{1}{2}(\Delta f_U - \Delta f_V) \cos 2(\varphi - \varphi_{\text{ast}})\), \(K_1 = \pi\lambda\), \(K_2 = \tfrac{\pi}{2} C_s \lambda^3\), and \(Q_0\) the amplitude contrast. The CTF is positive at zero frequency. It is read from rlnDefocusU, rlnDefocusV, rlnDefocusAngle, rlnPhaseShift and the optics table (voltage, spherical aberration, amplitude contrast, pixel size). When the STAR file has rlnCtfBfactor or rlnCtfScalefactor, the CTF is also multiplied by rlnCtfScalefactor × exp(−B u²/4), as in RELION.

Search grid

  • In-plane angles: round(360 / psi_step) angles, equally spaced from 0°.
  • Translations: the points of a square grid with spacing offset_step inside a disk of radius offset_range, centred on the particle's previous offset. (RELION rounds the previous offset first; hr2d does not.)
  • Fine pass (oversampling: 1): for each kept coarse pose, the angles ψ ± psi_step/4 and the four shifts (± offset_step/4, ± offset_step/4). The coarse point itself is not included.
  • Resolution: the first Fourier radius is box × pixel size / ini_high. After each iteration it is the last shell where the class SSNR (scaled by tau2_fudge) is at least 1, plus incr_size shells, and it never decreases. As in RELION, the coarse pass stops at the resolution (π × particle_diameter × psi_step / 360) / 1.5 Å: an in-plane step moves the particle's edge by 1.5 times this resolution.