39 lines
763 B
Julia
39 lines
763 B
Julia
using DelimitedFiles, Plots
|
|
include("../nucleons.jl")
|
|
|
|
# test data generated from Hartree.f
|
|
# format: x S(x) V(x) R(x) A(x)
|
|
test_data = readdlm("test/Pb208FldsFSUGarnet.csv")
|
|
xs = test_data[:, 1]
|
|
Ss = test_data[:, 2]
|
|
Vs = test_data[:, 3]
|
|
Rs = test_data[:, 4]
|
|
As = test_data[:, 5]
|
|
|
|
κ = -1
|
|
p = false
|
|
r_max = maximum(xs)
|
|
divs = length(xs) - 1
|
|
s = system(r_max, divs)
|
|
|
|
s.Φ0 = Ss
|
|
s.W0 = Vs
|
|
s.B0 = Rs
|
|
s.A0 = As
|
|
|
|
E_min = 850.0
|
|
E_max = 938.0
|
|
|
|
boundEs = findEs(κ, p, s, E_min, E_max)
|
|
|
|
binding_Es = (p ? M_p : M_n) .- boundEs
|
|
println("binding energies = $binding_Es")
|
|
|
|
func = determinantFunc(κ, p, s)
|
|
Es = collect(E_min:0.1:E_max)
|
|
dets = [func(E)^2 for E in Es]
|
|
|
|
plot(Es, dets, yscale=:log10, label="determinant^2")
|
|
vline!(boundEs, label="bound E")
|
|
xlabel!("E (MeV)")
|