From 3195658975f91f73958b2d14791d995caa4b7eff Mon Sep 17 00:00:00 2001 From: Korbinian Eckstein Date: Fri, 29 Sep 2023 09:45:25 +1000 Subject: [PATCH] allow -1 in B0_dir --- src/tgv.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tgv.jl b/src/tgv.jl index f1c4dd9..082289d 100644 --- a/src/tgv.jl +++ b/src/tgv.jl @@ -123,7 +123,7 @@ end function set_parameters(alpha, res, B0_dir, cu) # If there are other values than 0 and 1 in B0 dir then print a warning - if !all(B0_dir[i] in [0, 1] for i in 1:3) + if !all(abs(B0_dir[i]) in [0, 1] for i in 1:3) @warn("Warning: works only for grid-aligned B0 directions at the moment, but it is B0_dir=$B0_dir") end