Skip to content

Commit

Permalink
Adds small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
b1592 committed Jul 7, 2021
1 parent 80ca4fb commit 027535d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions adpeps/simulation/run_ipeps_exci.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def _compute_ev_red_basis(H, N, P, n):
return sorted(ev.real)

def evaluate(config_file, momentum_ix):
if momentum_ix != -2:
# Default option (-1): evaluate all momenta
if momentum_ix != -1:
return evaluate_single(config_file, momentum_ix)

with open(config_file) as f:
Expand All @@ -170,7 +171,7 @@ def evaluate(config_file, momentum_ix):
print(dump(cfg))

sim_config.from_dict(cfg)
kxs, kys = make_momentum_path(sim_config.momentum_path)
kxs, kys, plot_info = make_momentum_path(sim_config.momentum_path, with_plot_info=True)

import matplotlib.pyplot as plt
evs = []
Expand All @@ -180,7 +181,12 @@ def evaluate(config_file, momentum_ix):
except:
ev = [np.nan]
evs.append(ev[0])

plt.plot(evs, '--+')
plt.xticks(**plot_info['xticks'])
plt.title(f"Dispersion {sim_config.model} D={sim_config.D}")
plt.xlabel('k')
plt.ylabel('$\omega$')
plt.show()


Expand Down
2 changes: 1 addition & 1 deletion adpeps/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
def localize_data_file(filename):
ROOT_DIR = adpeps.PROJECT_ROOT_DIR
try:
base_out_folder = os.environ["DATADIR2"]
base_out_folder = os.environ["DATADIR"]
except KeyError:
base_out_folder = Path(ROOT_DIR, 'simulations')
return Path(base_out_folder, filename)
Expand Down

0 comments on commit 027535d

Please sign in to comment.