Skip to content

Commit

Permalink
fix for noise matrix absence in Navigator.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura Beghini committed Jun 21, 2024
1 parent f18d5e7 commit 2bdaae1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/Navigator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,16 @@ function NavCorr!(nav::Array{Complex{T}, 4}, acqData::AcquisitionData, params::D
end

remove_ref_ph!(nav, addData.numlines, 1) # remove the reference phase
noisestd = std(addData.noisemat, dims=[1]).^2
if addData.noisemat != nothing
noisestd = std(addData.noisemat, dims=[1]).^2

# Compute weights for the coils average
weights = comp_weights(abs.(nav), noisestd, addData.numlines, addData.numslices)
nav = sum(weights .* nav, dims=(1,2,)) # coils and samples average for each line
# Compute weights for the coils average
weights = comp_weights(abs.(nav), noisestd, addData.numlines, addData.numslices)
nav = sum(weights .* nav, dims=(1,2,)) # coils and samples average for each line

else
nav = sum(nav, dims=(1,2,))
end

# Compute navigator phase
cartes_index = findall(x -> isnan(x), nav)
Expand Down

0 comments on commit 2bdaae1

Please sign in to comment.