Skip to content
Snippets Groups Projects
Commit f55b5ad7 authored by Alvin Noe Ladines's avatar Alvin Noe Ladines
Browse files

Added error handler for calculate_bytes

parent edce24bf
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,10 @@ class DOSFingerprint():
"""
grid_array = grid.grid()
# cut the energy and dos to grid size
energy, dos = np.transpose([(e,d) for e,d in zip(energy, dos) if (e >= grid_array[0][0] and e <= grid_array[-1][0])])
energy_dos = np.transpose([(e,d) for e,d in zip(energy, dos) if (e >= grid_array[0][0] and e <= grid_array[-1][0])])
if len(energy_dos) != 2:
return [0, 0], ''
energy, dos = energy_dos
# calculate fingerprint
bin_fp = ''
grid_index = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment