Skip to content

FindDelay_multishot ​

Estimate one delay shared by all shots of a two-dimensional image. The image update combines the observations, then shotwise residual and derivative-forward products supply a single scalar delay update. It does not estimate independent per-shot delays. The method background and package-specific update choices are described in field preprocessing.

Prepare an explicit-time CPU call ​

The following block only prepares options; it does not start the unbounded outer estimator loop. Use Float64 inputs for this current multishot interface, and state the tolerance in the same time unit as the data. With a field map in Hz, use seconds.

julia
using HighOrderMRI
using RegularizedLeastSquares: CGNR, L2Regularization

T = Float64
delay_options = (
    arrayType=Array,
    solver=CGNR,
    reg=L2Regularization(zero(T)),
    Δτ_min=T(5e-9), # example only: 0.005 microseconds in seconds
    iter_max=10,
)

After supplying acquisition arrays, the intended call is:

julia
τ = FindDelay_multishot(grid, data, coefficients_by_shot,
    adc_times_by_shot, start_times, field_dt;
    csm, fieldmap, recon_terms="111", delay_options...)

Use explicit ADC times and preserve sample-within-shot ordering in data. The generated API below specifies all shapes, types and the actual defaults.

Current estimator restrictions

The overload that omits datatime builds an incorrect time-array shape. The explicit-time overload also reuses the first shot's times inside its per-shot residual operators. Different per-shot ADC-time vectors combined with a nonzero field map can therefore give incorrect delay updates. Do not apply this estimator to that case. Identical shot time vectors or a zero field map avoid that specific phase error, without establishing convergence.

iter_max bounds only each inner reconstruction. The outer estimator has no iteration cap or reliable convergence-status return. Its actual threshold default is the Float64 literal 0.005; Float32 callers must supply a same-type threshold, and later JumpFact reductions introduce a further Float32 state-type limitation. The iteration log labels sample offsets as microseconds. These limitations are documented here and remain unchanged in code.

API ​

julia
FindDelay_multishot(gridding::Grid{T}, data::AbstractArray{Complex{T}, 2}, kspha::AbstractArray{T, 3}, datatime::AbstractArray{T, 2}, StartTime::AbstractVector{T}, dt::T; JumpFact::Int64 = 3, Δτ_min::T = 0.005, intermode::Interpolations.InterpolationType = AkimaMonotonicInterpolation(), fieldmap::AbstractArray{T, 2} = zeros(T, (gridding.nX, gridding.nY)), csm::Array{Complex{T}, 3} = ones(Complex{T}, (gridding.nX, gridding.nY)..., 1), recon_terms::String = "111", nBlock::Int64 = 50, arrayType::Type{<:AbstractArray} = Array, solver::Type{<:AbstractLinearSolver} = CGNR, reg::AbstractParameterizedRegularization = L2Regularization(zero(T)), iter_max::Int64 = 10, verbose::Bool = false)::T where T <: AbstractFloat

FindDelay_multishot(gridding::Grid{T}, data::AbstractArray{Complex{T}, 2}, kspha::AbstractArray{T, 3}, StartTime::AbstractVector{T}, dt::T; JumpFact::Int64 = 3, Δτ_min::T = 0.005, intermode::Interpolations.InterpolationType = AkimaMonotonicInterpolation(), fieldmap::AbstractArray{T, 2} = zeros(T, (gridding.nX, gridding.nY)), csm::Array{Complex{T}, 3} = ones(Complex{T}, (gridding.nX, gridding.nY)..., 1), recon_terms::String = "111", nBlock::Int64 = 50, arrayType::Type{<:AbstractArray} = Array, solver::Type{<:AbstractLinearSolver} = CGNR, reg::AbstractParameterizedRegularization = L2Regularization(zero(T)), iter_max::Int64 = 10, verbose::Bool = false)::T where T <: AbstractFloat

Estimate one scalar synchronization delay shared by all shots of a 2D image. The image update uses all shots; per-shot residual and derivative-forward products are stacked into one real scalar least-squares update. This is not an estimator of independent shot delays. The method follows the model-based synchronization framework of Dubovan and Baron (doi:10.1002/mrm.29460), with this package's density-weighted image update and JumpFact acceleration.

Inputs and units ​

Use a Grid{T} with one z plane, complex data (nShot*nADCSample,nCha), coefficients (nShot,nFieldSample,nTerm), ADC times (nShot,nADCSample), and StartTime::AbstractVector{T} of length nShot. Samples within each shot vary fastest in data. fieldmap is (nX,nY) and csm is (nX,nY,nCha). Match the coefficient order and spatial units to the encoding basis. Nine terms with recon_terms="111" are the ordinary second-order configuration.

Use seconds for dt, datatime, StartTime, Δτ_min and the returned delay when fieldmap is in Hz. Shot i is sampled as k_i(t_ADC+StartTime[i]+τ) under the interpolation convention. No integration or gyromagnetic-ratio conversion is performed by this estimator.

Options and iteration ​

arrayType=Array selects CPU execution; CuArray selects the GPU path of the legacy explicit operator. solver is a solver type such as CGNR, and reg is a regularization object such as L2Regularization(zero(T)). There are no use_gpu or λ keywords. iter_max limits each inner image reconstruction, not the outer delay loop. nBlock is passed to HighOrderOp.

At each step, Δτ = J*real(b\r), with residual r and derivative product b. The update is unweighted although image reconstruction uses density weights. J starts at JumpFact, is reduced after an update-sign change, and the loop tests abs(Δτ)>Δτ_min. The result is converted to T from τ-Δτ/J*(J-1) using the final J. It is a scalar without convergence status. The current log prints Δτ/dt and τ/dt labelled as microseconds; those ratios are sample offsets, not microseconds.

Current restrictions ​

  • The convenience overload without datatime constructs the wrong time-array shape. Use the explicit-time overload; this documentation does not repair it.
  • The per-shot residual operators currently receive the complete concatenated time vector and therefore reuse the first shot's times. Different shot ADC time vectors with a nonzero field map can produce incorrect residuals. Do not use this estimator for that case; identical per-shot times or a zero field map avoid this specific defect, without guaranteeing convergence.
  • Δτ_min::T=0.005 is the actual Float64 default literal and fails for Float32 inputs when omitted. Supply a same-type threshold explicitly. In seconds, 0.005 means 5 ms; Float32(5e-9) represents 0.005 microseconds. A later JumpFact reduction can also promote Float32 delay state; Float64 is the conservative current choice for multishot estimator calls.
  • The outer loop has no iteration cap or reliable breakdown-status return. Zero/poorly identifiable derivative information, extrapolated zeros and noisy data require independent assessment. Initial τ is fixed at zero; no caller-provided initial-delay keyword is available.

See Field preprocessing for the update equations and FindDelay for single-shot configuration.

Source: src/Synchronization/FindDelay_multishot.jl

HighOrderMRI.jl documentation · v0.1.1 · code 5d6ac72 · docs 5d6ac72