Commit cfb7558d authored by Jonas Schwab's avatar Jonas Schwab
Browse files

Make selection in directory_name case insensitive.

parent d51e3d8f
......@@ -27,12 +27,14 @@ def default_params(ham_name):
def params_list(ham_name):
"""Return list of parameter names for hamiltonian."""
"""Return list of parameter names for hamiltonian,
transformed in all upper case.
"""
p_list = []
for name in IN_HAM[ham_name]:
p_list += list(PARAMS_MODEL[name])
return p_list
return [i.upper() for i in p_list]
PARAMS_GENERIC = OrderedDict()
......@@ -141,5 +143,5 @@ PARAMS_MODEL["VAR_Hubbard_Plain_Vanilla"] = {
"Beta" : [5.0, ""],
"Projector" : [False, ""],
"Theta" : [10.0, ""],
"Symm" : [True, ""],
"Symm" : [True, ""],
}
......@@ -217,13 +217,17 @@ def directory_name(ham_name, sim_dict):
else:
dirname = '{}_'.format(ham_name)
for name, value in sim_dict.items():
if name in p_list:
if name.upper() in p_list:
if name.upper() == 'MODEL' and value != ham_name:
dirname = '{}{}_'.format(dirname, value)
elif name.upper() == "LATTICE_TYPE":
dirname = '{}{}_'.format(dirname, value)
else:
dirname = '{}{}={}_'.format(dirname, name.strip("ham_"), value)
if name.upper.startswith('HAM_'):
name_temp = name[4:]
else:
name_temp = name
dirname = '{}{}={}_'.format(dirname, name_temp, value)
return dirname[:-1]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment