Print status

This commit is contained in:
Nuwan Yapa 2024-09-23 11:18:45 -04:00
parent 45b110a41d
commit cc774b05da
1 changed files with 6 additions and 2 deletions

View File

@ -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