Skip to content

Commit 2931568

Browse files
add FMODEL_MAX_L and fix l_start
1 parent ab6d9a1 commit 2931568

2 files changed

Lines changed: 30 additions & 10 deletions

File tree

generate_database.jl

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ function parse_commandline()
3636
"--overwrite"
3737
help = "Delete the species folder if it exists and create a new one"
3838
action = :store_true
39+
"--skip-high-l"
40+
help = "Include high angular momentum (l) states in the calculation"
41+
action = :store_true
3942
end
4043

4144
return parse_args(s)
@@ -65,19 +68,32 @@ function main()
6568
println("Parameters: n_min=$n_min, n_max=$n_max")
6669
start_time = time()
6770

68-
CGcoefficient.wigner_init_float(n_max, "Jmax", 9) # initialize Wigner symbol calculation
71+
# initialize Wigner symbol calculation
72+
if args["skip-high-l"]
73+
CGcoefficient.wigner_init_float(FMODEL_MAX_L[species], "Jmax", 9)
74+
else
75+
CGcoefficient.wigner_init_float(n_max - 1, "Jmax", 9)
76+
end
6977
parameters = PARA_TABLE[species]
7078

7179
println("Calculating low ℓ MQDT states...")
72-
low_l_models = MODELS_TABLE[species]
73-
@time low_l_states = [eigenstates(n_min, n_max, M, parameters) for M in low_l_models]
74-
75-
println("Calculating high ℓ SQDT states...")
76-
l_max = n_max - 1
77-
high_l_models = single_channel_models(5:l_max, parameters)
78-
@time high_l_states = [eigenstates(n_min, n_max, M, parameters) for M in high_l_models]
80+
models = MODELS_TABLE[species]
81+
@time states = [eigenstates(n_min, n_max, M, parameters) for M in models]
82+
83+
if args["skip-high-l"]
84+
println("Skipping high ℓ states.")
85+
else
86+
println("Calculating high ℓ SQDT states...")
87+
l_max = n_max - 1
88+
l_start = FMODEL_MAX_L[species] + 1
89+
high_l_models = single_channel_models(l_start:l_max, parameters)
90+
@time high_l_states =
91+
[eigenstates(n_min, n_max, M, parameters) for M in high_l_models]
92+
states = vcat(states, high_l_states)
93+
models = vcat(models, high_l_models)
94+
end
7995

80-
basis = basisarray(vcat(low_l_states, high_l_states), vcat(low_l_models, high_l_models))
96+
basis = basisarray(states, models)
8197
state_table = state_data(basis, parameters)
8298
println("Generated state table with $(nrow(state_table)) states")
8399

@@ -94,7 +110,7 @@ function main()
94110
md = matrix_data(dd)
95111

96112
println("Preparing database output...")
97-
db = databasearray(vcat(low_l_states, high_l_states), vcat(low_l_models, high_l_models))
113+
db = databasearray(states, models)
98114
st = state_data(db, parameters)
99115

100116
println("Storing database tables as parquet files...")

tables.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ const MODELS_TABLE = Dict(
7272
MQDT.Yb174.FMODEL_HIGHN_G5,
7373
],
7474
)
75+
76+
const FMODEL_MAX_L = Dict(:Sr87 => 2, :Sr88 => 2, :Yb171 => 4, :Yb173 => 1, :Yb174 => 4)
77+
78+
7579
const PARA_TABLE = Dict(
7680
:Sr87 => MQDT.Sr87.PARA,
7781
:Sr88 => MQDT.Sr88.PARA,

0 commit comments

Comments
 (0)