Skip to content

Commit

Permalink
Prevent errors with optional gradient definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschumacher committed Jun 19, 2024
1 parent a5d1138 commit f168899
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ end
generateHeaderDict(bSF::MPIFile, b::Vector) = generateHeaderDict(bSF,b[1])

function consistenceCheck(bSF::MPIFile, bMeas::MPIFile)
gSF = acqGradient(bSF)[:,:,1,1]
gMeas = acqGradient(bMeas)[:,:,1,1]
if gSF != gMeas
@warn("The gradient strength of the system matrix ($gSF T/m) does not fit to the measurements ($gMeas T/m)!")
if !(isnothing(acqGradient(bSF)) || isnothing(acqGradient(bMeas))) # /acquisition/gradient is optional
gSF = acqGradient(bSF)[:,:,1,1]
gMeas = acqGradient(bMeas)[:,:,1,1]
if gSF != gMeas
@warn("The gradient strength of the system matrix ($gSF T/m) does not fit to the measurements ($gMeas T/m)!")
end
end

dfSF = dfStrength(bSF)
Expand Down

0 comments on commit f168899

Please sign in to comment.