diff --git a/test/racahs_reduction_formula.jl b/test/racahs_reduction_formula.jl index 344a9ee..3bb87dd 100644 --- a/test/racahs_reduction_formula.jl +++ b/test/racahs_reduction_formula.jl @@ -31,9 +31,13 @@ end # Testing the full Racah's reduction formula test_data = DelimitedFiles.readdlm("test/racah_test_data.csv", ',') # format = n1p, l1p, n2p, l2p, n1, l1, n2, l2, Λ, μ1ω1, μ2ω2, racah_matrix_element +test_data_ints = Int.(test_data[:, 1:(end - 3)]) +test_data_floats = test_data[:, (end - 2):end] for i in 1 : size(test_data)[1] - n1p, l1p, n2p, l2p, n1, l1, n2, l2, Λ, μ1ω1, μ2ω2, racah_matrix_element = test_data[i, :] - val = racahs_reduction_formula(Int(n1p), Int(l1p), Int(n2p), Int(l2p), Int(n1), Int(l1), Int(n2), Int(l2), Int(Λ), μ1ω1, μ2ω2) + n1p, l1p, n2p, l2p, n1, l1, n2, l2, Λ = test_data_ints[i, :] + μ1ω1, μ2ω2, racah_matrix_element = test_data_floats[i, :] + println("Checking n1'=$n1p, l1'=$l1p, n2'=$n2p, l2'=$l2p, n1=$n1, l1=$l1, n2=$n2, l2=$l2, Λ=$Λ, μ1ω1=$μ1ω1, μ2ω2=$μ2ω2") + val = racahs_reduction_formula(n1p, l1p, n2p, l2p, n1, l1, n2, l2, Λ, μ1ω1, μ2ω2) @assert isapprox(val, racah_matrix_element; atol=1e-8) "Formula=$(val) and test reference=$racah_matrix_element" end \ No newline at end of file