Skip to content

Commit

Permalink
Minor fix, only normalise proj_xyz if normalise = True
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Jun 22, 2024
1 parent 63a9e52 commit 67181d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions easyunfold/procar.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ def _read(self, fobj, parsed_kpoints=None):
if self.normalise:
self.normalise_projs(proj_data)

if proj_xyz is not None:
proj_sum = np.sum(proj_xyz, axis=(-3, -2, -1), keepdims=True)
proj_sum[proj_sum == 0] = 1
proj_xyz /= proj_sum
if proj_xyz is not None:
proj_sum = np.sum(proj_xyz, axis=(-3, -2, -1), keepdims=True)
proj_sum[proj_sum == 0] = 1
proj_xyz /= proj_sum

# Update the parsed kpoints
parsed_kpoints.update({kvec_section_counter_tuple[0] for kvec_section_counter_tuple in this_procar_parsed_kpoints})
Expand Down

0 comments on commit 67181d9

Please sign in to comment.