linop.wave_calibrate#
- bartorch.linop.wave_calibrate()#
Fit the wave’s gradient amplitude and delay to a wave-free calibration region.
The model predicts the wave-encoded samples from the reference: inverse FFT along the phase encodes, multiplication by
wave_psf(), and FFT back. Per phase-encode axis, scale and delay are fitted by nonlinear least squares (scipy.optimize.least_squares) starting from 1 and 0. The residual is taken on the acquired wave lines whose neighbourhood, within the wave’s largest excursion in lines, lies inside the calibration region; k-space outside the region is neglected.- Parameters:
reference (array_like) – Wave-free k-space
(coils, [kz,] ky, readout), zero outside the calibration region, with the readout in acquisition order.wave (array_like) – Wave-encoded k-space on the same grid, zero where not acquired.
trajectory (array_like) – Nominal wave trajectory, as for
wave_psf().fov (float or tuple of float) – Field of view along the phase encodes in m, one value or
(z, y).
- Returns:
scale, delay – One per phase encode,
(z, y)in 3D: the gradient amplitude relative to nominal and the delay in readout samples, aswave_psf()takes them.- Return type:
tuple of float
- Raises:
ValueError – When the shapes disagree, or no acquired line has its neighbourhood inside the calibration region.