Skip to content

Commit

Permalink
Merge pull request #44 from NordicMRspine/smallfixes
Browse files Browse the repository at this point in the history
Smallfixes
  • Loading branch information
Laura2305 authored Jan 26, 2024
2 parents d03fd1f + babbbee commit 34801ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/Navigator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ function NavCorr!(nav::Array{Complex{T}, 4}, acqData::AcquisitionData, params::D

correlation = nothing
wrapped_points = nothing
trace_data = nothing
trace_time = nothing
trace_data_int = nothing

corr_type = split(params[:corr_type], "_")
if size(corr_type, 1) == 2
Expand Down
7 changes: 1 addition & 6 deletions src/Unwrap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ function find_wrapped(nav::Array{Float64, 4}, nav_time::Array{Float64, 2}, trace
trace_data_int_lim = deepcopy(trace_data_int)
trace_data_int_lim[:, nowrap_slices] .= 1

# renormalize nav data
for ii = 1:slices
nav_norm[:,ii] = nav_norm[:,ii] ./ findmax(nav_norm[:,ii], dims =1)[1]
end

# compute navigator baseline
nav_baseline = find_baseline(nav_norm, trace_data_int_lim, slices)

Expand Down Expand Up @@ -448,7 +443,7 @@ function find_wrapped_points(nav_norm::Array{Float64, 2}, trace_data_int::Array{
remove_extreme = findall(x -> meanval - deviation < x < meanval + deviation, trace_data_int[:,ii])
wrap_min = findmax(trace_data_int[remove_extreme,ii])[1] - ((findmax(trace_data_int[remove_extreme,ii])[1] - findmin(trace_data_int[remove_extreme,ii])[1]) .*0.28)
idx_pos = findall(x -> x >= wrap_min, trace_data_int[:,ii])
nav_add2pi = findall(x->x< -0.22, nav_norm[idx_pos,ii])
nav_add2pi = findall(x->x< -0.6, nav_norm[idx_pos,ii])
wrapped_points[idx_pos[nav_add2pi],ii] .= 1

end
Expand Down

0 comments on commit 34801ec

Please sign in to comment.