Skip to content

Commit

Permalink
Bug Fix. When I added a method export band structure did not account …
Browse files Browse the repository at this point in the history
…for self.kpath can be None because of atomicplot
  • Loading branch information
lllangWV committed Oct 3, 2024
1 parent cae5918 commit 5877ffe
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions pyprocar/plotter/ebs_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,11 @@ def plot_bands(self):
tick_names=[]
for i,x in enumerate(self.x):
tick_name=''
for i_tick, tick_position in enumerate(self.kpath.tick_positions):
if i == tick_position:
tick_name=self.kpath.tick_names[i_tick]
tick_names.append(tick_name)
if self.kpath is not None:
for i_tick, tick_position in enumerate(self.kpath.tick_positions):
if i == tick_position:
tick_name=self.kpath.tick_names[i_tick]
tick_names.append(tick_name)
values_dict['kpath_tick_names']=tick_names
self.values_dict=values_dict

Expand Down Expand Up @@ -279,10 +280,11 @@ def plot_scatter(self,
tick_names=[]
for i,x in enumerate(self.x):
tick_name=''
for i_tick, tick_position in enumerate(self.kpath.tick_positions):
if i == tick_position:
tick_name=self.kpath.tick_names[i_tick]
tick_names.append(tick_name)
if self.kpath is not None:
for i_tick, tick_position in enumerate(self.kpath.tick_positions):
if i == tick_position:
tick_name=self.kpath.tick_names[i_tick]
tick_names.append(tick_name)
values_dict['kpath_tick_names']=tick_names

self.values_dict=values_dict
Expand Down Expand Up @@ -404,10 +406,11 @@ def plot_parameteric(
tick_names=[]
for i,x in enumerate(self.x):
tick_name=''
for i_tick, tick_position in enumerate(self.kpath.tick_positions):
if i == tick_position:
tick_name=self.kpath.tick_names[i_tick]
tick_names.append(tick_name)
if self.kpath is not None:
for i_tick, tick_position in enumerate(self.kpath.tick_positions):
if i == tick_position:
tick_name=self.kpath.tick_names[i_tick]
tick_names.append(tick_name)
values_dict['kpath_tick_names']=tick_names
self.values_dict=values_dict

Expand Down Expand Up @@ -481,10 +484,11 @@ def plot_parameteric_overlay(self,
tick_names=[]
for i,x in enumerate(self.x):
tick_name=''
for i_tick, tick_position in enumerate(self.kpath.tick_positions):
if i == tick_position:
tick_name=self.kpath.tick_names[i_tick]
tick_names.append(tick_name)
if self.kpath is not None:
for i_tick, tick_position in enumerate(self.kpath.tick_positions):
if i == tick_position:
tick_name=self.kpath.tick_names[i_tick]
tick_names.append(tick_name)
values_dict['kpath_tick_names']=tick_names
self.values_dict=values_dict

Expand Down

0 comments on commit 5877ffe

Please sign in to comment.